AR-B5800A User Manual
GPIO and Watchdog
GPIO
1.
Syntax:
i32 setChDir( u8 val )
Description:
Set the direction (Input/Output) of GPIO ports according to the parameter ‘val’.
Parameters:
The parameter ‘val’ is an unsigned character. Each bit of *val corresponds to a GPIO port.
Bit 0 corresponds to GPIO0. Bit 1 corresponds to GPIO1. Bit 2 corresponds to GPIO2, and so on.
Setting a bit of ‘val’ as 0 configures the corresponding port as Output. Setting a bit of ‘val’ as 1
configures the corresponding port as Input.
Return Value:
If the function gets the configuration successfully, it returns 0. If any error, it returns –1.
2.
Syntax:
i32 getChDir( u8 *val )
Description:
Get the direction (Input/Output) of GPIO ports and put the configuration at *val.
Parameters:
The parameter ‘val’ points to an unsigned character. Each bit of *val corresponds to a
GPIO port. Bit 0 corresponds to GPIO0. Bit 1 corresponds to GPIO1. Bit 2 corresponds to GPIO2, and
so on. A ‘0’ bit at *val indicates the corresponding port is an Output port. A ‘1’ bit at *val indicates the
corresponding port is an Input port.
Return Value:
If the function gets the configuration successfully, it returns 0. If any error, it returns –1.
3.
Syntax:
i32 getChLevel( u8 *val )
Description:
Get the status value of GPIO ports 0~7 and put the value at *val.
Parameters:
The parameter ‘val’ points to an unsigned character. If a GPIO port is configured as an
Output port, the bit at *val which corresponds to this port indicates this port is outputting a ‘1’ or ‘0’. If
38
Содержание AR-B5800A
Страница 1: ...AR B5800A User Manual AR B5800A Board Intel Core 2 LGA775 PROCESSOR Networking Board User Manual 1 ...
Страница 7: ...AR B5800A User Manual 1 3 Block Diagram 7 ...
Страница 10: ...AR B5800A User Manual 2 2 Connectors and Jumper Setting 2 2 1 Locations Top side 10 ...
Страница 27: ...AR B5800A User Manual APPENDIX A MEMORY MAP 27 ...
Страница 28: ...AR B5800A User Manual APPEXDIX B IRQ MAP 28 ...
Страница 29: ...AR B5800A User Manual APPENDIX C I O PORT MAP 29 ...
Страница 30: ...AR B5800A User Manual 30 ...