Acrosser AR-ES6003FL User Manual

Page 85

Advertising
background image

Here is an example:

If GPIO Output channel 0 and channel 2 are both 1.

unsigned char ch;

getOutChLevel( GPO0|GPO2, &ch );

The returned value of variable ‘ch’ is 0x5.

Return Value: If the function gets the values successfully, it returns 0. If any error,

it returns –1.

Watchdog

1. Syntax:

u8 getWtdTimer(void)

Description: This function reads the value of the watchdog time counter and

returns it to the caller.

Parameters: None.

Return Value: This function returns the value of the time counter and returns it to

the caller as an unsigned integer.

2. Syntax:

void setWtdTimer( u8 val )

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 ‘val’ is the value to set to watchdog timer register.

The range is 0 ~ 255.

Return Value: None.

85

Advertising