Appiko
Functions
Pkt Basic Exported 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)
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)
Parameters
xAddressFieldlength of ADDRESS in bytes. This parameter can be: S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 320 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetAddressesInfo()

void S2LPPktBasicGetAddressesInfo ( PktBasicAddressesInit pxPktBasicAddresses)
Parameters
pxPktBasicAddressesBasic packet addresses init structure. This parameter is a pointer to PktBasicAddresses.
Return values
None.

Definition at line 272 of file S2LP_PktBasic.c.

◆ S2LPPktBasicGetAddressField()

SFunctionalState S2LPPktBasicGetAddressField ( void  )
Parameters
None.
Return values
SFunctionalStateNotifies if the address field is enabled or disabled.

Definition at line 342 of file S2LP_PktBasic.c.

References g_xStatus.

Referenced by S2LPPktBasicSetPayloadLength().

◆ S2LPPktBasicGetInfo()

void S2LPPktBasicGetInfo ( PktBasicInit pxPktBasicInit)
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  )
Parameters
None.
Return values
uint16_tPayload length in bytes.

Definition at line 388 of file S2LP_PktBasic.c.

References g_xStatus.

◆ S2LPPktBasicGetReceivedPktLength()

uint16_t S2LPPktBasicGetReceivedPktLength ( void  )
Parameters
None.
Return values
uint16_tPacket length.

Definition at line 407 of file S2LP_PktBasic.c.

References g_xStatus.

◆ S2LPPktBasicInit()

void S2LPPktBasicInit ( PktBasicInit pxPktBasicInit)
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  )
Parameters
None.
Return values
None.

Definition at line 293 of file S2LP_PktBasic.c.

◆ S2LPPktBasicSetPayloadLength()

void S2LPPktBasicSetPayloadLength ( uint16_t  nPayloadLength)
Parameters
nPayloadLengthpayload length in bytes. This parameter is an uint16_t.
Return values
None.

Definition at line 366 of file S2LP_PktBasic.c.

References g_xStatus, and S2LPPktBasicGetAddressField().