IP-708 Driver
Documentation
FOCUS Software Engineering

Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

Industry Pack Driver API

This module describes the API of the driver for the Condor IP-708 Industry Pack Module. More...

Driver Initialization and Clean-up Functions

Ip708Hdl ip708_open (IpCarrierHdl ipCarrierHdl, int ipSlotNo, void(*rxIntHandlerFunc)(), void(*txIntHandlerFunc)())
 Opens access to a Condor IP-708 module.

void ip708_close (Ip708Hdl ipModuleHdl)
 Closes access to the IP module and releases associated resources.

uint16_t ip708_getStatus (Ip708Hdl ipModuleHdl)
 Return the contents of the IP-708 status register.


Transmit Functions

void ip708_putFrame (Ip708Hdl ipModuleHdl, uint16_t *frameBufPtr)
 Puts an ARINC 708 frame to the transmit buffer.

void ip708_enableTx (Ip708Hdl ipModuleHdl, bool enabled)
 Enables or disables the transmitter.

int ip708_getTxFrameCnt (Ip708Hdl ipModuleHdl)
 Return the current number of ARINC 708 frames contained in the transmit buffer.

void ip708_resetTx (Ip708Hdl ipModuleHdl)
 Reset the transmitter.

bool ip708_txIntPending (Ip708Hdl ipModuleHdl)
 Check if a transmit interrupt is pending and clears the interrupt.

void ip708_txIntEnable (Ip708Hdl ipModuleHdl)
 Enables transmit interrupt.

void ip708_txIntDisable (Ip708Hdl ipModuleHdl)
 Disables transmit interrupt.


Receive Functions

int ip708_getFrame (Ip708Hdl ipModuleHdl, uint16_t *frameBufPtr)
 Reads an ARINC 708 frame from the receive buffer.

void ip708_enableRx (Ip708Hdl ipModuleHdl, bool enabled)
 Enables or disables the receiver.

int ip708_getRxFrameCnt (Ip708Hdl ipModuleHdl)
 Return the current number of frames contained in the receive buffer.

void ip708_resetRx (Ip708Hdl ipModuleHdl)
 Reset the IP-708 receiver.

bool ip708_rxIntPending (Ip708Hdl ipModuleHdl)
 Check if a receive interrupt is pending and clears the interrupt.

void ip708_rxIntEnable (Ip708Hdl ipModuleHdl)
 Enables receive interrupt.

void ip708_rxIntDisable (Ip708Hdl ipModuleHdl)
 Disables receive interrupt.


Channel configuration Functions

void ip708_setConfig (Ip708Hdl ipModuleHdl, int option, int value)
 Configures channels.


Test and Compare Functions

int ip708_framesDiff (uint16_t *frame1Ptr, uint16_t *frame2Ptr)
 Compare two ARINC 708 data frames.

void ip708_makeFrame (uint16_t frameBase, uint16_t *frameBufPtr)
 Create test frames.

bool ip708_testRam (Ip708Hdl ipModuleHdl)
 RAM test of the IP-708 RAM.


Detailed Description

This module describes the API of the driver for the Condor IP-708 Industry Pack Module.


Function Documentation

Ip708Hdl ip708_open IpCarrierHdl    ipCarrierHdl,
int    ipSlotNo,
void(*    rxIntHandlerFunc)(),
void(*    txIntHandlerFunc)()
 

Opens access to a Condor IP-708 module.

Parameters:
ipCarrierHdl IP carrier handle returned by ipCarrierOpen()
ipSlotNo IP slot number (IP_SLOT_A = first slot)
rxIntHandlerFunc Pointer to a void function which implements a receive interrupt service routine for this module or NULL if no interrupt servicing desired
txIntHandlerFunc Pointer to a void function which implements a transmit interrupt service routine for this module or NULL if no interrupt servicing desired
Returns:
Handle to access IP module or NULL if no module of this type found.

void ip708_putFrame Ip708Hdl    ipModuleHdl,
uint16_t *    frameBufPtr
 

Puts an ARINC 708 frame to the transmit buffer.

The first four data words correspond to the 64-bit control word defined in the ARINC 708 protocol. The following 1536 bits are partitioned into 15-bit words representing 5 range bins (3 bit data portions) per word.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
frameBufPtr Pointer to an array of 103 16-bit unsigned integers

int ip708_getFrame Ip708Hdl    ipModuleHdl,
uint16_t *    frameBufPtr
 

Reads an ARINC 708 frame from the receive buffer.

The first four data words correspond to the 64-bit control word defined in the ARINC 708 protocol. The following 1536 bits are partitioned into 15-bit words representing 5 range bins (3 bit data portions) per word. The last data word of a frame contains two error status bits (the 2 MSBs). If either of these are set an error has occured.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
frameBufPtr Pointer to an array of 103 16-bit unsigned integers
Return values:
ARS_SHORT_DATA_FRAME Short data frame detected
ARS_LONG_DATA_FRAME Long data frame detected
ARS_NODATA No data frame detected, no data stored in frameBufPtr
ARS_GOTDATA Data was read from the receiver

void ip708_setConfig Ip708Hdl    ipModuleHdl,
int    option,
int    value
 

Configures channels.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
option Configuration option. Valid options see Channel Configuration Options .
value Option value

int ip708_framesDiff uint16_t *    frame1Ptr,
uint16_t *    frame2Ptr
 

Compare two ARINC 708 data frames.

Parameters:
frame1Ptr Pointer to first ARINC 708 frame
frame2Ptr Pointer ro second ARINC 708 frame
Returns:
true if frames are different, else false

void ip708_close Ip708Hdl    ipModuleHdl
 

Closes access to the IP module and releases associated resources.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

uint16_t ip708_getStatus Ip708Hdl    ipModuleHdl
 

Return the contents of the IP-708 status register.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
Status register

void ip708_enableTx Ip708Hdl    ipModuleHdl,
bool    enabled
 

Enables or disables the transmitter.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
enabled true enables, false diables

int ip708_getTxFrameCnt Ip708Hdl    ipModuleHdl
 

Return the current number of ARINC 708 frames contained in the transmit buffer.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
Numer of frames in buffer

void ip708_resetTx Ip708Hdl    ipModuleHdl
 

Reset the transmitter.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

bool ip708_txIntPending Ip708Hdl    ipModuleHdl
 

Check if a transmit interrupt is pending and clears the interrupt.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
true if an interrupt has been pending

void ip708_txIntEnable Ip708Hdl    ipModuleHdl
 

Enables transmit interrupt.

Transmit interrupts must be cleared by the interrupt handler (ISR) using the following call ip708_writeCtrlReg(ipModuleHdl, RCTRL_TXICLR, true) or using the ip708_txIntPending(ipModuleHdl) function.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

void ip708_txIntDisable Ip708Hdl    ipModuleHdl
 

Disables transmit interrupt.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

void ip708_enableRx Ip708Hdl    ipModuleHdl,
bool    enabled
 

Enables or disables the receiver.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
enabled true enables, false diables

int ip708_getRxFrameCnt Ip708Hdl    ipModuleHdl
 

Return the current number of frames contained in the receive buffer.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
Numer of frames in buffer

void ip708_resetRx Ip708Hdl    ipModuleHdl
 

Reset the IP-708 receiver.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

bool ip708_rxIntPending Ip708Hdl    ipModuleHdl
 

Check if a receive interrupt is pending and clears the interrupt.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
true if an interrupt has been pending

void ip708_rxIntEnable Ip708Hdl    ipModuleHdl
 

Enables receive interrupt.

Receive interrupts must be cleared by the interrupt handler (ISR) using the following call ip708_writeCtrlReg(ipModuleHdl, RCTRL_RXICLR, true) or using the ip708_rxIntPending(ipModuleHdl) function.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

void ip708_rxIntDisable Ip708Hdl    ipModuleHdl
 

Disables receive interrupt.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()

void ip708_makeFrame uint16_t    frameBase,
uint16_t *    frameBufPtr
 

Create test frames.

Parameters:
frameBase Base value for data pattern
frameBufPtr Pointer to frame buffer (103 16-bit words)

bool ip708_testRam Ip708Hdl    ipModuleHdl
 

RAM test of the IP-708 RAM.

Parameters:
ipModuleHdl IP module handle returned by ip708_open()
Returns:
true for OK, false for a failed test