Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
void | Run_SER_ASync_GPIO (int32_t cardIndex, int32_t module, uint32_t moduleID) |
The Serial Async GPIO sample application illustrates the methods to call in order to exercise the GPIO feature of the SC3 Serial module.
To set an output (GPO) channel high, set the the Channel Control register RTS/GPO 1 using the naibrd_SER_SetChannelControlRaw function passing it NAIBRD_SER_CTRL_GPO1 as the last argument. Inputs (GPI) are monitored by the Dynamic Status register, bits CTS/GPI 1 and GPI 2, which provide real-time status monitoring of the GPI inputs. The Latched Status register, bits CTS/GPI 1 and GPI 2, latch when an input is received and are cleared when a 1 is written to the register. The Interrupt Enable register bits CTS/GPI 1 and GPI 2 when set to a 1, will create an interrupt. To invert the GPI/GPO inputs and outputs, set the Tx-Rx Configuration register bits Invert CTS (GPI) and Invert RTS (GPO), to 1. See the Register Descriptions for more information.
void Run_SER_ASync_GPIO | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | moduleID ) |
Configures a serial module to use the GPIO feature. The user is queried for the serial channel to use.
cardIndex | (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | (Input) Module Number of the module to access (1 - [max modules for board]). |
moduleID | (Input) The ID of the module. |