Solvline Eddy DK Ver 2.20 User Manual
Page 58

Chapter 6. Library
Format
void SB_SetGpioMode (int GpioNo, int Mode);
Parameter
GpioNo
GPIO port number (0 ~ 15)
Mode
Input/output
direction
0 : Input (Senses 3.3V input voltage)
1 : Output (Controls 3.3V output voltage)
Returns None
Notice
There are maximum of 16 GPIO ports provided by Eddy.
Number of GPIO ports varies according to the model.
Eddy-CPU provides 16 GPIO, whereas Eddy-S1/Pin provides 4, and none
from others.
SB_SetGpioValue
Function
Drives 3.3V output to specified GPIO port.
Format
Void SB_Set_GpioValue (int GpioNo, int value);
Parameter GpioNo
GPIO
port
number
value
GPIO
configuration
value
0 : low (Stop driving 3.3 V to output)
1 : high (Drive 3.3V to output)
Returns None
Notice
I/O mode (direction) of GPIO port specified in GpioNo has to be in output
mode.
SB_GetGpioMode
Function
Reads I/O mode setting of specified GPIO port.
Format
int SB_GetGpioMode (int GpioNo);
Parameter GpioNo
GPIO
port
number
Returns
0, 1
GPIO mode value read
0: input (Configured as input mode)
1: Output (Configured as output mode)
Notice
SB_GetGpioValue
Function Reads
current
status of specified GPIO port.
Format int
SB_GetGpioValue
(int
GpioNo);
Parameter GpioNo
GPIO
port
number
6-15