S2-LP Low Level API  v. 1.3.0
Functions
Pkt Basic Private Functions

Functions

void S2LPPktBasicInit (PktBasicInit *pxPktBasicInit)
 Initialize the S2LP Basic packet according to the specified parameters in the PktBasicInit struct. Notice that this function sets the autofiltering option on CRC if it is set to any value different from BASIC_NO_CRC. More...
 
void S2LPPktBasicGetInfo (PktBasicInit *pxPktBasicInit)
 Return the S2LP Basic packet structure according to the specified parameters in the registers. More...
 
void S2LPPktBasicAddressesInit (PktBasicAddressesInit *pxPktBasicAddresses)
 Initialize the S2LP Basic packet addresses according to the specified parameters in the PktBasicAddressesInit struct. More...
 
void S2LPPktBasicGetAddressesInfo (PktBasicAddressesInit *pxPktBasicAddresses)
 Return the S2LP Basic packet addresses structure according to the specified parameters in the registers. More...
 
void S2LPPktBasicSetFormat (void)
 Configure the Basic packet format as packet used by S2LP. More...
 
void S2LPPktBasicAddressField (SFunctionalState xAddressField)
 Set the address length for S2LP Basic packets. More...
 
SFunctionalState S2LPPktBasicGetAddressField (void)
 Specify if the Address field for S2LP Basic packets is enabled or disabled. More...
 
void S2LPPktBasicSetPayloadLength (uint16_t nPayloadLength)
 Set the payload length for S2LP Basic 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 packet length to be written. More...
 
uint16_t S2LPPktBasicGetPayloadLength (void)
 Return the payload length for S2LP Basic 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. More...
 
uint16_t S2LPPktBasicGetReceivedPktLength (void)
 Return the packet length field of the received packet. More...
 

Detailed Description

Function Documentation

◆ S2LPPktBasicAddressesInit()

void S2LPPktBasicAddressesInit ( PktBasicAddressesInit pxPktBasicAddresses)

Initialize the S2LP Basic packet addresses according to the specified parameters in the PktBasicAddressesInit struct.

Parameters
pxPktBasicAddressesBasic packet addresses init structure. This parameter is a pointer to PktBasicAddresses.
Return values
None.

Definition at line 221 of file S2LP_PktBasic.c.

◆ S2LPPktBasicAddressField()

void S2LPPktBasicAddressField ( SFunctionalState  xAddressField)

Set the address length for S2LP Basic packets.

Parameters
xAddressFieldlength of ADDRESS in bytes. This parameter can be: S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 319 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetAddressesInfo()

void S2LPPktBasicGetAddressesInfo ( PktBasicAddressesInit pxPktBasicAddresses)

Return the S2LP Basic packet addresses structure according to the specified parameters in the registers.

Parameters
pxPktBasicAddressesBasic packet addresses init structure. This parameter is a pointer to PktBasicAddresses.
Return values
None.

Definition at line 271 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetAddressField()

SFunctionalState S2LPPktBasicGetAddressField ( void  )

Specify if the Address field for S2LP Basic packets is enabled or disabled.

Parameters
None.
Return values
SFunctionalStateNotifies if the address field is enabled or disabled.

Definition at line 341 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetInfo()

void S2LPPktBasicGetInfo ( PktBasicInit pxPktBasicInit)

Return the S2LP Basic packet structure according to the specified parameters in the registers.

Parameters
pxPktBasicInitBasic packet init structure. This parameter is a pointer to PktBasicInit.
Return values
None.

Definition at line 174 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetPayloadLength()

uint16_t S2LPPktBasicGetPayloadLength ( void  )

Return the payload length for S2LP Basic 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_tPayload length in bytes.

Definition at line 387 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetReceivedPktLength()

uint16_t S2LPPktBasicGetReceivedPktLength ( void  )

Return the packet length field of the received packet.

Parameters
None.
Return values
uint16_tPacket length.

Definition at line 406 of file S2LP_PktBasic.c.

◆ S2LPPktBasicInit()

void S2LPPktBasicInit ( PktBasicInit pxPktBasicInit)

Initialize the S2LP Basic packet according to the specified parameters in the PktBasicInit struct. Notice that this function sets the autofiltering option on CRC if it is set to any value different from BASIC_NO_CRC.

Parameters
pxPktBasicInitBasic packet init structure. This parameter is a pointer to PktBasicInit.
Return values
None.

Definition at line 83 of file S2LP_PktBasic.c.

◆ S2LPPktBasicSetFormat()

void S2LPPktBasicSetFormat ( void  )

Configure the Basic packet format as packet used by S2LP.

Parameters
None.
Return values
None.

Definition at line 292 of file S2LP_PktBasic.c.

◆ S2LPPktBasicSetPayloadLength()

void S2LPPktBasicSetPayloadLength ( uint16_t  nPayloadLength)

Set the payload length for S2LP Basic 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 packet length to be written.

Parameters
nPayloadLengthpayload length in bytes. This parameter is an uint16_t.
Return values
None.

Definition at line 365 of file S2LP_PktBasic.c.