Little-Wire
|
GPIO library functions with Arduino-like syntax. More...
Functions | |
void | digitalWrite (littleWire *lwHandle, unsigned char pin, unsigned char state) |
void | pinMode (littleWire *lwHandle, unsigned char pin, unsigned char mode) |
unsigned char | digitalRead (littleWire *lwHandle, unsigned char pin) |
void | internalPullup (littleWire *lwHandle, unsigned char pin, unsigned char state) |
GPIO library functions with Arduino-like syntax.
unsigned char digitalRead | ( | littleWire * | lwHandle, |
unsigned char | pin | ||
) |
Read pin value
lwHandle | littleWire device pointer |
pin | Pin name (PIN1 , PIN2 , PIN3 or PIN4 ) |
Definition at line 189 of file littleWire.c.
void digitalWrite | ( | littleWire * | lwHandle, |
unsigned char | pin, | ||
unsigned char | state | ||
) |
Set pin value
lwHandle | littleWire device pointer |
pin | Pin name (PIN1 , PIN2 , PIN3 or PIN4 ) |
state | Pin state (HIGH or LOW) |
Definition at line 171 of file littleWire.c.
void internalPullup | ( | littleWire * | lwHandle, |
unsigned char | pin, | ||
unsigned char | state | ||
) |
Sets the state of the internal pullup resistor.
Call this function after you assign the pin as an input.
lwHandle | littleWire device pointer |
pin | Pin name (PIN1 , PIN2 , PIN3 or PIN4 ) state (ENABLE or DISABLE ) |
Definition at line 196 of file littleWire.c.
void pinMode | ( | littleWire * | lwHandle, |
unsigned char | pin, | ||
unsigned char | mode | ||
) |
Set pin as input/output
lwHandle | littleWire device pointer |
pin | Pin name (PIN1 , PIN2 , PIN3 or PIN4 ) |
mode | Mode of pin (INPUT or OUTPUT) |
Definition at line 180 of file littleWire.c.