Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_Initialize (int16_t swDevice, uint16_t wAccess, uint16_t wMode, uint32_t dwSizeOfAllocatedMemory, uint32_t dwRegistersAddress, uint32_t dwMemoryAddress) |
Initializes hardware resources such as memory and register space for a particular mode of operation. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_Free (int16_t swDevice) |
Frees all resources used by the hardware based on the type of access used. | |
NAIBRDFUNC uint16_t NAIAPI | naibrd_1553_ReadReg (int16_t swDevice, uint32_t wRegisterAddress) |
Reads a register on the device at the specified memory location. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_WriteReg (int16_t swDevice, uint32_t wRegisterAddress, uint16_t wRegisterValue) |
Writes to the specified register location. | |
NAIBRDFUNC uint16_t NAIAPI | naibrd_1553_ReadAuxReg (int16_t swDevice, uint32_t wAuxRegisterAddress) |
Reads an Auxiliary register on the device at the specified memory location. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_WriteAuxReg (int16_t swDevice, uint32_t wAuxRegisterAddress, uint16_t wAuxRegisterValue) |
Writes to the specified auxiliary register location. | |
NAIBRDFUNC uint32_t NAIAPI | naibrd_1553_ReadIntReg (int16_t swDevice, uint32_t wIntRegisterAddress) |
Reads an Interrupt register on the device at the specified memory location. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_WriteIntReg (int16_t swDevice, uint32_t wIntRegisterAddress, uint32_t wIntRegisterValue) |
Writes to the specified interrupt register location. | |
NAIBRDFUNC uint16_t NAIAPI | naibrd_1553_ReadMem (int16_t swDevice, uint32_t wDeviceMemoryAddress) |
Reads a memory location. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_WriteMem (int16_t swDevice, uint32_t wDeviceMemoryAddress, uint16_t wDeviceMemoryValue) |
Writes to the specified memory location. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_ReadMemMultiple (int16_t swDevice, uint32_t wDeviceMemoryAddress, uint16_t wBufferSize, uint16_t *wapBuffer) |
Reads from a block of core memory starting from the specified memory location. This function is only supported in the assisted module. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_WriteMemMultiple (int16_t swDevice, uint32_t wDeviceMemoryAddress, uint16_t wBufferSize, uint16_t *wapBuffer) |
Writes to a block of core memory starting from the specified memory location. This function is only supported in the assisted module. | |
NAIBRDFUNC char_t *NAIAPI | naibrd_1553_GetBlockStatusWordErrorString (uint16_t wMode, uint16_t wBlockStatus) |
Build and return a string in which the designated errors are textually reported. If no error is designated, a null string is returned. | |
NAIBRDFUNC char_t *NAIAPI | naibrd_1553_GetMessageTypeString (uint16_t wMessageType) |
Build and return a text string describing given message type. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetTimeTag (int16_t swDevice, uint16_t wTimeTag) |
Sets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_GetTimeTag (int16_t swDevice, uint16_t *wpTimeTag) |
Gets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_ResetTimeTag (int16_t swDevice) |
Resets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetTimeTagResolution (int16_t swDevice, uint16_t wTimeTagResolution) |
Sets the time tag resolution of the device. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_ConfigureOperationalStatistics (int16_t swDevice, uint16_t bIsOperationalStatisticsCollected) |
Configure whether operational statistics shall be collected for given device. These operational statistics include GPQ fullness statistics. NOTE: This function is currently not supported for FTJ/FTK modules. Note: Collected operational statistics isn't reset in case operational statistics collection is turned on/off. Collected operational statistics simply aren't updated while collection is off. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetIrqConfig (int16_t swDevice, uint16_t wInterruptMode, uint16_t wAutoClear) |
Sets the type of interrupt signal to be generated by the device. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetIrqManipulate (int16_t swDevice, uint16_t bIsInterruptEnabled, uint32_t dwIrqMask, void(*funcpExternalIsr)(void *param, uint32_t vector)) |
Enables the interrupt conditions specified by the interrupt mask. NOTE: This function is not supported for FTJ/FTK modules. Please use naibrd_1760_SetIrqManipulate instead. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetInterruptSteering (int16_t swDevice, naibrd_int_steering_t steering) |
Sets the Interrupt Steering which indicates the interrupt direction for the 1553 device. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetIntVector (int16_t swDevice, int32_t intvector) |
Set the interrupt vector for 1553 device. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_GetIntStatus (int16_t swDevice, uint16_t *status1, uint16_t *status2) |
Reads the interrupt status registers #1 and #2. NOTE: This function is not supported for FTJ/FTK modules. Please use naibrd_1760_GetIntStatus instead. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_ClearIntLatch (int16_t swDevice) |
Clears the interrupt latch register. When an interrupt is generated by the core, bit 0 of the latch register is set high. This must be cleared by writing a '1' to the bit in order to receive more interrupts. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetClockFrequency (int16_t swDevice, uint16_t wClockFrequency) |
Sets the hardware clock input frequency. This function has no effect in the FTx module. NOTE: This function is not supported in FTJ/FTK modules. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetResponseTimeout (int16_t swDevice, uint16_t wResponseTimeout) |
Sets the RT response timeout timer. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_ConfigureWatchdogTimeout (int16_t swDevice, uint16_t bIsWatchdogEnabled, uint16_t wWatchdogTimeout) |
Configure the watchdog timeout for given device, that is, either enable and set it to given timeout, or disable it, as requested. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetDecoderConfig (int16_t swDevice, uint16_t wDecodedInput, uint16_t wExpendedXingOption) |
Configure the Manchester-II decoder. NOTE: This function is not supported in FTJ/FTK modules. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_SetRamParityCheck (int16_t swDevice, uint16_t wRamParityCheckEnabler) |
Enable or disable RAM parity checking. NOTE: This function is not supported in FTJ/FTK modules. | |
NAIBRDFUNC nai_1553_t NAIAPI | naibrd_1553_InternalLoopback (int32_t cardIndex, int32_t module, int32_t channel, bool_t *busAPassed, bool_t *busBPassed) |
Execute internal loopback test. This may be useful for startup BIT to verify transceiver and other hardware capabilities. If this test is to be executed on a particular channel, this function should be called prior to naibrd_1553_Open(). | |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_ClearIntLatch | ( | int16_t | swDevice | ) |
Clears the interrupt latch register. When an interrupt is generated by the core, bit 0 of the latch register is set high. This must be cleared by writing a '1' to the bit in order to receive more interrupts.
swDevice | : (Input) Logical Device Number (0-31). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_ConfigureOperationalStatistics | ( | int16_t | swDevice, |
uint16_t | bIsOperationalStatisticsCollected ) |
Configure whether operational statistics shall be collected for given device. These operational statistics include GPQ fullness statistics. NOTE: This function is currently not supported for FTJ/FTK modules. Note: Collected operational statistics isn't reset in case operational statistics collection is turned on/off. Collected operational statistics simply aren't updated while collection is off.
Equivalent DDC definition: aceSetMetrics
swDevice | : (Input) Logical Device Number (0-31). |
bIsOperationalStatisticsCollected | : (Input) A flag that says whether operational statistics should be collected with this device. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_ConfigureWatchdogTimeout | ( | int16_t | swDevice, |
uint16_t | bIsWatchdogEnabled, | ||
uint16_t | wWatchdogTimeout ) |
Configure the watchdog timeout for given device, that is, either enable and set it to given timeout, or disable it, as requested.
swDevice | : (Input) Logical Device Number (0-31). |
bIsWatchdogEnabled | : (Input) A flag that says if the watchdog should be enabled or not. |
wWatchdogTimeout | : (Input) The watchdog timeout (in units of 100us) to set for given device. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_Free | ( | int16_t | swDevice | ) |
Frees all resources used by the hardware based on the type of access used.
swDevice | : (Input) Logical Device Number (0-31). |
NAIBRDFUNC char_t *NAIAPI naibrd_1553_GetBlockStatusWordErrorString | ( | uint16_t | wMode, |
uint16_t | wBlockStatus ) |
Build and return a string in which the designated errors are textually reported. If no error is designated, a null string is returned.
Note:
Equivalent DDC definition: aceGetBSWErrString
wMode | : (Input) Operation mode. |
wBlockStatus | (Input) A block status word that typically designates one or more errors. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_GetIntStatus | ( | int16_t | swDevice, |
uint16_t * | status1, | ||
uint16_t * | status2 ) |
Reads the interrupt status registers #1 and #2. NOTE: This function is not supported for FTJ/FTK modules. Please use naibrd_1760_GetIntStatus instead.
swDevice | : (Input) Logical Device Number (0-31). |
status1 | : (Output) Interrupt Status Register #1. This value will be an OR'ed combination of the following: NAI_1553_INT_REG1_MASK_END_OF_MESSAGE Bit 0. End of message (BC, RT and MT). NAI_1553_INT_REG1_MASK_BC_STATUS_SET Bit 1. RT status received with incorrect RT address. NAI_1553_INT_REG1_MASK_RT_MODE_CODE Bit 1. Mode code message received. NAI_1553_INT_REG1_MASK_MT_PATTERN_TRIGGER Bit 1. Pattern Trigger interrupt if command word matches bit pattern in the Monitor Trigger Register. NAI_1553_INT_REG1_MASK_FORMAT_ERROR Bit 2. Loop test failure or message error. NAI_1553_INT_REG1_MASK_BC_END_OF_FRAME Bit 3. In non-enhanced BC mode, end of message frame. NAI_1553_INT_REG1_MASK_BC_END_OF_MESSAGE Bit 4. BC end of message. NAI_1553_INT_REG1_MASK_RT_SUBADDRESS_END_OF_MESSAGE Bit 4. RT subaddress end of message. NAI_1553_INT_REG1_MASK_RT_CIRCULAR_BUFFER_ROLLOVER Bit 5. RT circular buffer rollover. NAI_1553_INT_REG1_MASK_TIME_TAG_ROLLOVER Bit 6. Time tag register rollover. NAI_1553_INT_REG1_MASK_RT_ADDRESS_PARITY_ERROR Bit 7. RT address parity error. NAI_1553_INT_REG1_MASK_BC_RETRY Bit 8. BC message retry. NAI_1553_INT_REG1_MASK_HANDSHAKE_FAILURE Bit 9. Handshake timeout. NAI_1553_INT_REG1_MASK_MT_DATA_STACK_ROLLOVER Bit 10. Data stack rollover. NAI_1553_INT_REG1_MASK_MT_COMMAND_STACK_ROLLOVER Bit 11. MT command stack rollover. NAI_1553_INT_REG1_MASK_BC_RT_COMMAND_STACK_ROLLOVER Bit 12. BC/RT command stack rollover. NAI_1553_INT_REG1_MASK_BC_RT_TRANSMITTER_TIMEOUT Bit 13. BC/RT Tx timeout. NAI_1553_INT_REG1_MASK_RAM_PARITY_ERROR Bit 14. RAM parity error. NAI_1553_INT_REG1_MASK_MASTER_INTERRUPT Bit 15. Master Interrupt (Indicates pending hardware interrupt). |
status2 | : (Output) Interrupt Status Register #2. This value will be an OR'ed combination of the following: NAI_1553_INT_REG2_MASK_INTERRUPT_CHAIN Bit 0. Indicates Interrupt Register #1 is requesting interrupt. NAI_1553_INT_REG2_MASK_BUILT_IN_TEST_COMPLETE Bit 1. Built in test complete. NAI_1553_INT_REG2_MASK_BC_IRQ0 Bit 2. BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ1 Bit 3. BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ2 Bit 4. BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ3 Bit 5. BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_MT_DATA_STACK_HALF_ROLLOVER Bit 6. MT data stack 50% full. NAI_1553_INT_REG2_MASK_MT_COMMAND_STACK_HALF_ROLLOVER Bit 7. MT command stack 50% full. NAI_1553_INT_REG2_MASK_RT_CIRCULAR_BUFFER_HALF_ROLLOVER Bit 8. RT circular buffer rollover. NAI_1553_INT_REG2_MASK_RT_COMMAND_STACK_HALF_ROLLOVER Bit 9. RT command stack rollover. NAI_1553_INT_REG2_MASK_BC_TRAP Bit 10. BC trap - illegal opcode or watchdog timeout. NAI_1553_INT_REG2_MASK_BC_CALL_STACK_ERROR Bit 11. BC call stack overflow/underflow error. NAI_1553_INT_REG2_MASK_GPQ_ISQ_ROLLOVER Bit 12. BC GPQ rollover/RT ISQ rollover. NAI_1553_INT_REG2_MASK_RT_ILLEGAL_COMMAND Bit 13. RT received illegal message. NAI_1553_INT_REG2_MASK_BC_OPCODE_PARITY_ERROR Bit 14. BC instruction opcode parity error. NAI_1553_INT_REG2_MASK_MASTER_INTERRUPT Bit 15. Master Interrupt (Indicates pending hardware interrupt). |
NAIBRDFUNC char_t *NAIAPI naibrd_1553_GetMessageTypeString | ( | uint16_t | wMessageType | ) |
Build and return a text string describing given message type.
Note:
Equivalent DDC definition: aceGetMsgTypeString
wMessageType | : (Input) Message Type. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_GetTimeTag | ( | int16_t | swDevice, |
uint16_t * | wpTimeTag ) |
Gets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned.
swDevice | : (Input) Logical Device Number (0-31). |
wpTimeTag | : (Output) Time Tag Value. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_Initialize | ( | int16_t | swDevice, |
uint16_t | wAccess, | ||
uint16_t | wMode, | ||
uint32_t | dwSizeOfAllocatedMemory, | ||
uint32_t | dwRegistersAddress, | ||
uint32_t | dwMemoryAddress ) |
Initializes hardware resources such as memory and register space for a particular mode of operation.
swDevice | : (Input) Logical Device Number (0-31). |
wAccess | : (Input) Specifies the type of access to be used by the device (NAI_1553_ACCESS_CARD, NAI_1553_ACCESS_SIM, NAI_1553_ACCESS_USR). |
wMode | : (Input) Specifies the mode of operation that the device is to be initialized to. NAI_1553_MODE_BC Sets up the device to run as a bus controller NAI_1553_MODE_RT Sets up the device to run as a remote terminal NAI_1553_MODE_MT Sets up the device to run as a monitor NAI_1553_MODE_RTMT Sets up the device to run in combination remote terminal and monitor modeTo enable retrieval of messages via the 1553 Message FIFO, the wMode should be OR'ed with NAI_1553_MESSAGE_FIFO_MODE. When this mode is enabled, the following functions are disabled: naibrd_1553_BcGetMessageByIdRaw naibrd_1553_BcMessageGetByIdDecoded naibrd_1553_RtMessageGetFromStackRaw naibrd_1553_RtMessageGetFromStackDecoded naibrd_1553_MtMessageGetFromStackRaw naibrd_1553_MtMessageGetFromStackDecoded |
dwSizeOfAllocatedMemory | : (Input) Unused. |
dwRegistersAddress | : (Input) Unused. |
dwMemoryAddress | : (Input) Unused. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_InternalLoopback | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | busAPassed, | ||
bool_t * | busBPassed ) |
Execute internal loopback test. This may be useful for startup BIT to verify transceiver and other hardware capabilities. If this test is to be executed on a particular channel, this function should be called prior to naibrd_1553_Open().
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]). |
busAPassed | : (Output) Bus A Loopback Test Result: Pass = TRUE (1), Fail = FALSE (0). |
busBPassed | : (Output) Bus B Loopback Test Result: Pass = TRUE (1), Fail = FALSE (0). |
NAIBRDFUNC uint16_t NAIAPI naibrd_1553_ReadAuxReg | ( | int16_t | swDevice, |
uint32_t | wAuxRegisterAddress ) |
Reads an Auxiliary register on the device at the specified memory location.
swDevice | : (Input) Logical Device Number (0-31). |
wAuxRegisterAddress | (Input) Specifies the register address to be read (0-15). |
NAIBRDFUNC uint32_t NAIAPI naibrd_1553_ReadIntReg | ( | int16_t | swDevice, |
uint32_t | wIntRegisterAddress ) |
Reads an Interrupt register on the device at the specified memory location.
swDevice | : (Input) Logical Device Number (0-31). |
wIntRegisterAddress | (Input) Specifies the register address to be read (0-3). |
NAIBRDFUNC uint16_t NAIAPI naibrd_1553_ReadMem | ( | int16_t | swDevice, |
uint32_t | wDeviceMemoryAddress ) |
Reads a memory location.
swDevice | : (Input) Logical Device Number (0-31). |
wDeviceMemoryAddress | (Input) Specifies the the memory location to read. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_ReadMemMultiple | ( | int16_t | swDevice, |
uint32_t | wDeviceMemoryAddress, | ||
uint16_t | wBufferSize, | ||
uint16_t * | wapBuffer ) |
Reads from a block of core memory starting from the specified memory location. This function is only supported in the assisted module.
swDevice | : (Input) Logical Device Number (0-31). |
wDeviceMemoryAddress | (Input) Specifies the starting core memory location to read from. |
wBufferSize | (Input) Specifies the size of the data block to write. Maximum size supported is 512. |
wapBuffer | (Output) Output array containing read data. The array size must be greater than or equal to wBufferSize. |
NAIBRDFUNC uint16_t NAIAPI naibrd_1553_ReadReg | ( | int16_t | swDevice, |
uint32_t | wRegisterAddress ) |
Reads a register on the device at the specified memory location.
swDevice | : (Input) Logical Device Number (0-31). |
wRegisterAddress | (Input) Specifies the register address to be read (0-63). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_ResetTimeTag | ( | int16_t | swDevice | ) |
Resets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned.
swDevice | : (Input) Logical Device Number (0-31). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetClockFrequency | ( | int16_t | swDevice, |
uint16_t | wClockFrequency ) |
Sets the hardware clock input frequency. This function has no effect in the FTx module. NOTE: This function is not supported in FTJ/FTK modules.
swDevice | : (Input) Logical Device Number (0-31). |
wClockFrequency | : (Input) Clock Frequency to set (NAI_1553_CLOCK_16MHZ, NAI_1553_CLOCK_12MHZ, NAI_1553_CLOCK_20MHZ, NAI_1553_CLOCK_10MHZ). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetDecoderConfig | ( | int16_t | swDevice, |
uint16_t | wDecodedInput, | ||
uint16_t | wExpendedXingOption ) |
Configure the Manchester-II decoder. NOTE: This function is not supported in FTJ/FTK modules.
swDevice | : (Input) Logical Device Number (0-31). |
wDecodedInput | : (Input) Select Input Type (NAI_1553_INPUT_SINGLE_ENDED, NAI_1553_INPUT_DOUBLE_ENDED). |
wExpendedXingOption | : (Input) Select Sampling Method (NAI_1553_EXPANDED_XING_DISABLE, NAI_1553_EXPANDED_XING_ENABLE). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetInterruptSteering | ( | int16_t | swDevice, |
naibrd_int_steering_t | steering ) |
Sets the Interrupt Steering which indicates the interrupt direction for the 1553 device.
swDevice | : (Input) Logical Device Number (0-31). |
steering | : (Input) Interrupt Steering: refer to naibrd_int_steering_t definition. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetIntVector | ( | int16_t | swDevice, |
int32_t | intvector ) |
Set the interrupt vector for 1553 device.
swDevice | : (Input) Logical Device Number (0-31). |
intvector | : (Input) Interrupt vector. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetIrqConfig | ( | int16_t | swDevice, |
uint16_t | wInterruptMode, | ||
uint16_t | wAutoClear ) |
Sets the type of interrupt signal to be generated by the device.
swDevice | : (Input) Logical Device Number (0-31). |
wInterruptMode | : (Input) Interrupt Operation Mode Select (NAI_1553_IRQ_MODE_LEVEL, NAI_1553_IRQ_MODE_PULSE). |
wAutoClear | : (Input) Register Read and Clear Operation Mode Select (NAI_1553_IRQ_AUTO_CLEAR, NAI_1553_IRQ_NO_AUTO_CLEAR). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetIrqManipulate | ( | int16_t | swDevice, |
uint16_t | bIsInterruptEnabled, | ||
uint32_t | dwIrqMask, | ||
void(* | funcpExternalIsr )(void *param, uint32_t vector) ) |
Enables the interrupt conditions specified by the interrupt mask. NOTE: This function is not supported for FTJ/FTK modules. Please use naibrd_1760_SetIrqManipulate instead.
swDevice | : (Input) Logical Device Number (0-31). |
bIsInterruptEnabled | : (Input) Enable or disable interrupts. |
dwIrqMask | : (Input) Bit mask to set the desired interrupt bits in the interrupt registers. The following bit masks, which correspond to a bit in the interrupt registers 1 and 2, may be logically OR'ed together to enable or disable multiple interrupt conditions. NAI_1553_INT_REG1_MASK_END_OF_MESSAGE End of message (BC, RT and MT). NAI_1553_INT_REG1_MASK_BC_STATUS_SET RT status received with incorrect RT address. NAI_1553_INT_REG1_MASK_RT_MODE_CODE Mode code message received. NAI_1553_INT_REG1_MASK_MT_PATTERN_TRIGGER Pattern Trigger interrupt if command word matches bit pattern in the Monitor Trigger Register. NAI_1553_INT_REG1_MASK_FORMAT_ERROR Loop test failure or message error. NAI_1553_INT_REG1_MASK_BC_END_OF_FRAME In non-enhanced BC mode, end of message frame. NAI_1553_INT_REG1_MASK_BC_END_OF_MESSAGE BC end of message. NAI_1553_INT_REG1_MASK_RT_SUBADDRESS_END_OF_MESSAGE RT subaddress end of message. NAI_1553_INT_REG1_MASK_RT_CIRCULAR_BUFFER_ROLLOVER RT circular buffer rollover. NAI_1553_INT_REG1_MASK_TIME_TAG_ROLLOVER Time tag register rollover. NAI_1553_INT_REG1_MASK_RT_ADDRESS_PARITY_ERROR RT address parity error. NAI_1553_INT_REG1_MASK_BC_RETRY BC message retry. NAI_1553_INT_REG1_MASK_HANDSHAKE_FAILURE Handshake timeout. NAI_1553_INT_REG1_MASK_MT_DATA_STACK_ROLLOVER Data stack rollover. NAI_1553_INT_REG1_MASK_MT_COMMAND_STACK_ROLLOVER MT command stack rollover. NAI_1553_INT_REG1_MASK_BC_RT_COMMAND_STACK_ROLLOVER BC/RT command stack rollover. NAI_1553_INT_REG1_MASK_BC_RT_TRANSMITTER_TIMEOUT BC/RT Tx timeout. NAI_1553_INT_REG1_MASK_RAM_PARITY_ERROR RAM parity error. NAI_1553_INT_REG2_MASK_BUILT_IN_TEST_COMPLETE Built in test complete. NAI_1553_INT_REG2_MASK_BC_IRQ0 BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ1 BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ2 BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_BC_IRQ3 BC IRQ h/w instruction generated. NAI_1553_INT_REG2_MASK_MT_DATA_STACK_HALF_ROLLOVER MT data stack 50% full. NAI_1553_INT_REG2_MASK_MT_COMMAND_STACK_HALF_ROLLOVER MT command stack 50% full. NAI_1553_INT_REG2_MASK_RT_CIRCULAR_BUFFER_HALF_ROLLOVER RT circular buffer rollover. NAI_1553_INT_REG2_MASK_RT_COMMAND_STACK_HALF_ROLLOVER RT command stack rollover. NAI_1553_INT_REG2_MASK_BC_TRAP BC trap - illegal opcode or watchdog timeout. NAI_1553_INT_REG2_MASK_BC_CALL_STACK_ERROR BC call stack overflow/underflow error. NAI_1553_INT_REG2_MASK_GPQ_ISQ_ROLLOVER BC GPQ rollover/RT ISQ rollover. NAI_1553_INT_REG2_MASK_RT_ILLEGAL_COMMAND RT received illegal message. NAI_1553_INT_REG2_MASK_BC_OPCODE_PARITY_ERROR BC instruction opcode parity error. |
funcpExternalIsr | : (Input) The ISR callback function to be called when the device generates an interrupt. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetRamParityCheck | ( | int16_t | swDevice, |
uint16_t | wRamParityCheckEnabler ) |
Enable or disable RAM parity checking. NOTE: This function is not supported in FTJ/FTK modules.
swDevice | : (Input) Logical Device Number (0-31). |
wRamParityCheckEnabler | : (Input) Select RAM Checking Operation (NAI_1553_PARITY_CHECK_ENABLE, NAI_1553_PARITY_CHECK_DISABLE). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetResponseTimeout | ( | int16_t | swDevice, |
uint16_t | wResponseTimeout ) |
Sets the RT response timeout timer.
swDevice | : (Input) Logical Device Number (0-31). |
wResponseTimeout | : (Input) Message RT Response Timeout FT[1-9] module: NAI_1553_RESP_TIMEOUT_18US BC Response timeout of 18.5us NAI_1553_RESP_TIMEOUT_22US BC Response timeout of 22.5us NAI_1553_RESP_TIMEOUT_50US BC Response timeout of 50.5us NAI_1553_RESP_TIMEOUT_130US BC Response timeout of 130us FTJ/FTK module: NAI_1760_BC_RESP_TIMEOUT_17US BC Response timeout of 17.0us NAI_1760_BC_RESP_TIMEOUT_22US BC Response timeout of 22.0us NAI_1760_BC_RESP_TIMEOUT_60US BC Response timeout of 60.0us NAI_1760_BC_RESP_TIMEOUT_140US BC Response timeout of 140.0us NAI_1760_BC_RTRT_RESP_TIMEOUT_60US BC RT-RT Response timeout of 60.0us NAI_1760_BC_RTRT_RESP_TIMEOUT_65US BC RT-RT Response timeout of 65.0us NAI_1760_BC_RTRT_RESP_TIMEOUT_100US BC RT-RT Response timeout of 100.0us NAI_1760_BC_RTRT_RESP_TIMEOUT_180US BC RT-RT Response timeout of 180.0us NAI_1760_MT_RESP_TIMEOUT_18US MT Response timeout of 18.0us NAI_1760_MT_RESP_TIMEOUT_23US MT Response timeout of 23.0us NAI_1760_MT_RESP_TIMEOUT_82US MT Response timeout of 82.0us NAI_1760_MT_RESP_TIMEOUT_140US MT Response timeout of 140.0us NAI_1760_MT_RTRT_RESP_TIMEOUT_61US MT RT-RT Response timeout of 61.0us NAI_1760_MT_RTRT_RESP_TIMEOUT_66US MT RT-RT Response timeout of 66.0us NAI_1760_MT_RTRT_RESP_TIMEOUT_122US MT RT-RT Response timeout of 122.0us NAI_1760_MT_RTRT_RESP_TIMEOUT_180US MT RT-RT Response timeout of 180.0us NAI_1760_RT_RTRT_RESP_TIMEOUT_57US RT RT-RT Response timeout of 57.0us NAI_1760_RT_RTRT_RESP_TIMEOUT_62US RT RT-RT Response timeout of 62.0us NAI_1760_RT_RTRT_RESP_TIMEOUT_100US RT RT-RT Response timeout of 100.0us NAI_1760_RT_RTRT_RESP_TIMEOUT_180US RT RT-RT Response timeout of 180.0us |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetTimeTag | ( | int16_t | swDevice, |
uint16_t | wTimeTag ) |
Sets the value of the time tag register. NOTE: For FTJ/FTK modules, the device must be initialized as BC, RT or MT prior to calling this function. Otherwise, an error is returned.
swDevice | : (Input) Logical Device Number (0-31). |
wTimeTag | : (Input) Time Tag Value (0x0000-0xFFFF). |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_SetTimeTagResolution | ( | int16_t | swDevice, |
uint16_t | wTimeTagResolution ) |
Sets the time tag resolution of the device.
swDevice | : (Input) Logical Device Number (0-31). |
wTimeTagResolution | : (Input) Time Tag Resolution. NAI_1553_TIME_TAG_2US 2 uS resolution NAI_1553_TIME_TAG_4US 4 uS resolution NAI_1553_TIME_TAG_8US 8 uS resolution NAI_1553_TIME_TAG_16US 16 uS resolution NAI_1553_TIME_TAG_32US 32 uS resolution NAI_1553_TIME_TAG_64US 64 uS resolution NAI_1553_TIME_TAG_TEST Increment manually NAI_1553_TIME_TAG_EXTERNAL_CLOCK Use External Clock |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_WriteAuxReg | ( | int16_t | swDevice, |
uint32_t | wAuxRegisterAddress, | ||
uint16_t | wAuxRegisterValue ) |
Writes to the specified auxiliary register location.
swDevice | : (Input) Logical Device Number (0-31). |
wAuxRegisterAddress | (Input) Specifies the auxiliary register address to be read (0-15). |
wAuxRegisterValue | (Input) Value to be written to the auxiliary register. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_WriteIntReg | ( | int16_t | swDevice, |
uint32_t | wIntRegisterAddress, | ||
uint32_t | wIntRegisterValue ) |
Writes to the specified interrupt register location.
swDevice | : (Input) Logical Device Number (0-31). |
wIntRegisterAddress | (Input) Specifies the interrupt register address to write (0-3). |
wIntRegisterValue | (Input) Value to be written to the interrupt register. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_WriteMem | ( | int16_t | swDevice, |
uint32_t | wDeviceMemoryAddress, | ||
uint16_t | wDeviceMemoryValue ) |
Writes to the specified memory location.
swDevice | : (Input) Logical Device Number (0-31). |
wDeviceMemoryAddress | (Input) Specifies the the memory location to write to. |
wDeviceMemoryValue | (Input) Value to be written. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_WriteMemMultiple | ( | int16_t | swDevice, |
uint32_t | wDeviceMemoryAddress, | ||
uint16_t | wBufferSize, | ||
uint16_t * | wapBuffer ) |
Writes to a block of core memory starting from the specified memory location. This function is only supported in the assisted module.
swDevice | : (Input) Logical Device Number (0-31). |
wDeviceMemoryAddress | (Input) Specifies the starting core memory location to write a block of data. |
wBufferSize | (Input) Specifies the size of the data block to write. Maximum size supported is 512. |
wapBuffer | (Input) Input array containing the data to write. The array size must be greater than or equal to wBufferSize. |
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_WriteReg | ( | int16_t | swDevice, |
uint32_t | wRegisterAddress, | ||
uint16_t | wRegisterValue ) |
Writes to the specified register location.
swDevice | : (Input) Logical Device Number (0-31). |
wRegisterAddress | (Input) Specifies the register address to be read (0-63). |
wRegisterValue | (Input) Value to be written to the register. |