IPM429 Driver
Documentation
FOCUS Software Engineering

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

ipm429.h File Reference

Library for Max Technologies ARINC 429/419/575 IPM429 modules header file. More...

Include dependency graph for ipm429.h:

Include dependency graph

Typedefs

typedef Ipm429Descriptor * Ipm429Hdl
 Handle for accessing the IPM429 module.


Enumerations

enum  Ipm429BitRate { IPM429_12_5_KBIT = 0x09F, IPM429_100_KBIT = 0x013, IPM429_125_KBIT = 0x00F }
 Bit rate constants. More...

enum  Ipm429ConfigOptions {
  IPM429_CFG_DISABLE, IPM429_CFG_ENABLE, IPM429_CFG_LOW_RATE, IPM429_CFG_HI_RATE,
  IPM429_CFG_NO_PARITY, IPM429_CFG_PARITY, IPM429_CFG_EVEN_PARITY, IPM429_CFG_ODD_PARITY,
  IPM429_CFG_25_BIT, IPM429_CFG_32_BIT, IPM429_CFG_GAP_4, IPM429_CFG_GAP_REG,
  IPM429_CFG_EXTERNAL, IPM429_CFG_LOOPBACK, IPM429_INT_DISABLE, IPM429_INT_ENABLE
}
 Channel Configuration Options. More...

enum  

Functions

Ipm429Hdl ipm429_open (IpCarrierHdl ipCarrierHdl, int ipSlotNo, void(*intHandlerFunc)())
 Opens access to a Max Technologies ARINC 429/419/575 IPM429 module.

void ipm429_close (Ipm429Hdl ipModuleHdl)
 Closes access to the IP module and releases associated resources.

void ipm429_sendNow (Ipm429Hdl ipModuleHdl, int channel, uint32_t arincWord)
 Sends an ARINC word immediately.

void ipm429_sendScheduled (Ipm429Hdl ipModuleHdl, int channel, uint32_t arincWord, uint16_t timeTag)
 Sends an ARINC word time scheduled.

void ipm429_txEnable (Ipm429Hdl ipModuleHdl, int channel)
 Enables transmitter channel.

void ipm429_txDisable (Ipm429Hdl ipModuleHdl, int channel)
 Disables transmitter.

bool ipm429_txIsEnabled (Ipm429Hdl ipModuleHdl, int channel)
 Returns enable status of transmitter channel.

bool ipm429_txIsFull (Ipm429Hdl ipModuleHdl, int channel)
 Checks if transmitter is almost full.

bool ipm429_txIsOverflown (Ipm429Hdl ipModuleHdl, int channel)
 Returns buffer overflow status of transmitter and clears overflow condition.

void ipm429_txIntEnable (Ipm429Hdl ipModuleHdl, int channel)
 Enables transmit interrupt for a transmitter channel.

void ipm429_txIntDisable (Ipm429Hdl ipModuleHdl, int channel)
 Disables transmit interrupt for a transmitter channel.

bool ipm429_txIntIsEnabled (Ipm429Hdl ipModuleHdl, int channel)
 Returns interupt enable status of a transmitter channel.

void ipm429_receiveStamped (Ipm429Hdl ipModuleHdl, int channel, uint32_t *arincWordPtr, uint32_t *timeTagPtr)
 Retrieves a time-stamped ARINC word from receive buffer.

void ipm429_receive (Ipm429Hdl ipModuleHdl, int channel, uint32_t *arincWordPtr)
 Retrieves an ARINC word from receive buffer.

void ipm429_rxEnable (Ipm429Hdl ipModuleHdl, int channel)
 Enables receiver.

void ipm429_rxDisable (Ipm429Hdl ipModuleHdl, int channel)
 Disables receiver.

bool ipm429_rxIsEnabled (Ipm429Hdl ipModuleHdl, int channel)
 Returns enable status of receiver.

bool ipm429_rxIsAvail (Ipm429Hdl ipModuleHdl, int channel)
 Checks if receiver has data.

bool ipm429_rxIsOverflown (Ipm429Hdl ipModuleHdl, int channel)
 Returns buffer overflow status of receiver.

bool ipm429_rxIsError (Ipm429Hdl ipModuleHdl, int channel)
 Returns receive error status of receiver.

void ipm429_rxIntEnable (Ipm429Hdl ipModuleHdl, int channel)
 Enables receive interrupt for a receiver channel.

void ipm429_rxIntDisable (Ipm429Hdl ipModuleHdl, int channel)
 Disables receive interrupt for a receiver channel.

bool ipm429_rxIntIsEnabled (Ipm429Hdl ipModuleHdl, int channel)
 Returns interrupt enable status for a receiver channel.

uint32_t ipm429_getTimer (Ipm429Hdl ipModuleHdl)
 Read the main timer register.

void ipm429_setGapLength (Ipm429Hdl ipModuleHdl, uint16_t gapLength)
 Set gap length register.

void ipm429_setHighRate (Ipm429Hdl ipModuleHdl, Ipm429BitRate highRate)
 Set high rate register.

void ipm429_setLowRate (Ipm429Hdl ipModuleHdl, Ipm429BitRate lowRate)
 Set low rate register.

void ipm429_setTxEmptyThreshold (Ipm429Hdl ipModuleHdl, uint16_t value)
 Sets the transmitter FIFO almost empty threshold value.

void ipm429_setTxFullThreshold (Ipm429Hdl ipModuleHdl, uint16_t value)
 Sets the transmitter FIFO almost full threshold value.

void ipm429_setRxFullThreshold (Ipm429Hdl ipModuleHdl, uint16_t value)
 Sets the receiver FIFO almost full threshold value.

void ipm429_setRxAgingTimeout (Ipm429Hdl ipModuleHdl, uint16_t value)
 Sets the receiver FIFO aging time-out value.

void ipm429_resetLabelFiltering (Ipm429Hdl ipModuleHdl, int channel)
 Resets label filtering and enables all labels for receiption.

void ipm429_disableLabel (Ipm429Hdl ipModuleHdl, int channel, uint8_t label)
 Disable label for receiption.

void ipm429_enableLabel (Ipm429Hdl ipModuleHdl, int channel, uint8_t label)
 Enable label for receiption.

void ipm429_rxConfig (Ipm429Hdl ipModuleHdl, int channel, Ipm429ConfigOptions option)
 Configures receiver channel.

void ipm429_txConfig (Ipm429Hdl ipModuleHdl, int channel, Ipm429ConfigOptions option)
 Configures transmitter channel.

int ipm429_getRxChannels (Ipm429Hdl ipModuleHdl)
 Returns the number of RX channels for this module.

int ipm429_getTxChannels (Ipm429Hdl ipModuleHdl)
 Returns the number of TX channels for this module.


Detailed Description

Library for Max Technologies ARINC 429/419/575 IPM429 modules header file.


Typedef Documentation

typedef Ipm429Descriptor* Ipm429Hdl
 

Handle for accessing the IPM429 module.

The handle is returned by the open function.


Enumeration Type Documentation

enum Ipm429BitRate
 

Bit rate constants.

Enumeration values:
IPM429_12_5_KBIT  12.5 Kbit/s, default low rate
IPM429_100_KBIT  100 Kbit/s, default high rate
IPM429_125_KBIT  125 Kbit/s

enum Ipm429ConfigOptions
 

Channel Configuration Options.

Enumeration values:
IPM429_CFG_DISABLE  TX/RX channel is disabled.
IPM429_CFG_ENABLE  TX/RX channel is enabled.
IPM429_CFG_LOW_RATE  TX/RX channel uses low bit rate.
IPM429_CFG_HI_RATE  TX/RX channel uses high bit rate.
IPM429_CFG_NO_PARITY  TX/RX channel does not use/check parity.
IPM429_CFG_PARITY  RX channel checks parity.
IPM429_CFG_EVEN_PARITY  TX channel sends with even parity.
IPM429_CFG_ODD_PARITY  TX channel send with odd parity.
IPM429_CFG_25_BIT  ARINC word size is 25 bit.
IPM429_CFG_32_BIT  ARINC word size is 32 bit.
IPM429_CFG_GAP_4  TX channel uses 4 bit gap length.
IPM429_CFG_GAP_REG  TX channel uses gap defined in gap register.
IPM429_CFG_EXTERNAL  RX channel connects to external connector.
IPM429_CFG_LOOPBACK  RX channel connects to loop back.
IPM429_INT_DISABLE  TX/RX interrupt is disabled.
IPM429_INT_ENABLE  TX/RX interrupt is enabled.

Function Documentation

Ipm429Hdl ipm429_open IpCarrierHdl    ipCarrierHdl,
int    ipSlotNo,
void(*    intHandlerFunc)()
 

Opens access to a Max Technologies ARINC 429/419/575 IPM429 module.

Parameters:
ipCarrierHdl IP carrier handle returned by ipCarrierOpen()
ipSlotNo IP slot number (IP_SLOT_A = first slot)
intHandlerFunc Pointer to a void function which implements an 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 ipm429_close Ipm429Hdl    ipModuleHdl
 

Closes access to the IP module and releases associated resources.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()

void ipm429_sendNow Ipm429Hdl    ipModuleHdl,
int    channel,
uint32_t    arincWord
 

Sends an ARINC word immediately.

This function does not check if there is space in the transmit FIFO. Use the function ipm429_txIsFull to check the FIFO status.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
arincWord ARINC word

void ipm429_sendScheduled Ipm429Hdl    ipModuleHdl,
int    channel,
uint32_t    arincWord,
uint16_t    timeTag
 

Sends an ARINC word time scheduled.

This function does not check if there is space in the transmit FIFO. Use the function ipm429_txIsFull to check the FIFO status.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
arincWord ARINC word
timeTag 16-bit time tag which specifies the transmission time

void ipm429_txEnable Ipm429Hdl    ipModuleHdl,
int    channel
 

Enables transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number

void ipm429_txDisable Ipm429Hdl    ipModuleHdl,
int    channel
 

Disables transmitter.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number

bool ipm429_txIsEnabled Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns enable status of transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
Returns:
true if enabled, else false

bool ipm429_txIsFull Ipm429Hdl    ipModuleHdl,
int    channel
 

Checks if transmitter is almost full.

Almost full is a configurable threshold value.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
Returns:
true if almost empty, else false

bool ipm429_txIsOverflown Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns buffer overflow status of transmitter and clears overflow condition.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
Returns:
true if over flown, else false

void ipm429_txIntEnable Ipm429Hdl    ipModuleHdl,
int    channel
 

Enables transmit interrupt for a transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number

void ipm429_txIntDisable Ipm429Hdl    ipModuleHdl,
int    channel
 

Disables transmit interrupt for a transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number

bool ipm429_txIntIsEnabled Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns interupt enable status of a transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
Returns:
true if enabled, else false

void ipm429_receiveStamped Ipm429Hdl    ipModuleHdl,
int    channel,
uint32_t *    arincWordPtr,
uint32_t *    timeTagPtr
 

Retrieves a time-stamped ARINC word from receive buffer.

This function does not check if there is data available in the receive FIFO. Use the function ipm429_rxIsAvail to check the FIFO status.

To check if there are receive errors use ipm429_rxIsOverflown and ipm429_rxIsError.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
arincWordPtr Pointer to a 32-bit ARINC word buffer
timeTagPtr Pointer to a 32-bit time tag buffer

void ipm429_receive Ipm429Hdl    ipModuleHdl,
int    channel,
uint32_t *    arincWordPtr
 

Retrieves an ARINC word from receive buffer.

To check if there are receive errors use ipm429_rxIsOverflown and ipm429_rxIsError.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
arincWordPtr Pointer to a 32-bit ARINC word buffer

void ipm429_rxEnable Ipm429Hdl    ipModuleHdl,
int    channel
 

Enables receiver.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number

void ipm429_rxDisable Ipm429Hdl    ipModuleHdl,
int    channel
 

Disables receiver.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number

bool ipm429_rxIsEnabled Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns enable status of receiver.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
Returns:
true if enabled, else false

bool ipm429_rxIsAvail Ipm429Hdl    ipModuleHdl,
int    channel
 

Checks if receiver has data.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
Returns:
true if data available, else false

bool ipm429_rxIsOverflown Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns buffer overflow status of receiver.

This function call clears the error condition.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
Returns:
true if over flown, else false

bool ipm429_rxIsError Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns receive error status of receiver.

This function call clears the error condition.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
Returns:
true when a word length received is wrong, else false

void ipm429_rxIntEnable Ipm429Hdl    ipModuleHdl,
int    channel
 

Enables receive interrupt for a receiver channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number

void ipm429_rxIntDisable Ipm429Hdl    ipModuleHdl,
int    channel
 

Disables receive interrupt for a receiver channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number

bool ipm429_rxIntIsEnabled Ipm429Hdl    ipModuleHdl,
int    channel
 

Returns interrupt enable status for a receiver channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
Returns:
true if enabled, else false

uint32_t ipm429_getTimer Ipm429Hdl    ipModuleHdl
 

Read the main timer register.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
Returns:
Value of the 32-bit main timer

void ipm429_setGapLength Ipm429Hdl    ipModuleHdl,
uint16_t    gapLength
 

Set gap length register.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
gapLength Gap length between two ARINC words with a resolution of a quarter of a bit.

void ipm429_setHighRate Ipm429Hdl    ipModuleHdl,
Ipm429BitRate    highRate
 

Set high rate register.

This 9 bits register contains the bit rate used by the channels programmed to operate at the high rate. The rate should never be less than 8 us per bit. RATE = (HIGH_RATE + 1) * 0.5us

HIGH_RATE Value (Hex) Corresponding bit rate
1FF 3906.25 bits / s
09F (low rate reset value) 12.5 Kbit / sec
014 95.238Kbit / sec
013 (high rate reset value) 100 Kbit / sec
00F 125 Kbit / sec

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
highRate HIGH_RATE value

void ipm429_setLowRate Ipm429Hdl    ipModuleHdl,
Ipm429BitRate    lowRate
 

Set low rate register.

This 9 bits register contains the bit rate used by the channels programmed to operate at the low rate. The rate should never be less than 8 us per bit. RATE = (lowRate + 1) * 0.5us

LOW_RATE Value (Hex) Corresponding bit rate
1FF 3906.25 bits / s
09F (low rate reset value) 12.5 Kbit / sec
014 95.238Kbit / sec
013 (high rate reset value) 100 Kbit / sec
00F 125 Kbit / sec

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
lowRate LOW_RATE value

void ipm429_setTxEmptyThreshold Ipm429Hdl    ipModuleHdl,
uint16_t    value
 

Sets the transmitter FIFO almost empty threshold value.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
value Fifo almost empty threshold (0 - 32)

void ipm429_setTxFullThreshold Ipm429Hdl    ipModuleHdl,
uint16_t    value
 

Sets the transmitter FIFO almost full threshold value.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
value Fifo almost full threshold (0 - 32)

void ipm429_setRxFullThreshold Ipm429Hdl    ipModuleHdl,
uint16_t    value
 

Sets the receiver FIFO almost full threshold value.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
value Fifo almost full threshold (0 - 32)

void ipm429_setRxAgingTimeout Ipm429Hdl    ipModuleHdl,
uint16_t    value
 

Sets the receiver FIFO aging time-out value.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
value Aging time-out value in 512us units; 0 = disabled, max. value is 15.

void ipm429_resetLabelFiltering Ipm429Hdl    ipModuleHdl,
int    channel
 

Resets label filtering and enables all labels for receiption.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number

void ipm429_disableLabel Ipm429Hdl    ipModuleHdl,
int    channel,
uint8_t    label
 

Disable label for receiption.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
label Label of interest. Valid range is 0-255.

void ipm429_enableLabel Ipm429Hdl    ipModuleHdl,
int    channel,
uint8_t    label
 

Enable label for receiption.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
label Label of interest. Valid range is 0-255.

void ipm429_rxConfig Ipm429Hdl    ipModuleHdl,
int    channel,
Ipm429ConfigOptions    option
 

Configures receiver channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel RX channel number
option Configuration option. Valid options see options "Channel Configuration Options".

void ipm429_txConfig Ipm429Hdl    ipModuleHdl,
int    channel,
Ipm429ConfigOptions    option
 

Configures transmitter channel.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
channel TX channel number
option Configuration option. Valid options see Channel Configuration Options .

int ipm429_getRxChannels Ipm429Hdl    ipModuleHdl
 

Returns the number of RX channels for this module.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
Returns:
Number of channels

int ipm429_getTxChannels Ipm429Hdl    ipModuleHdl
 

Returns the number of TX channels for this module.

Parameters:
ipModuleHdl IP module handle returned by ipm429_open()
Returns:
Number of channels