
ACM-XD15B7
22
Acrosser Technology Co., Ltd.
4.2.2.
GPIO
Syntax:
int get_gpo_status(int pin)
Description:
Get the status of GPIO output pins
Parameters:
This function fills in an integer variable as the parameter.
The pin0 ~ pin3 is the status of the output pins.
Return Value:
0 or 1 (0 is Low, 1 is High)
Syntax:
int get_gpi_status(int pin)
Description:
Set the status of GPIO input pins.
Parameters:
This function fills in an integer variable as the parameter.
The pin0 ~ pin3 is the status of the input pins.
Return Value:
0 or 1 (0 is Low, 1 is High)
Syntax:
void set_gpo_status(int pin, int value)
Description:
Set the status of GPIO Output pins and Value.
Parameters:
Set pin0~pin3 value 0 is Low, 1 is High
Return Value:
None
4.2.3.
Watchdog
Syntax:
void wdt_start(int timevalue)
Description:
This function sets the watchdog timer register to the value
‘val’ and starts to count down. The value could be 0 ~ 255.
The unit is second. Setting the timer register to 0 disables
the watchdog function and stops the countdown.
Parameters:
The parameter ‘timevalue’ is the value to set to watchdog
timer register. The range is 0~255.
Return Value:
None
Syntax:
int get_wdt_count(void)
Description:
This function read the value of the watchdog time counter
and retruns it to the caller.
Parameters:
None
Return Value:
This function returns the value of the time counter and
return it to the caller as an integer.