IP-708 Driver
Documentation
FOCUS Software Engineering

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

ip708.h File Reference

Library for Condor Engineering ARINC 708 IP-708 modules header file. More...

Include dependency graph for ip708.h:

Include dependency graph

Channel Configuration Options



#define CFG_BUS_SELECT   0
#define EXT_XMITA_RECVB   1
#define EXT_XMITB_RECVA   2
#define INTERNAL   3
#define CFG_XMIT_GAP   10
#define TX_GAP_0   0x0
#define TX_GAP_16   0x1
#define TX_GAP_32   0x2
#define TX_GAP_48   0x3
#define TX_GAP_64   0x4
#define TX_GAP_80   0x5
#define TX_GAP_96   0x6
#define TX_GAP_112   0x7

Defines

#define WORDS_PER_FRAME   107
 Number of 16-bit words in an ARINC 708 freame.


Typedefs

typedef Ip708Descriptor * Ip708Hdl
 Handle for accessing the IP-708 module.


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.

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.

void ip708_txIntEnable (Ip708Hdl ipModuleHdl)
 Enables transmit interrupt.

void ip708_txIntDisable (Ip708Hdl ipModuleHdl)
 Disables transmit interrupt.

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

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.

void ip708_rxIntEnable (Ip708Hdl ipModuleHdl)
 Enables receive interrupt.

void ip708_rxIntDisable (Ip708Hdl ipModuleHdl)
 Disables receive interrupt.

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

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

bool 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

Library for Condor Engineering ARINC 708 IP-708 modules header file.


Typedef Documentation

typedef Ip708Descriptor* Ip708Hdl
 

Handle for accessing the IP-708 module.

The handle is returned by the open function.


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_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_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

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()

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()

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

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_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()

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()

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_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

bool 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_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