Little-Wire
 All Classes Functions Groups Pages
GPIO

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)
 

Detailed Description

GPIO library functions with Arduino-like syntax.

Function Documentation

unsigned char digitalRead ( littleWire *  lwHandle,
unsigned char  pin 
)

Read pin value

Parameters
lwHandlelittleWire device pointer
pinPin name (PIN1 , PIN2 , PIN3 or PIN4 )
Returns
Pin state (HIGH or LOW)

Definition at line 189 of file littleWire.c.

void digitalWrite ( littleWire *  lwHandle,
unsigned char  pin,
unsigned char  state 
)

Set pin value

Parameters
lwHandlelittleWire device pointer
pinPin name (PIN1 , PIN2 , PIN3 or PIN4 )
statePin state (HIGH or LOW)
Returns
(none)

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.

Parameters
lwHandlelittleWire device pointer
pinPin name (PIN1 , PIN2 , PIN3 or PIN4 ) state (ENABLE or DISABLE )
Returns
(none)

Definition at line 196 of file littleWire.c.

void pinMode ( littleWire *  lwHandle,
unsigned char  pin,
unsigned char  mode 
)

Set pin as input/output

Parameters
lwHandlelittleWire device pointer
pinPin name (PIN1 , PIN2 , PIN3 or PIN4 )
modeMode of pin (INPUT or OUTPUT)
Returns
(none)

Definition at line 180 of file littleWire.c.