Acrosser Technology AR-V6002FL User Manual page 75

Hide thumbs Also See for AR-V6002FL:
Table of Contents

Advertisement

2. Syntax:
i32 setOutChLevel( i32 channel, u8 val )
Description: Set the value of GPIO Output according to the variable 'val'.
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 is 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
75
Revision: 1.0

Advertisement

Table of Contents
loading

Table of Contents