Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
#include <stdlib.h>
#include "functions/naibrd_modCommon.h"
#include "functions/naibrd_ser.h"
#include "maps/nai_map_modCommon.h"
#include "maps/nai_map_ser.h"
#include "maps/nai_map_pdkb.h"
#include "advanced/naibrd_adv.h"
#include "naibrd_config.h"
#include "boards/naibrd_gen5.h"
Functions | |
NAIBRDFUNC int32_t NAIAPI | naibrd_SER_GetChannelCount (uint32_t modid) |
Returns the number of channels for the specified Serial Module ID. | |
NAIBRDFUNC uint32_t NAIAPI | naibrd_SER_GetFifoSize (uint32_t modid) |
Returns the size of the FIFO buffer for the specified Serial Module ID. | |
NAIBRDFUNC uint32_t NAIAPI | naibrd_SER_GetMaxBaudRate (uint32_t modid, bool_t sync) |
Returns the maximum baud rate for the Serial channels for the specified Serial Module ID and sync mode. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_TransmitBuffer (int32_t cardIndex, int32_t module, int32_t channel, int32_t width, const void *buffer, uint32_t count, uint32_t *outwritten) |
Writes multiple bytes of data to the transmit FIFO for the specified Serial channel. The actual number of bytes placed in the buffer may be less than the length desired if the FIFO becomes full. NOTE: Gen5 boards should use a 32 bit data buffer (width=4) instead of a 16 bit buffer (width=2) for performance purposes. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ReceiveBuffer (int32_t cardIndex, int32_t module, int32_t channel, int32_t width, uint16_t outbuffer[], uint32_t length, uint32_t *outreceived) |
Retrieves multiple bytes of data from the receive FIFO for the specified Serial channel. The number of data elements read may be less than the amount requested if the FIFO goes empty during the read. NOTE: For performance purposes, Gen5 boards should use naibrd_SER_ReceiveBuffer32 instead of this API. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ReceiveBuffer32 (int32_t cardIndex, int32_t module, int32_t channel, uint32_t outbuffer[], uint32_t length, uint32_t *outreceived) |
Retrieves multiple bytes of data from the receive FIFO for the specified Serial channel. The number of data elements read may be less than the amount requested if the FIFO goes empty during the read. NOTE: This API is recommended over naibrd_SER_ReceiveBuffer() for Gen5 boards for performance purposes. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetHDLCPacket (int32_t cardIndex, int32_t module, int32_t channel, uint16_t outbuffer[], uint32_t length, uint32_t *outreceived, int32_t timeoutms) |
Retrieves the buffer data for the specified serial channel associated with one(1) HDLC packet. When an HDLC packet is received OR the maximum count is read, the function returns. Otherwise, it blocks, waiting for data to be read or for the timeout to be reached. NOTE: This function extracts data from the fifo one element at a time, as opposed to naibrd_SER_ReceiveBuffer32() which extracts all of the data at once. For this reason, this API does not perform as efficiently as naibrd_SER_ReceiveBuffer32(). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetHDLCPacket32 (int32_t cardIndex, int32_t module, int32_t channel, uint32_t outbuffer[], uint32_t length, uint32_t *outreceived, int32_t timeoutms) |
Retrieves the buffer data for the specified serial channel associated with one(1) HDLC packet. When an HDLC packet is received OR the maximum count is read, the function returns. Otherwise, it blocks, waiting for data to be read or for the timeout to be reached. NOTE: This function extracts data from the fifo one element at a time, as opposed to naibrd_SER_ReceiveBuffer32() which extracts all of the data at once. For this reason, this API does not perform as efficiently as naibrd_SER_ReceiveBuffer32(). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTxBufferCnt (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the number of bytes in the Transmit FIFO for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferCnt (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the number of bytes in the Receive FIFO for specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelStatusEx (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_status_access_type_t type, nai_ser_status_t *outchannelStatus) |
Retrieves the status for the specified Serial channel with the output specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearChannelStatusEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t chanStatus) |
Clears the specified latched Channel Status bits from chanStatus. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelStatus (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, nai_ser_status_t *outchannelStatus) |
Retrieves the status for the specified Serial channel with the output specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearChannelStatus (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t chanStatus) |
Clears the specified latched Channel Status bits from chanStatus. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetFifoStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outfifoStatus) |
Retrieves the FIFO status for the specified Serial channel with the output specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_WriteByte (int32_t cardIndex, int32_t module, int32_t channel, uint8_t byteValue) |
Writes a single byte of data to the transmit FIFO of the specified Serial channel. NOTE: This API is not supported by GEN5 architecture and is replaced with naibrd_SER_TransmitBuffer(). Setting the "count" to 1 and "width" to 2 of naibrd_SER_TransmitBuffer() will mimic the naibrd_SER_WriteByte() API. Place the data in a 16 bit buffer "buffer", even when transmitting a single byte. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ReadByte (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_statusbyte_t *outstatusByte, uint8_t *outbyteValue) |
Retrieves a byte of data from the receive FIFO for the specified Serial channel. NOTE: This API is not supported by GEN5 architecture and is replaced with naibrd_SER_ReceiveBuffer(). Setting the "count" to 1 and "width" to 2 of naibrd_SER_ReceiveBuffer() will mimic the naibrd_SER_ReadByte() API. The resulting 16 bit data [outbuffer] will have the status in the upper byte and the data in the lower byte. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_TransmitInitiate (int32_t cardIndex, int32_t module, int32_t channel) |
Initiates the serial transmission for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_TransmitStop (int32_t cardIndex, int32_t module, int32_t channel) |
Stops the serial transmission for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetReceiverEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Sets the Receiver state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetReceiverEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable) |
Retrieves the Receiver state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetRTS (int32_t cardIndex, int32_t module, int32_t channel, bool_t active) |
Sets RTS pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRTS (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outactive) |
Retrieves RTS pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetDTR (int32_t cardIndex, int32_t module, int32_t channel, bool_t active) |
Sets the DTR pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDTR (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outactive) |
Retrieves the DTR pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetCTS (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outactive) |
Retrieves the CTS pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDSR (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outactive) |
Retrieves the DSR pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetDCD (int32_t cardIndex, int32_t module, int32_t channel, bool_t active) |
Sets DCD pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDCD (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outactive) |
Retrieves DCD pin state for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetDCDDirection (int32_t cardIndex, int32_t module, int32_t channel, bool_t direction) |
Sets the Direction (Input/Output) of the DCD pin for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDCDDirection (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outdirection) |
Retrieves the Direction (Input/Output) of the DCD pin for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_AsyncTransmitControl (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Sets the asynchronous data transmit mode for the specified Serial channel. When this mode is enabled, data written to the transmit FIFO buffer is transmitted. Tx initiate is not necessary. For Async mode only. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_EnterHuntSyncControl (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Sets the hunt mode for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Enables or Disables the specified Serial channel. Channels must be disabled before any configuration change is made, or before InitiateBIT. Channels must be enabled for the configuration changes to take effect, or after InitiateBIT is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable) |
Retrieves the state of the specified Serial channel. Channels must be disabled before any configuration change is made, or before InitiateBIT. Channels must be enabled for the configuration changes to take effect, or after InitiateBIT is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetProtocol (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_protocol_t protocol) |
Sets the protocol for the specified Serial channel specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetProtocol (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_protocol_t *outprotocol) |
Retrieves the protocol for the specified Serial channel specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterfaceLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_interface_t level) |
Sets interface level for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterfaceLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_interface_t *outlevel) |
Retrieves interface level for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetBaudrate (int32_t cardIndex, int32_t module, int32_t channel, uint32_t baudRate) |
Sets the baud rate for the specified Serial channel. Note: For 16-bit Baud Rate configuration registers, this function always sets the value of the high register before the setting value for low register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBaudrate (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outbaudRate) |
Retrieves the baud rate for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetClockMode (int32_t cardIndex, int32_t module, int32_t channel, uint32_t clockMode) |
Sets the raw clock mode for the specified Serial channel specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetClockMode (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outclockMode) |
Retrieves the raw clock mode for the specified Serial channel specified as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetParity (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_parity_t parity) |
Sets the Parity in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetParity (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_parity_t *outparity) |
Retrieves the Parity in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetDataBits (int32_t cardIndex, int32_t module, int32_t channel, uint8_t dataBits) |
Sets the Number of Data Bits in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDataBits (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outdataBits) |
Retrieves the Number of Data Bits in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetStopBits (int32_t cardIndex, int32_t module, int32_t channel, uint8_t stopBits) |
Sets the Number of Stop Bits in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetStopBits (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outstopBits) |
Retrieves the Number of Stop Bits in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetEncoding (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_encoding_t encoding) |
Sets the Encoding in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetEncoding (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_encoding_t *outencoding) |
Retrieves the Encoding in the Data Configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetPreamble (int32_t cardIndex, int32_t module, int32_t channel, uint32_t preamble) |
Sets the Preamble for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetPreamble (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outpreamble) |
Retrieves the Preamble for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTxBufferAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count) |
Sets the watermark for the Transmit Buffer Almost Empty for the specified Serial channel. The watermark specifies the minimum size, in bytes, for the transmit buffer before the Tx FIFO Almost Empty Status bit D1 in the FIFO status register is flagged. If the Tx Buffer Almost Empty interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTxBufferAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the watermark for the Transmit Buffer Almost Empty for the specified Serial channel. The watermark specifies the minimum size, in bytes, for the transmit buffer before the Tx FIFO Almost Empty Status bit D1 in the FIFO status register is flagged. If the Tx Buffer Almost Empty interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetRxBufferAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count) |
Sets the watermark associated with the Rx Buffer Almost Full value for the specified Serial channel. This watermark specifies the maximum size, in bytes, of the receive buffer before the RxFIFO Almost-Full Status bit D0 in the FIFO status register is flagged. If the Rx Buffer Almost Full interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the watermark associated with the Rx Buffer Almost Full value for the specified Serial channel. This watermark specifies the maximum size, in bytes, of the receive buffer before the RxFIFO Almost-Full Status bit D0 in the FIFO status register is flagged. If the Rx Buffer Almost Full interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetRxBufferHiWatermark (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count) |
Sets the Receive Buffer High Watermark value for the specified Serial channel. When Rx Buffer size equals the High Watermark value, the High Watermark Reached Status bit D2 in the FIFO status register is flagged and: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferHiWatermark (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the Receive Buffer High Watermark value for the specified Serial channel. When Rx Buffer size equals the High Watermark value, the High Watermark Reached Status bit D2 in the FIFO status register is flagged and: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetRxBufferLoWatermark (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count) |
Sets the Receive Buffer Low Watermark value for the specified Serial channel. When the Rx Buffer size is less than the Low Watermark value, FIFO Status bit D3 is flagged and;. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferLoWatermark (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount) |
Retrieves the Receive Buffer Low Watermark value for the specified Serial channel. When the Rx Buffer size is less than the Low Watermark value, FIFO Status bit D3 is flagged and;. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTerminationChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t termChar) |
Sets Termination Character for the specified Serial channel. The termination character used for termination detection. When using the Asynchronous or Bi-Synchronous modes, the receive data stream is monitored for the occurrence of the termination character. If the interrupt mask for SYNC CHAR DETECTED bit is enabled, when this character is detected, an interrupt is generated. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTerminationChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outtermChar) |
Retrieves Termination Character for the specified Serial channel. The termination character used for termination detection. When using the Asynchronous or Bi-Synchronous modes, the receive data stream is monitored for the occurrence of the termination character. If the interrupt mask for SYNC CHAR DETECTED bit is enabled, when this character is detected, an interrupt is generated. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetXonChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t xonChar) |
Sets the XON Character for in-band flow control when in Async mode for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetXonChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outxonChar) |
Retrieves the XON Character for in-band flow control when in Async mode for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetXoffChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t xoffChar) |
Sets the XOFF Character for in-band flow control when in Async mode for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetXoffChar (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outxoffChar) |
Retrieves the XOFF Character for in-band flow control when in Async mode for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetRxHdlcAddrsSyncChar (int32_t cardIndex, int32_t module, int32_t channel, uint32_t syncChar) |
Sets the Receive HDLC Address/Sync Character for the specified Serial channel. The handling of this value is mode dependent. If using HDLC mode, this value is compared to the address in received message and if it's equal, the message is stored in the receive buffer. If using Mono/Bi-Synchronous mode, this value is considered the 'Sync Character' and is used for communication synchronization. The receiver searches incoming data for the Sync Character, once found, communication is synchronized and additional data is valid. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxHdlcAddrsSyncChar (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsyncChar) |
Retrieves the Receive HDLC Address/Sync Character for the specified Serial channel. The handling of this value is mode dependent. If using HDLC mode, this value is compared to the address in received message and if it's equal, the message is stored in the receive buffer. If using Mono/Bi-Synchronous mode, this value is considered the 'Sync Character' and is used for communication synchronization. The receiver searches incoming data for the Sync Character, once found, communication is synchronized and additional data is valid. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTxHdlcAddrsSyncChar (int32_t cardIndex, int32_t module, int32_t channel, uint32_t syncChar) |
Sets the Transmit HDLC Address/Sync Character for the specified Serial channel. The handling of this value is mode dependent. If using HDLC mode, this value is prepended to the transmit buffer. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTxHdlcAddrsSyncChar (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsyncChar) |
Retrieves the Transmit HDLC Address/Sync Character for the specified Serial channel. The handling of this value is mode dependent. If using HDLC mode, this value is prepended to the transmit buffer. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTimeout (int32_t cardIndex, int32_t module, int32_t channel, uint32_t timeout) |
Sets the Time Out Value for the specified Serial channel. When there is no receive line activity for the configured period of time, bit D10 in the Interrupt Status register will be set. If the Time Out Occurred interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTimeout (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outtimeout) |
Retrieves the Time Out Value for the specified Serial channel. When there is no receive line activity for the configured period of time, bit D10 in the Interrupt Status register will be set. If the Time Out Occurred interrupt is enabled, an interrupt will be generated when the status is set. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outRxsize) |
Retrieves the size (in bytes) of the Receive FIFO for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTxBufferSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outTxsize) |
Retrieves the size (in bytes) of the Transmit FIFO for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ChannelReset (int32_t cardIndex, int32_t module, int32_t channel) |
Resets both the transmit and receive FIFO buffers and UART for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearRxFifo (int32_t cardIndex, int32_t module, int32_t channel) |
Resets the receive FIFO buffer for the specified channel. This will flush the data from the FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearTxFifo (int32_t cardIndex, int32_t module, int32_t channel) |
Resets the transmit FIFO buffer for the specified channel. This will flush the data from the FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetPinoutControl (int32_t cardIndex, int32_t module, int32_t channel, uint32_t pinoutControl) |
Sets the physical pin-out configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetPinoutControl (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outpinoutControl) |
Retrieves the physical pin-out configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTimedSerialEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Sets the Timed Async Serial mode enable for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTimedSerialEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable) |
Retrieves the Timed Async Mode enable for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetTimedSerialConfig (int32_t cardIndex, int32_t module, int32_t channel, uint32_t enable, uint32_t gapTime, uint32_t subBytes, uint32_t frameCount) |
Sets the timed configuration for the specified Timed Serial channel. User can enable/disable timed mode, as well as set frame count, byte count and gap time. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTimedSerialConfig (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outenable, uint32_t *outgapTime, uint32_t *outsubBytes, uint32_t *outframeCount) |
Retrieves the timed configuration for the specified Timed Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptEnableEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t intEnable) |
Sets the Interrupt Enable register value for the specified Serial channel. Setting the bits to 1 enables interrupts. Status is reported in the Interrupt Status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptEnableEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outIntEnable) |
Retrieves the Interrupt Enable register value for the specified Serial channel. Setting the bits to 1 enabled interrupts. Status is reported in the Interrupt Status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptEdgeLevelEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t edgeLevel) |
Sets the Interrupt Edge/Level register value for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptEdgeLevelEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outEdgeLevel) |
Retrieves the Interrupt Edge/Level register value for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptVectorEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t vector) |
Sets the interrupt vector for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptVectorEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outvector) |
Retrieves the interrupt vector for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptSteeringEx (int32_t cardIndex, int32_t module, int32_t channel, naibrd_int_steering_t steering) |
Sets the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptSteeringEx (int32_t cardIndex, int32_t module, int32_t channel, naibrd_int_steering_t *outsteering) |
Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptEnable (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t intEnable) |
Sets the Interrupt Enable register value for the specified Serial channel. Setting the bits to 1 enabled interrupts. Status is reported in the Interrupt Status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptEnable (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t *outIntEnable) |
Retrieves the Interrupt Enable register value for the specified Serial channel. Setting the bits to 1 enabled interrupts. Status is reported in the Interrupt Status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptEdgeLevel (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t edgeLevel) |
Sets the Interrupt Edge/Level register value for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptEdgeLevel (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t *outEdgeLevel) |
Retrieves the Interrupt Edge/Level register value for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptVector (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t vector) |
Sets the interrupt vector for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptVector (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, uint32_t *outvector) |
Retrieves the interrupt vector for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetInterruptSteering (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, naibrd_int_steering_t steering) |
Sets the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetInterruptSteering (int32_t cardIndex, int32_t module, nai_ser_status_type_t type, naibrd_int_steering_t *outsteering) |
Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelConfigRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t configRaw) |
Sets the raw channel configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelConfigRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outconfigRaw) |
Retrieves the raw channel configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetDataConfigRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t dataConfigRaw) |
Sets the raw data configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetDataConfigRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outdataConfigRaw) |
Retrieves the raw data configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelControlRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t chanCtrlRaw) |
Sets the raw channel control configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelControlRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *chanCtrlRaw) |
Retrieves the raw channel control configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetControlExtRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t controlExtRaw) |
Sets the raw extended channel control configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetControlExtRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcontrolExtRaw) |
Retrieves the raw extended channel control configuration for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_InitiateBIT (int32_t cardIndex, int32_t module, int32_t channel, bool_t waitForResult) |
Executes the serial Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_CheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outBitComplete) |
Retrieves the BIT status (complete or incomplete) of the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ModuleIntitiateBIT (int32_t cardIndex, int32_t module) |
Executes the Initiated Built-In-Test (IBIT) for all channels on a serial module. Use this function if you want to run BIT on all channels simultaneously. If the module does not support the common BIT interface, it will return NAI_ERROR_NOT_SUPPORTED, use naibrd_SER_InitiateBIT() instead. If any of the serial modules channels are enabled or in use, the test will not run on that channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ModuleCheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outBITComplete) |
Retrieves the status of the BIT test (complete or incomplete) for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ModuleCheckPBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outPBITComplete) |
Retrieves the PBIT (Power-on BIT) status of the module specified. The PBIT result will be in the BIT status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelMappedStatus (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t *outstatus) |
Retrieves either the BIT status or Summary (Receive Data Available) status for the module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearChannelMappedStatus (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t inStatus) |
Clears the latched BIT status or latched Summary (Rx Data Available) status. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelMappedInterruptEnable (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t intEnable) |
Sets the Interrupt Enable register value for the specified statusType. Setting any of the bits to a (1) enables the interrupt on the channel in that bit position. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelMappedInterruptEnable (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t *outIntEnable) |
Gets the Interrupt Enable register value for the specified statusType. A (1) indicates the interrupt is enabled for that channel, a (0) indicates it is not set. Each bit represents a channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelMappedInterruptTriggerType (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t triggerType) |
Sets the Interrupt trigger type (edge/level) register value for the specified statusType. Setting any of the bits to a (0) sets the trigger type to edge, setting any of the bits to a (1) sets the trigger type to level. Each bit represents a channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelMappedInterruptTriggerType (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t *outTriggerType) |
Gets the Interrupt trigger type (edge/level) register value for the specified statusType. A (0) indicates the trigger type is set to edge for that channel, a (1) indicates the trigger type is set to level. Each bit represents a channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelMappedInterruptVector (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t vector) |
Sets the interrupt vector for the specified statusType interrupt. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelMappedInterruptVector (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, uint32_t *outVector) |
Gets the interrupt vector for the specified statusType interrupt. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetChannelMappedInterruptSteering (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, naibrd_int_steering_t steering) |
Sets the interrupt steering for the specified statusType interrupt, this specifies the interrupt direction for each interrupt. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetChannelMappedInterruptSteering (int32_t cardIndex, int32_t module, nai_ser_chan_mapped_status_type_t statusType, naibrd_int_steering_t *outSteering) |
Gets the interrupt steering for the specified statusType interrupt, this specifies the interrupt direction for each interrupt. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBITStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_ser_status_access_type_t type, bool_t *outBitStatus) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ClearBITStatus (int32_t cardIndex, int32_t module, int32_t channel) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t intEnable) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outIntEnable) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t edgeLevel) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outEdgeLevel) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t vector) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t *outvector) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_SetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t steering) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t *outsteering) |