EasyManua.ls Logo

Acrosser Technology AR-V6002FL - Page 71

Default Icon
84 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Revision: 1.23
71
Description: Get the value of GPIO and put the value at * bValue.
Parameters:
I. The parameter ‘iBitNumber indicates the GPIO Input pins to show. Users can use the
macros GPO_BIT_0, GPO_BIT_1, GPO_BIT_2, GPO_BIT_3, GPI_BIT_4, GPI_BIT_5,
GPI_BIT_6, or GPI_BIT_7 to indicate the GPIO channel. For example:
getGPIOBitValue (GPO_BIT_0, &val);
// Indicate the GPIO Output channel 0
getGPIOBitValue (GPI_BIT_6, &val);
// Indicate the GPIO Input channel 6
II. The parameter ‘bValue’ is an bool pointer. The function puts the values of the indicated
GPIO channels at the memory pointed by ‘bValue’. True indicates HI, and false indicates
LOW.
Return Value: If the function gets the values successfully, it returns 0. If any error, it returns
not zero.
2. Syntax:
int setGPIOBitValue(int iBitNumber, bool bValue)
Description: Set the value of GPIO Output according to the variable ‘bValue’.
Parameters:
I. The parameter ‘channel’ indicates the GPIO Output pins to set. Users can use the macros
GPO_BIT_0, GPO_BIT_1, GPO_BIT_2, or GPO_BIT_3 to indicate the GPIO Output
channels.
II. The parameter ‘bValue’ indicate the value to be set to GPIO Output channel. True
indicates HI, and false indicates LOW.
For example:
/* Setting the GPIO Output channel 2 to HI */
setGPIOBitValue (GPO_BIT_2, true );
/* Setting the GPIO Output channel 3 to LOW */
setGPIOBitValue (GPO_BIT_3, false );