Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_SetAddress (int32_t cardIndex, int32_t module, int32_t channel, uint8_t address) |
Sets the Remote Terminal Address and RT Address Parity in the Operation and Status register (Core Register 1, bits 15:11 for RT Address and bit 10 (RT Address Parity). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_GetAddress (int32_t cardIndex, int32_t module, int32_t channel, uint8_t *outaddress) |
Gets the Remote Terminal Address in the Operation and Status register (Core Register 1, bits 15:11 for RT Address). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_SetBusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t aenable, bool_t benable) |
Sets the Control Register Bus A Enable (BAEN) and Bus B Enable (BBEN) bits (Core Register 0, bit 12:11) state. When broadcast is disables, RT Address 31 can be used as an RT address, otherwise it is used for 1553 broadcast mode. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_GetBusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outaenable, bool_t *outbenable) |
Retrieves the Control Register Bus A Enable (BAEN) and Bus B Enable (BBEN) bits (Core Register 0, bit 12:11) state. When broadcast is disables, RT Address 31 can be used as an RT address, otherwise it is used for 1553 broadcast mode. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ConfigureForPingPong (int32_t cardIndex, int32_t module, int32_t channel) |
Configures the Remote Terminal Descriptor Table to support Ping Pong mode for the specified 1553 channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_SetPingPongEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enabled) |
Sets the Control Register Ping-Pong Enable (PPEN) bit (Core Register 0, bit 2) state. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_GetPingPongEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenabled) |
Retrieves the Control Register Ping-Pong Enable (PPEN) bit (Core Register 0, bit 2) state. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_GetPingPongEnabled (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenabled) |
Retrieves the Control Register Message Time-out (MSGTO) bit (Core Register 0, bit 9) state. For RT operation, when ping-pong buffer mode is enabled, the MSGTO bit set to 1 serves to acknowledge to the host that ping-pong mode has been enabled. When the bit is set to 0 serves to acknowledge to the host that the ping-pong mode has been disabled. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_SetStatusWord (int32_t cardIndex, int32_t module, int32_t channel, uint16_t rtstatus) |
Sets the 1553 A/B Status Word register (Core Register 9) value. For both MIL-STD-1553A and B applications, this register contains the value for the status word. The host or subsystem controls the outgoing MIL-STD-1553 status word by setting the various status bits. If the Immediate Clear function is enabled (bit 15), then the status bits are automatically cleared after status word transmission. The Immediate Clear function does not alter the operation of the Trasmit Status word and Transmit Last Command Word mode codes. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_Legalize (int32_t cardIndex, int32_t module, int32_t channel, nai_sum1553_samctype_t samctype, uint32_t samcmask, bool_t legal) |
Sets up the legalization registers (Core Register 16-31) which are used by the RT to determine which valid, received commands are legal. A command determined to be illegal if it is supported by neither by the standard nor by additional system requirements. Note, the actual value written to the legalization registers is defined as follows: '1' illegalizes a command and '0' legalizes a command. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_GetControlWord (int32_t cardIndex, int32_t module, int32_t channel, nai_sum1553_samctype_t samctype, uint16_t samc, uint16_t *outctrl) |
Retrieves the Descriptor Block Control Word. The control word is used by the core in message processing and is initialized by the host or subsystem. The core updates the control word during command post-processing to provide the host or subsystem details about the transaction. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ClearBlockAccess (int32_t cardIndex, int32_t module, int32_t channel, nai_sum1553_samctype_t samctype, uint16_t samc) |
Clears Block Accessed bit in the Descriptor Block Control Word (bit 4). The core will set the BAC bit at the end of message processing to indicate processing status to the host or subsystem. The host or subsystem must initialize this bit to 0. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_LoadTxDataBlock (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, const uint16_t datablock[32]) |
Sets the 32 Data Words to be transmitted when a RT-BC message is received. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ReadTxDataBlock (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, uint16_t outdatablock[32]) |
Retrieves the 32 Data Words to be transmitted when a RT-BC message is received. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ReadRxDataBlock (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, uint16_t *outwordcnt, uint16_t *outtimestamp, uint16_t outdatablock[32]) |
Retrieves the 32 Data Words received from a BC-RT message. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_LoadTxCircBuffer (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, int32_t wordcount, uint16_t *data) |
Loads the circular buffer with data of size given by the word count. In the buffer, the address, at which the data gets written, is maintained by an internal pointer. This pointer advances by the amount given by 2 + wordcount (message information word + timetag + payload) after the data is written to the buffer. If the pointer advances beyond the end of the buffer region, the pointer goes to the start of the buffer. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ReadTxCircBuffer (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, int32_t wordcount, uint16_t *outdata) |
Retrieves the data of size given by the word count from the Tx circular buffer for the given subaddress. An internal pointer determines the starting address in the buffer from which to read. Each successful call to naibrd_SUM1553_RT_AdvCircBufInternalPtr() will advance the internal pointer to the next available address. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_ReadRxCircBuffer (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr, uint16_t *outwordcnt, uint16_t *outtimestamp, uint16_t *outdata) |
Retrieves the data of size given by the word count from the Rx circular buffer for the given subaddress. An internal pointer determines the starting address in the buffer from which to read. Each successful call to naibrd_SUM1553_RT_AdvCircBufInternalPtr() will advance the internal pointer to the next available address. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_AdvCircBufInternalPtr (int32_t cardIndex, int32_t module, int32_t channel, bool_t sadatablock, uint16_t addr) |
This function advances the circular buffer read internal pointer to the next available address. If the next available address is past the end of the circular buffer, the pointer will be set to the starting address of the circular buffer. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SUM1553_RT_SetSAMCInterruptMask (int32_t cardIndex, int32_t module, int32_t channel, nai_sum1553_samctype_t samctype, uint16_t samc, nai_sum1553_sa_irq_t mask) |
Sets the Interrupt when Accessed (IWA) bit (bit 6) or Interrupt Broadcast Received (IBRD) bit (bit 5) in Descriptor Block Control Word. If the IWA bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code command is received. If the IBRD bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code broadcast command is received. The interrupt will be entered into the Pending Interrupt register (Core Register 4) if not masked. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_AdvCircBufInternalPtr | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr ) |
This function advances the circular buffer read internal pointer to the next available address. If the next available address is past the end of the circular buffer, the pointer will be set to the starting address of the circular buffer.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ClearBlockAccess | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_sum1553_samctype_t | samctype, | ||
uint16_t | samc ) |
Clears Block Accessed bit in the Descriptor Block Control Word (bit 4). The core will set the BAC bit at the end of message processing to indicate processing status to the host or subsystem. The host or subsystem must initialize this bit to 0.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
samctype | : (Input) Subaddress or Mode Type. Descriptor Blocks Subaddress/Mode Type ------------------------- ------------------------------- Subaddress Receive Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_RX Subaddress Transmit Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_TX Mode Code Receive Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_RX Mode Code Transmit Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_TX |
samc | : (Input) SubAddress or Mode Code. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ConfigureForPingPong | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Configures the Remote Terminal Descriptor Table to support Ping Pong mode for the specified 1553 channel.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_GetAddress | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint8_t * | outaddress ) |
Gets the Remote Terminal Address in the Operation and Status register (Core Register 1, bits 15:11 for RT Address).
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
outaddress | : (Output) Remote Terminal Address. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_GetBusEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | outaenable, | ||
bool_t * | outbenable ) |
Retrieves the Control Register Bus A Enable (BAEN) and Bus B Enable (BBEN) bits (Core Register 0, bit 12:11) state. When broadcast is disables, RT Address 31 can be used as an RT address, otherwise it is used for 1553 broadcast mode.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
outaenable | : (Output) Enabled (1) or disabled (0) Bus A. |
outbenable | : (Output) Enabled (1) or disabled (0) Bus B. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_GetControlWord | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_sum1553_samctype_t | samctype, | ||
uint16_t | samc, | ||
uint16_t * | outctrl ) |
Retrieves the Descriptor Block Control Word. The control word is used by the core in message processing and is initialized by the host or subsystem. The core updates the control word during command post-processing to provide the host or subsystem details about the transaction.
Control Word format: - Index (bits 15:8) - For received message processing, the Index bits define the depth of the core's multiple-message buffer. The value can range from 0 to 255. As the core does not buffer messages during ping-pong mode, the setting of Index is invalid and should be initialized to 0. Each time a message is transacted wwith no errors (and the particular mode code or subaddress has not been illegalized), the value of Index is decremented by 1. If the Index Equal Zero bit (bit 7) is enabled, the core will generate an interrupt as the Index is decremented from 1 to 0. - Interrupt equals Zero (INTX) (bit 7) - For received message processing, if this bit is set to 1, the core will generate an interrupt as Index is decremented from 1 to 0. The interrupt will be entered into the Pending Interrupt register (Core Register 4) if not masked. This is not used for transmit message processing. - Interrupt when Accessed (IWA) (bit 6) - if this bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code command is received. The interrupt will be entered into the Pending Interrupt register (Core Register 4) if not masked. - Interrupt Broadcast Received (IBRD) (bit 5) - if this bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code broadcast command is received. The interrupt will be entered into the Pending Interrupt register (Core Register 4) if not masked. - Block Accessed (BAC) (bit 4) - the core will set the BAC bit at the end of message processing to indicate processing status to the host or subsystem. The host or subsystem must initialize this bit to 0. - A or B Buffer (bit 2) - if buffer ping-pong is enabled, the host can set this bit to indicate which buffer is the primary, otherwise A/B is not used. A logic 1 designates buffer A as the primary; logic 0 designates buffer B. - Broadcast (BRD) (bit 1) - the core sets this bit to indicate reception of a valid broadcast command. - Notice II (NII) (bit 0) - For received message processing, if set to 1, NII enables data segregation of broadcast and non-broadcast data by enabling the use of a broadcast data pointer. If set to 0, broadcast data is stored using the data pointer A. This is not used for transmit message processing.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
samctype | : (Input) Subaddress or Mode Type. Descriptor Blocks Subaddress/Mode Type ------------------------- ------------------------------- Subaddress Receive Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_RX Subaddress Transmit Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_TX Mode Code Receive Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_RX Mode Code Transmit Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_TX |
samc | : (Input) SubAddress or Mode Code. |
outctrl | : (Output) Descriptor Block Control Word. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_GetPingPongEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | outenabled ) |
Retrieves the Control Register Ping-Pong Enable (PPEN) bit (Core Register 0, bit 2) state.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
outenabled | : (Output) Enabled (1) or disabled (0) Ping Pong. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_GetPingPongEnabled | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | outenabled ) |
Retrieves the Control Register Message Time-out (MSGTO) bit (Core Register 0, bit 9) state. For RT operation, when ping-pong buffer mode is enabled, the MSGTO bit set to 1 serves to acknowledge to the host that ping-pong mode has been enabled. When the bit is set to 0 serves to acknowledge to the host that the ping-pong mode has been disabled.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
outenabled | : (Output) Enabled (1) or disabled (0) Ping Pong. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_Legalize | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_sum1553_samctype_t | samctype, | ||
uint32_t | samcmask, | ||
bool_t | legal ) |
Sets up the legalization registers (Core Register 16-31) which are used by the RT to determine which valid, received commands are legal. A command determined to be illegal if it is supported by neither by the standard nor by additional system requirements. Note, the actual value written to the legalization registers is defined as follows: '1' illegalizes a command and '0' legalizes a command.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
samctype | : (Input) NAI_SUM1553_SAMCTYPE_RX (Receive Subaddress) or NAI_SUM1553_SAMCTYPE_TX (Transmit Subaddress). |
samcmask | : (Input) SubAddress Mask - each bit represents the subaddress the legal state will be applied to. |
legal | : (Input) 1 to set the Subaddress to legal, 0 to set the subaddress to illegal. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_LoadTxCircBuffer | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
int32_t | wordcount, | ||
uint16_t * | data ) |
Loads the circular buffer with data of size given by the word count. In the buffer, the address, at which the data gets written, is maintained by an internal pointer. This pointer advances by the amount given by 2 + wordcount (message information word + timetag + payload) after the data is written to the buffer. If the pointer advances beyond the end of the buffer region, the pointer goes to the start of the buffer.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (Input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
wordcount | : (Input) Payload Word Count. |
data | : (Input) Payload. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_LoadTxDataBlock | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
const uint16_t | datablock[32] ) |
Sets the 32 Data Words to be transmitted when a RT-BC message is received.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
datablock | : (Input) Data Words to be transmitted to BC. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ReadRxCircBuffer | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
uint16_t * | outwordcnt, | ||
uint16_t * | outtimestamp, | ||
uint16_t * | outdata ) |
Retrieves the data of size given by the word count from the Rx circular buffer for the given subaddress. An internal pointer determines the starting address in the buffer from which to read. Each successful call to naibrd_SUM1553_RT_AdvCircBufInternalPtr() will advance the internal pointer to the next available address.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
outwordcnt | : (Output) Word Count of payload given in the MIW. |
outtimestamp | : (Output) Message Time Stamp. |
outdata | : (Output) Data Words in the received payload. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ReadRxDataBlock | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
uint16_t * | outwordcnt, | ||
uint16_t * | outtimestamp, | ||
uint16_t | outdatablock[32] ) |
Retrieves the 32 Data Words received from a BC-RT message.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
outwordcnt | : (Output) BC-RT Word Count. |
outtimestamp | : (Output) BC-RT Timestamp. |
outdatablock | : (Output) BC-RT Data Words. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ReadTxCircBuffer | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
int32_t | wordcount, | ||
uint16_t * | outdata ) |
Retrieves the data of size given by the word count from the Tx circular buffer for the given subaddress. An internal pointer determines the starting address in the buffer from which to read. Each successful call to naibrd_SUM1553_RT_AdvCircBufInternalPtr() will advance the internal pointer to the next available address.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
wordcount | : (Input) Payload Word Count. |
outdata | : (Output) Payload Data Words. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_ReadTxDataBlock | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | sadatablock, | ||
uint16_t | addr, | ||
uint16_t | outdatablock[32] ) |
Retrieves the 32 Data Words to be transmitted when a RT-BC message is received.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
sadatablock | : (input) SubAddress(1) or Mode Code (0). |
addr | : (Input) SubAddress or Mode Code. |
outdatablock | : (Output) Data Words to be transmitted to BC. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_SetAddress | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint8_t | address ) |
Sets the Remote Terminal Address and RT Address Parity in the Operation and Status register (Core Register 1, bits 15:11 for RT Address and bit 10 (RT Address Parity).
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
address | : (Input) Remote Terminal Address. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_SetBusEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | aenable, | ||
bool_t | benable ) |
Sets the Control Register Bus A Enable (BAEN) and Bus B Enable (BBEN) bits (Core Register 0, bit 12:11) state. When broadcast is disables, RT Address 31 can be used as an RT address, otherwise it is used for 1553 broadcast mode.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
aenable | : (Input) Enable (1) or disable (0) Bus A. |
benable | : (Input) Enable (1) or disable (0) Bus B. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_SetPingPongEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | enabled ) |
Sets the Control Register Ping-Pong Enable (PPEN) bit (Core Register 0, bit 2) state.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
enabled | : (Input) Enable (1) or disable (0) Ping Pong. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_SetSAMCInterruptMask | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_sum1553_samctype_t | samctype, | ||
uint16_t | samc, | ||
nai_sum1553_sa_irq_t | mask ) |
Sets the Interrupt when Accessed (IWA) bit (bit 6) or Interrupt Broadcast Received (IBRD) bit (bit 5) in Descriptor Block Control Word. If the IWA bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code command is received. If the IBRD bit is set to 1, the core will generate an interrupt when a valid subaddress or mode code broadcast command is received. The interrupt will be entered into the Pending Interrupt register (Core Register 4) if not masked.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
samctype | : (Input) Subaddress or Mode Type. Descriptor Blocks Subaddress/Mode Type ------------------------- ------------------------------- Subaddress Receive Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_RX Subaddress Transmit Block NAI_SUM1553_SAMCTYPE_SA|NAI_SUM1553_SAMCTYPE_TX Mode Code Receive Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_RX Mode Code Transmit Block NAI_SUM1553_SAMCTYPE_MC|NAI_SUM1553_SAMCTYPE_TX |
samc | : (Input) SubAddress or Mode Code. |
mask | : (Input) NAI_SUM1553_SA_IRQ_ACCESS and/or NAI_SUM1553_SA_IRQ_BCAST. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SUM1553_RT_SetStatusWord | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint16_t | rtstatus ) |
Sets the 1553 A/B Status Word register (Core Register 9) value. For both MIL-STD-1553A and B applications, this register contains the value for the status word. The host or subsystem controls the outgoing MIL-STD-1553 status word by setting the various status bits. If the Immediate Clear function is enabled (bit 15), then the status bits are automatically cleared after status word transmission. The Immediate Clear function does not alter the operation of the Trasmit Status word and Transmit Last Command Word mode codes.
The following are the 1553B Status Word bit definitions: - Immediate Clear Enable (IMCLR) (bit 15) - Setting this bit enables the Immediate Clear function to clear the INS, SRQ, BUSY, SSYSF and TF bits immediately after a message is completed. - Instrumentation (INS) (bit 9) - assets Status Word Instrumentation bit (bit 10). - Service Request (SRQ) (bit 8) - assets Status Word Service Request bit (bit 11). - Busy (BUSY) (bit 3) - asserts Status Word Busy bit (bit 16). Setting this bit prevents memory access. - Subsystem Flag (SSYSF) (bit 2) - asserts Status Word SubSystem Flag bit (bit 17). - Terminal Flag (TF) (bit 0) - asserts the Status Word Terminal Flag bit (bit 19). Inhibit Terminal Flag mode code prevents the host or subsystem assertion. The following are the 1553A Status Word bit definitions: - Immediate Clear Enable (IMCLR) (bit 15) - Setting this bit enables the Immediate Clear function to clear Status Word bits 19:10 after a Status Word transmission. Note, exercise caution when using this bit as once set, it will remain set until cleared. - Status Word Bits (bit 9:0) - sets 1553A Status Word bits 10:19.
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]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
rtstatus | : (Input) Status Word. |