
Set value 0 is Low, 1 is High
Return Value: If the function sets the values successfully, it returns 0 or -1, any
other returned value stands for error.
5.1.1.3 GPIO (Windows)
1. Syntax:
getChLevel(u8 *val)
Description: Get the status of GPIO input pins and output pins, and put the value
at *val.
Parameters:
This function takes a pointer to an unsigned char variable as the parameter.
The bit0 ~ bit3 in the pointed variable ‘*val’ is the status of the output pins. The
bit4 ~ bit7 in the pointed variable ‘*val’ is the status of the input pins.
Return Value: If the function gets the value successfully, it returns 0 or -1, any
other returned value stands for error.
2. Syntax:
Set_gpio(int pin, int value)
Description: Set the status of GPIO Output value.
Parameters:
Set value 0 is Low, 1 is High
5.1.1.4 Watchdog (Liunx)
1. Syntax:
Wdt_start(Void)
Description: This function of the watchdog time to start counter.
Parameters: The parameter ‘val’ is the value to set to watchdog timer register. The
range is 1~ 255 .
Return Value: None.
62