Added support for the WNC M14A2A Cellular LTE Data Module.
Dependencies: WNC14A2AInterface
Pkt STack Private Functions
[SPIRIT_PktStack]
Functions | |
void | SpiritPktStackInit (PktStackInit *pxPktStackInit) |
Initializes the SPIRIT STack packet according to the specified parameters in the PktStackInit. | |
void | SpiritPktStackGetInfo (PktStackInit *pxPktStackInit) |
Returns the SPIRIT STack packet structure according to the specified parameters in the registers. | |
void | SpiritPktStackAddressesInit (PktStackAddressesInit *pxPktStackAddresses) |
Initializes the SPIRIT STack packet addresses according to the specified parameters in the PktStackAddresses struct. | |
void | SpiritPktStackGetAddressesInfo (PktStackAddressesInit *pxPktStackAddresses) |
Returns the SPIRIT STack packet addresses structure according to the specified parameters in the registers. | |
void | SpiritPktStackLlpInit (PktStackLlpInit *pxPktStackLlpInit) |
Initializes the SPIRIT STack packet LLP options according to the specified parameters in the PktStackLlpInit struct. | |
void | SpiritPktStackLlpGetInfo (PktStackLlpInit *pxPktStackLlpInit) |
Returns the SPIRIT STack packet LLP options according to the specified values in the registers. | |
void | SpiritPktStackSetFormat (void) |
Configures the STack packet format for SPIRIT. | |
void | SpiritPktStackSetAddressLength (void) |
Sets the address length for SPIRIT STack packets (always 2). | |
void | SpiritPktStackSetPayloadLength (uint16_t nPayloadLength) |
Sets the payload length for SPIRIT STack packets. | |
uint16_t | SpiritPktStackGetPayloadLength (void) |
Returns the payload length for SPIRIT STack packets. | |
void | SpiritPktStackSetVarLengthWidth (uint16_t nMaxPayloadLength, StackControlLength xControlLength) |
Computes and sets the variable payload length for SPIRIT STack packets. | |
void | SpiritPktStackSetRxSourceMask (uint8_t cMask) |
Rx packet source mask. | |
uint8_t | SpiritPktStackGetRxSourceMask (void) |
Returns the Rx packet source mask. | |
uint16_t | SpiritPktStackGetReceivedPktLength (void) |
Returns the packet length field of the received packet. | |
void | SpiritPktStackFilterOnSourceAddress (SpiritFunctionalState xNewState) |
If enabled RX packet is accepted only if the masked source address field matches the masked source address field reference (SOURCE_MASK & SOURCE_FIELD_REF == SOURCE_MASK & RX_SOURCE_FIELD). |
Function Documentation
void SpiritPktStackAddressesInit | ( | PktStackAddressesInit * | pxPktStackAddresses ) |
Initializes the SPIRIT STack packet addresses according to the specified parameters in the PktStackAddresses struct.
- Parameters:
-
pxPktStackAddresses STack packet addresses init structure. This parameter is a pointer to PktStackAddressesInit .
- Return values:
-
None.
Definition at line 270 of file SPIRIT_PktStack.c.
void SpiritPktStackFilterOnSourceAddress | ( | SpiritFunctionalState | xNewState ) |
If enabled RX packet is accepted only if the masked source address field matches the masked source address field reference (SOURCE_MASK & SOURCE_FIELD_REF == SOURCE_MASK & RX_SOURCE_FIELD).
- Parameters:
-
xNewState new state for Source address filtering enable bit. This parameter can be S_ENABLE or S_DISABLE.
- Return values:
-
None.
- Note:
- This filtering control is enabled by default but the source address mask is by default set to 0. As a matter of fact the user has to enable the source filtering bit after the packet initialization because the PktInit routine disables it.
Definition at line 646 of file SPIRIT_PktStack.c.
void SpiritPktStackGetAddressesInfo | ( | PktStackAddressesInit * | pxPktStackAddresses ) |
Returns the SPIRIT STack packet addresses structure according to the specified parameters in the registers.
- Parameters:
-
pxPktStackAddresses STack packet addresses init structure. This parameter is a pointer to PktStackAddresses.
- Return values:
-
None.
Definition at line 333 of file SPIRIT_PktStack.c.
void SpiritPktStackGetInfo | ( | PktStackInit * | pxPktStackInit ) |
Returns the SPIRIT STack packet structure according to the specified parameters in the registers.
- Parameters:
-
pxPktStackInit STack packet init structure. This parameter is a pointer to PktStackInit.
- Return values:
-
None.
Definition at line 219 of file SPIRIT_PktStack.c.
uint16_t SpiritPktStackGetPayloadLength | ( | void | ) |
Returns the payload length for SPIRIT STack packets.
Since the packet length depends from the address and the control field size, this function reads the correspondent registers in order to determine the correct payload length to be returned.
- Parameters:
-
None.
- Return values:
-
uint16_t Payload length.
Definition at line 524 of file SPIRIT_PktStack.c.
uint16_t SpiritPktStackGetReceivedPktLength | ( | void | ) |
Returns the packet length field of the received packet.
- Parameters:
-
None.
- Return values:
-
uint16_t Packet length.
Definition at line 617 of file SPIRIT_PktStack.c.
uint8_t SpiritPktStackGetRxSourceMask | ( | void | ) |
Returns the Rx packet source mask.
Used to mask the address of the accepted packets. If 0 -> no filtering.
- Parameters:
-
None.
- Return values:
-
uint8_t Rx source mask.
Definition at line 600 of file SPIRIT_PktStack.c.
void SpiritPktStackInit | ( | PktStackInit * | pxPktStackInit ) |
Initializes the SPIRIT STack packet according to the specified parameters in the PktStackInit.
- Parameters:
-
pxPktStackInit STack packet init structure. This parameter is a pointer to PktStackInit.
- Return values:
-
None.
Definition at line 119 of file SPIRIT_PktStack.c.
void SpiritPktStackLlpGetInfo | ( | PktStackLlpInit * | pxPktStackLlpInit ) |
Returns the SPIRIT STack packet LLP options according to the specified values in the registers.
- Parameters:
-
pxPktStackLlpInit STack packet LLP structure. This parameter is a pointer to PktStackLlpInit.
- Return values:
-
None.
Definition at line 411 of file SPIRIT_PktStack.c.
void SpiritPktStackLlpInit | ( | PktStackLlpInit * | pxPktStackLlpInit ) |
Initializes the SPIRIT STack packet LLP options according to the specified parameters in the PktStackLlpInit struct.
- Parameters:
-
pxPktStackLlpInit STack packet LLP init structure. This parameter is a pointer to PktStackLlpInit.
- Return values:
-
None.
Definition at line 362 of file SPIRIT_PktStack.c.
void SpiritPktStackSetAddressLength | ( | void | ) |
Sets the address length for SPIRIT STack packets (always 2).
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 471 of file SPIRIT_PktStack.c.
void SpiritPktStackSetFormat | ( | void | ) |
Configures the STack packet format for SPIRIT.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 431 of file SPIRIT_PktStack.c.
void SpiritPktStackSetPayloadLength | ( | uint16_t | nPayloadLength ) |
Sets the payload length for SPIRIT STack packets.
Since the packet length depends from the address (always 2 for this packet format) and the control field size, this function reads the control length register content in order to determine the correct packet length to be written.
- Parameters:
-
nPayloadLength payload length in bytes. This parameter can be any value of uint16_t.
- Return values:
-
None.
Definition at line 497 of file SPIRIT_PktStack.c.
void SpiritPktStackSetRxSourceMask | ( | uint8_t | cMask ) |
Rx packet source mask.
Used to mask the address of the accepted packets. If 0 -> no filtering.
- Parameters:
-
cMask Rx source mask. This parameter is an uint8_t.
- Return values:
-
None.
Definition at line 587 of file SPIRIT_PktStack.c.
void SpiritPktStackSetVarLengthWidth | ( | uint16_t | nMaxPayloadLength, |
StackControlLength | xControlLength | ||
) |
Computes and sets the variable payload length for SPIRIT STack packets.
- Parameters:
-
nMaxPayloadLength payload length in bytes. This parameter is an uint16_t. xControlLength control length in bytes. This parameter can be any value of StackControlLength.
- Return values:
-
None.
Definition at line 547 of file SPIRIT_PktStack.c.
Generated on Tue Jul 12 2022 19:09:06 by 1.7.2