2 watchdog – Acrosser AR-ES6050FLD-W User Manual

Page 45

Advertising
background image

Revision: 1.0

45

Status_t setGpioLevel( uint32_t Id, uint32_t Level )

Description:

Set the current state of GPIO ports.


Parameters:

The argument ‘Id’ has two formats of parameters. If ‘Id’ is ‘GPIO_ALL’, the parameter
‘Level’ is bit patterns to be set to the corresponding GPIO ports. A bit ‘1’ at the value of
‘Level’ sets the corresponding GPIO port to logical high. A bit ‘0’ at the value of ‘Level’
sets the corresponding GPIO port to logical low. The setting to an input port is ignored.
The other format of the argument ‘Id’ is that the ‘Id’ is ‘GPIO_ID0’ ~ ‘GPIO_ID32’. For
example, say, ‘Id’ is GPIO_ID2. If ‘Level’ is any value other than 0, it sets the port
GPIO2 to logical high. If ‘Level’ is 0, it sets the port GPIO2 to logical low.

Return Value:

If the function sets the values successfully, it returns

STATUS_SUCCESS, any other returned value stands for error.


3.7.2 Watchdog

1. Syntax:

Status_t getWtdTimer(uint32_t *pTimer)

Description:

This function read the value of the watchdog timer.

Parameters:

The value of the timer is put at the memory which is pointed by the

argument ‘pTimer’.
Return Value:

This function always returns STATUS_SUCCESS.


2. Syntax:

Status_t setWtdTimer( uint32_t Timer )

Description:

This function sets the watchdog timer register to the value ‘Timer’ 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 ‘Timer’ is the value to be set to watchdog timer register. The

range is 0 ~ 255.
Return Value:

This function always returns STATUS_SUCCESS.

Advertising