6.3 API List and Descriptions
GPIO
1.
Syntax:
i32 getInChLevel( i32 channel, u8 *val )
Description:
Get the value of GPIO Input and put the value at *val.
Parameters:
I.
The parameter ‘channel’ indicates the GPIO Input pins to show. Users can
use the macros GPI0, GPI1, GPI2, GPI3 to indicate the GPIO Input channel.
For example:
getInChLevel( GPI2, &val); // Indicate the GPIO Input channel 2
getInChLevel( GPI0 | GPI3, &val); // Indicate the GPIO Input
// channel 0 and channel 3
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 Input channel 0. The bit 1 of *val
shows the value of GPIO Input channel 1. Other bits show the
corresponding GPIO Input channels. Because there are only four channels,
bit 4 ~ bit 7 of *val are always zero.
Here is an example:
If GPIO Input channel 1 and channel 3 are both 1.
unsigned char ch;
getInChLevel( GPI1|GPI3, &ch );
The returned value of variable ‘ch’ is 0xa.
Return Value:
If the function gets the values successfully, it returns 0. If any error,
it returns –1.
2.
Syntax:
i32 setOutChLevel( i32 channel, u8 val )
Description:
Set the value of GPIO Output according to the variable ‘val’.
53
Содержание AR-B6003
Страница 1: ...1 AR B6003 Board User Manual...
Страница 8: ...2 2 Locations of IO ports Jumper Setting Definition Top Side 8...
Страница 9: ...Locations Of IO Ports Jumper Setting Definition Bottom Side 9...
Страница 39: ...Click the item all the drivers will be selected Click the item all selected items will be cancelled 39...
Страница 40: ...Click the Install icon to install the selected drivers Click the item to browse the CD contents 40...
Страница 41: ...Click the icon to close the program 41...
Страница 45: ...Please install the Acrobat Reader when you see the message 45...
Страница 50: ...5 3 4 Finish the driver installation Please click Yes to restart the system 50...
Страница 57: ...3 Run the bcdedit again without any option A new item testsigning is enabled 4 Reboot the system 57...