McMajan Library Pack  v 2.00
Improve your Arduino !
Ss_FastArduino.h
Go to the documentation of this file.
1 
2 #ifndef _FastArduino_h
3 #define _FastArduino_h
4 
6 
7 /** \brief This function is designed to be a faster replace of original digitalWrite on AVR boards
8  * \param pin Arduino pin
9  * \param val pin status
10  */
11  void FastdigitalWrite(uint8_t , uint8_t );
12 /** \brief This function is designed to be a faster replace of original digitalRead on AVR boards
13  * \param pin Arduino pin
14  * \param val pin status
15  */
17 
18  void HPulse(uint8_t);
19  void LPulse(uint8_t);
20  void f1_FastdigitalPulse(uint8_t , uint8_t);
21 
22  void FastshiftOut(uint8_t , uint8_t , uint8_t );
23  /** \brief This function does a pulse on a specificated pin
24  * Note: this function has improved performances only on avr board.
25  * \param pin is the digital in in which you want the pulse
26  * \param val is the initial value. If you set true you have for firt an high value in the pin and then a low value.
27  */
28  void FastDigitalPulse(uint8_t,uint8_t);
29 
30  bool GetBitN(uint8_t * ,unsigned int );
31  void SetBitN(uint8_t * ,unsigned int, bool );
32 
33  int Mc_FreeRam();
34 
35 
36  #if defined USE_FASTARDUINO && defined ARDUINO_ARCH_AVR
37  #ifdef FastArduino_DEBUG
38  //#warning USE_FASTARDUINO è attivo e faccio le relative definizioni
39  #endif
40  void f_FastdigitalWrite(uint8_t , uint8_t );
41  int f_FastdigitalRead(uint8_t);
42  void f_FastshiftOut(const uint8_t , const uint8_t ,const uint8_t );
43  void f_FastDigitalPulse(uint8_t , uint8_t);
44 
45  #define FastdigitalRead(a) f_FastdigitalRead(a)
46  #define FastdigitalWrite(a,b) f_FastdigitalWrite(a,b)
47  #define FastshiftOut(a,b,d) f_FastshiftOut(a,b,d)
48  #define FastDigitalPulse(a,b) f_FastDigitalPulse(a,b)
49  #else
50  void f1_FastDigitalPulse(uint8_t, uint8_t);
51  #define FastdigitalWrite(a,b) digitalWrite(a,b)
52  #define FastdigitalRead(a) digitalRead(a)
53  #define FastshiftOut(a,b,d) shiftOut(a,b,MSBFIRST,d)
54 
55  #ifdef FastArduino_DEBUG
56  #ifdef ARDUINO_ARCH_AVR
57  //#warning USE_FASTARDUINO NON è attivo
58  #else
59  //#warning USE_FASTARDUINO attivo ma NON disponibile sulla tua piattaforma
60  #endif
61  #endif
62  #endif
63 
64 #endif
void HPulse(uint8_t pin)
Set digital pin to high, then to low.
bool GetBitN(uint8_t *buff, unsigned int Fbit)
This function return n bit from a buffer.
void FastdigitalWrite(uint8_t, uint8_t)
This function is designed to be a faster replace of original digitalWrite on AVR boards.
void LPulse(uint8_t pin)
Set digital pin to low, then to high.
void FastDigitalPulse(uint8_t, uint8_t)
This function does a pulse on a specificated pin Note: this function has improved performances only o...
void SetBitN(uint8_t *buff, unsigned int Fbit, bool val)
Questa funzione setta l'n-esimo bit del buffer buff (0-n) (il singolo byte è riempito da destra a sini...
void f1_FastdigitalPulse(uint8_t, uint8_t)
void f1_FastDigitalPulse(uint8_t pin, uint8_t val)
int Mc_FreeRam()
Calculate free RAM This function Works only on AVR microcontrollers.
int FastdigitalRead(uint8_t)
This function is designed to be a faster replace of original digitalRead on AVR boards.
void FastshiftOut(uint8_t, uint8_t, uint8_t)