Additional documentation for group 'Leds and buttons'. This file contains functions to control leds and buttons using a port expander. More...
Functions | |
void | expanderWrite (unsigned char _data) |
byte | expanderRead () |
char | Button1 () |
char | Button2 () |
char | Button3 () |
char | Button4 () |
char | Led1 (char state) |
char | Led2 (char state) |
char | Led3 (char state) |
char | Led4 (char state) |
void | ISR_Interrupt () |
Additional documentation for group 'Leds and buttons'. This file contains functions to control leds and buttons using a port expander.
See also :
pcf8574.h
Here is a link to the Header File Reference.
pcf8574.cpp
Here is a link to the C++ File Reference.
char Button1 | ( | ) |
Reads the state of button 1.
Definition at line 58 of file pcf8574.cpp.
char Button2 | ( | ) |
Reads the state of button 2.
Definition at line 90 of file pcf8574.cpp.
char Button3 | ( | ) |
Reads the state of button 3.
Definition at line 107 of file pcf8574.cpp.
char Button4 | ( | ) |
Reads the state of button 4.
Definition at line 124 of file pcf8574.cpp.
byte expanderRead | ( | ) |
Reads the pins on the port expander.
void expanderWrite | ( | unsigned char | _data | ) |
Sets the pins to high or low.
_data | Data to write. Write bit is 0 and read bit is 1. |
Definition at line 13 of file pcf8574.cpp.
void ISR_Interrupt | ( | ) |
Interrupt function for reception mode of the port expander.
Definition at line 247 of file pcf8574.cpp.
char Led1 | ( | char | state | ) |
Sets the state of the led 1.
state | 1 is ON and 0 is OFF. |
Definition at line 150 of file pcf8574.cpp.
char Led2 | ( | char | state | ) |
Sets the state of the led 2.
state | 1 is ON and 0 is OFF. |
Definition at line 169 of file pcf8574.cpp.
char Led3 | ( | char | state | ) |
Sets the state of the led 3.
state | 1 is ON and 0 is OFF. |
Definition at line 188 of file pcf8574.cpp.
char Led4 | ( | char | state | ) |
Sets the state of the led 4.
state | 1 is ON and 0 is OFF. |
Definition at line 207 of file pcf8574.cpp.