
ANR-DNV3N3 Series
39
6.
readme
Use this utility first. Please read the readme file first.
4.3. API List and Descriptions
4.3.1. GPIO
Syntax:
Get_gpi_status(int pin)
Description:
Get the status of GPIO input pins status.
Parameters:
This function fills in an integer variable as the parameter.
The pin0 ~ pin1 is the status of the input pins.
Return Value:
1:HIGH, 0:LOW.
Syntax:
Get_gpo_status(int pin)
Description:
Get the status of GPIO output pins status.
Parameters:
This function fills in an integer variable as the parameter.
The pin0 ~ pin1 is the status of the output pins.
Return Value:
1:HIGH, 0:LOW.
Syntax:
Set_gpo(int pin, int value)
Description:
Set the status of GPIO Output value.
Parameters:
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.
4.3.2.
Watchdog
Syntax:
Void wdt_start(int _timevalue)
Description:
This function gets the watchdog timer register to the time
value and starts to count down.
Parameters:
The parameter ‘val’ is the value to set to watchdog timer
register. The range is 1 ~ 255.
Return Value:
This function returns the value of the time counter and
returns it to the caller as an unsigned integer.