Acrosser AR-ES6003FL User Manual
Page 84
Parameters:
I.
The parameter ‘channel’ indicates the GPIO Output pins to set. Users can
use the macros GPO0, GPO1, GPO2, GPO3 to indicate the GPIO Output
channels.
II. The parameter ‘val’ indicate the value to be set to GPIO Output channel.
The acceptable values are limited to 0 and 1.
For example:
/* Setting the GPIO Output channel 2 to 1 */
setOutChLevel( GPO2, 1 );
/* Setting the GPIO Output channel 0 and channel 3 to 0 */
getInChLevel( GPO0 | GPO3, 0 );
Return Value: If the function sets the values successfully, it returns 0. If any error,
it returns –1.
3. Syntax:
i32 getOutchLevel( i32 channel, u8 *val )
Description: Get the value of GPIO Output and put the value at *val.
Parameters:
I.
The parameter ‘channel’ indicates the GPIO Output pins to show. Users can
use the macros GPO0, GPO1, GPO2, GPO3 to indicate the GPIO Output
channel. For example:
getOutChLevel( GPO2, &val); // Indicate the GPIO Output channel 2
/* Indicate the GPIO Output channel 0 and channel 3. */
getOutChLevel( GPO0 | GPO3, &val);
II. The parameter ‘val’ is an unsigned character pointer. The function puts the
values of the indicated GPIO channels at the memory pointed by ‘val’. The
bit 0 of *val shows the value of GPIO Output channel 0. The bit 1 of *val
shows the value of GPIO Output channel 1. Other bits show the
corresponding GPIO Output channels. Because there are only four channels,
bit 4 ~ bit 7 of *val are always zero.
84