Appiko
Functions
Pkt Common Private Functions

Functions

uint8_t S2LPGetPacketFormat (void)
 Get the packet format. More...
 
void S2LPSetPreambleLength (uint16_t cPreambleLength)
 Set the PREAMBLE field Length mode for S2LP packets. More...
 
uint16_t S2LPGetPreambleLength (void)
 Return the PREAMBLE field Length mode for S2LP packets. More...
 
void S2LPSetSyncLength (uint8_t cSyncLength)
 Set the SYNC field Length for S2LP packets. More...
 
uint8_t S2LPGetSyncLength (void)
 Return the SYNC field Length for S2LP packets. More...
 
void S2LPPacketHandlerWhitening (SFunctionalState xNewState)
 Enable or Disable WHITENING for S2LP packets. More...
 
void S2LPPacketHandlerFec (SFunctionalState xNewState)
 Enable or Disable the FEC encoding. More...
 
void S2LPPacketHandlerManchester (SFunctionalState xNewState)
 Enable or Disable the MANCHESTER encoding. More...
 
void S2LPPacketHandler3OutOf6 (SFunctionalState xNewState)
 Enable or Disable the 3o6 encoding. More...
 
void S2LPSetSyncWords (uint32_t lSyncWords, uint8_t cSyncLength)
 Set the SYNC_WORD. More...
 
void S2LPGetSyncWords (uint32_t *lSyncWords, uint8_t *cSyncLength)
 Get the SYNC_WORD. More...
 
void S2LPPktCommonFilterOnCrc (SFunctionalState xNewState)
 Enable or Disable the filtering on CRC. More...
 
uint8_t S2LPGetReceivedDestinationAddress (void)
 Get the received destination address. More...
 
uint8_t S2LPGetReceivedSourceAddress (void)
 Get the received source address. More...
 
uint8_t S2LPGetMyAddress (void)
 Get the MY_ADDRESS set on the chip. More...
 
uint8_t S2LPGetBroadcastAddress (void)
 Get the BROADCAST_ADDRESS set on the chip. More...
 
uint8_t S2LPGetMulticastAddress (void)
 Get the MULTICAST_ADDRESS set on the chip. More...
 
uint8_t S2LPGetRxSourceMask (void)
 Get the SOURCE_MASK set on the chip. More...
 
uint8_t S2LPGetRxSourceReferenceAddress (void)
 Get the SOURCE_REFERENCE set on the chip. More...
 
void S2LPSetRxSourceMask (uint8_t mask)
 Set the SOURCE_MASK . More...
 
void S2LPSetRxSourceReferenceAddress (uint8_t address)
 Set the SOURCE_REFERENCEK. More...
 
void S2LPSetBroadcastAddress (uint8_t address)
 Set the BROADCAST_ADDRESS set on the chip. More...
 
void S2LPSetMulticastAddress (uint8_t address)
 Set the MULTICAST_ADDRESS set on the chip. More...
 
void S2LPSetMyAddress (uint8_t address)
 Set the MY_ADDRESS (source address that will be transmitted). More...
 
void S2LPPacketHandlerSetRxMode (DirectRx xDirectRx)
 Set the DirectRF RX mode of S2LP. More...
 
DirectRx S2LPPacketHandlerGetRxMode (void)
 Return the DirectRF RX mode of S2LP. More...
 
void S2LPPacketHandlerSetTxMode (DirectTx xDirectTx)
 Set the TX mode of S2LP. More...
 
DirectTx S2LPPacketHandlerGetTxMode (void)
 Return the DirectRF TX mode of S2LP. More...
 
uint8_t S2LPPacketHandlerGetTransmittedSeqNumber (void)
 Returns the sequence number of the transmitted packet. More...
 
void S2LPPacketHandlerSetExtendedLenField (SFunctionalState xExtendedLenField)
 Set the extended length field in case of variable length. More...
 
void S2LPPacketHandlerSwap4FSKSymbol (SFunctionalState xSwapSymbol)
 Swap the 4FSK symbol mapping. More...
 
void S2LPPacketHandlerSwapFifoEndianess (SFunctionalState xEnableSwap)
 Change the FIFO endianness . More...
 
void S2LPPacketHandlerSwapPreamblePattern (SFunctionalState xEnableSwap)
 Swap preamble pattern. More...
 
void S2LPPacketHandlerSetVariableLength (SFunctionalState xVarLen)
 Set the variable length mode. More...
 
void S2LPPacketHandlerSetCrcMode (PktCrcMode xPktCrcMode)
 Set the CRC mode. More...
 
PktCrcMode S2LPPacketHandlerGetCrcMode (void)
 Get the CRC mode. More...
 
void S2LPPacketHandlerSelectSecondarySync (SFunctionalState xSecondarySync)
 Select the secondary sync mode. In TX if enabled: it will send the secondary sync word (from the PCKT_FLT_GOALSx), otherwise it will send the primary sync (from the SYNCx registers). In RX if enabled: it will enable the double sync mode seeking for the 2 sync words in SYNCx or PCKT_FLT_GOALSx in parallel. More...
 
void S2LPPacketHandlerSetAutoPcktFilter (SFunctionalState xNewState)
 Enable or Disable the auto packet filter mechanisms. More...
 
void S2LPPacketHandlerSetRxPersistentMode (SFunctionalState xNewState)
 Set the RX persistent mode. The device will be ever in RX unles an abort command comes. More...
 
void S2LPPacketHandlerSetSrcAddrFlt (SFunctionalState xNewState)
 Set the source address filtering. More...
 
void S2LPSetDualSyncWords (uint32_t lSyncWords)
 Set the secondary sync word. More...
 
void S2LPGetDualSyncWords (uint32_t *lSyncWords)
 Get the secondary sync word. More...
 

Detailed Description

Function Documentation

◆ S2LPGetBroadcastAddress()

uint8_t S2LPGetBroadcastAddress ( void  )
Parameters
None.
Return values
uint8_tBROADCAST_ADDRESS set.

Definition at line 414 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetDualSyncWords()

void S2LPGetDualSyncWords ( uint32_t *  lSyncWords)
Parameters
lSyncWordspointer to the secondary sync word variable.
Return values
None.

Definition at line 853 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetMulticastAddress()

uint8_t S2LPGetMulticastAddress ( void  )
Parameters
None.
Return values
uint8_tMULTICAST_ADDRESS set.

Definition at line 427 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetMyAddress()

uint8_t S2LPGetMyAddress ( void  )
Parameters
None.
Return values
uint8_tMY_ADDRESS set.

Definition at line 401 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetPacketFormat()

uint8_t S2LPGetPacketFormat ( void  )
Parameters
None.
Return values
Packetformat code.

Definition at line 117 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetPreambleLength()

uint16_t S2LPGetPreambleLength ( void  )
Parameters
None.
Return values
uint8_tPreamble field length in bits.

Definition at line 165 of file S2LP_PacketHandler.c.

References g_xStatus.

Referenced by S2LPPktWMbusGetInfo().

◆ S2LPGetReceivedDestinationAddress()

uint8_t S2LPGetReceivedDestinationAddress ( void  )
Parameters
None.
Return values
uint8_tthe last received destination address.

Definition at line 375 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetReceivedSourceAddress()

uint8_t S2LPGetReceivedSourceAddress ( void  )
Parameters
None.
Return values
uint8_tthe last received source address.

Definition at line 388 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetRxSourceMask()

uint8_t S2LPGetRxSourceMask ( void  )
Parameters
None.
Return values
uint8_tSOURCE_MASK set.

Definition at line 440 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetRxSourceReferenceAddress()

uint8_t S2LPGetRxSourceReferenceAddress ( void  )
Parameters
None.
Return values
uint8_tSOURCE_REFERENCE set.

Definition at line 453 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetSyncLength()

uint8_t S2LPGetSyncLength ( void  )
Parameters
None.
Return values
uint8_tSync field length in bits.

Definition at line 204 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPGetSyncWords()

void S2LPGetSyncWords ( uint32_t *  lSyncWords,
uint8_t *  cSyncLength 
)
Parameters
lSyncWordspointer to the SYNC_WORD 32bit variable where the SYNC word that is set should be stored.
cSyncLengthpointer to the uint8_t variable where sync length should be stored.
Return values
None.

Definition at line 329 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandler3OutOf6()

void S2LPPacketHandler3OutOf6 ( SFunctionalState  xNewState)
Parameters
xNewStateenable (S_ENABLED) or disable (S_DISABLE).
Return values
None.

Definition at line 281 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerFec()

void S2LPPacketHandlerFec ( SFunctionalState  xNewState)
Parameters
xNewStateenable (S_ENABLED) or disable (S_DISABLE).
Return values
None.

Definition at line 241 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerGetCrcMode()

PktCrcMode S2LPPacketHandlerGetCrcMode ( void  )
Parameters
None.
Return values
PktCrcModeCRC mode in the PktCrcMode enum.

Definition at line 729 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerGetRxMode()

DirectRx S2LPPacketHandlerGetRxMode ( void  )
Parameters
None.
Return values
DirectRxDirect Rx mode.

Definition at line 544 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPPacketHandlerGetTransmittedSeqNumber()

uint8_t S2LPPacketHandlerGetTransmittedSeqNumber ( void  )
Parameters
None.
Return values
uint8_tSequence number of the transmitted packet.

Definition at line 588 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPPacketHandlerGetTxMode()

DirectTx S2LPPacketHandlerGetTxMode ( void  )
Parameters
None.
Return values
DirectTxDirect Tx mode.

Definition at line 576 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPPacketHandlerManchester()

void S2LPPacketHandlerManchester ( SFunctionalState  xNewState)
Parameters
xNewStateenable (S_ENABLED) or disable (S_DISABLE).
Return values
None.

Definition at line 262 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSelectSecondarySync()

void S2LPPacketHandlerSelectSecondarySync ( SFunctionalState  xSecondarySync)
Parameters
xSecondarySynccan be S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 747 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetAutoPcktFilter()

void S2LPPacketHandlerSetAutoPcktFilter ( SFunctionalState  xNewState)
Note
This must be enabled for any filtering.
Parameters
xNewStateenable(S_ENABLE) or disable (S_DISABLE).
Return values
None.

Definition at line 770 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetCrcMode()

void S2LPPacketHandlerSetCrcMode ( PktCrcMode  xPktCrcMode)
Parameters
xPktCrcModeThis parameter can be one among the PktCrcMode .
Return values
None.

Definition at line 711 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetExtendedLenField()

void S2LPPacketHandlerSetExtendedLenField ( SFunctionalState  xExtendedLenField)
Parameters
xExtendedLenFieldenable (S_ENABLE) or disable (S_DISABLE).
Return values
None.

Definition at line 605 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetRxMode()

void S2LPPacketHandlerSetRxMode ( DirectRx  xDirectRx)
Parameters
xDirectRxcode of the desired mode. This parameter can be any value of DirectRx.
Return values
None.

Definition at line 526 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetRxPersistentMode()

void S2LPPacketHandlerSetRxPersistentMode ( SFunctionalState  xNewState)
Parameters
xNewStateenable(S_ENABLE) or disable (S_DISABLE).
Return values
None.

Definition at line 792 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetSrcAddrFlt()

void S2LPPacketHandlerSetSrcAddrFlt ( SFunctionalState  xNewState)
Parameters
xNewStateenable(S_ENABLE) or disable (S_DISABLE).
Return values
None.

Definition at line 813 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetTxMode()

void S2LPPacketHandlerSetTxMode ( DirectTx  xDirectTx)
Parameters
xDirectTxcode of the desired source. This parameter can be any value of DirectTx.
Return values
None.

Definition at line 559 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSetVariableLength()

void S2LPPacketHandlerSetVariableLength ( SFunctionalState  xVarLen)
Parameters
xVarLenif enabled (S_ENABLE) the length field will be set into the packet.
Return values
None.

Definition at line 690 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSwap4FSKSymbol()

void S2LPPacketHandlerSwap4FSKSymbol ( SFunctionalState  xSwapSymbol)
Parameters
xSwapSymbolenable (S_ENABLE) or disable (S_DISABLE).
Return values
None.

Definition at line 626 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSwapFifoEndianess()

void S2LPPacketHandlerSwapFifoEndianess ( SFunctionalState  xEnableSwap)
Parameters
xEnableSwapif it is S_DISABLE the FIFO will be accessed in big endian mode. if it is S_ENABLE the FIFO will be accessed in little endian mode.
Return values
None.

Definition at line 647 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerSwapPreamblePattern()

void S2LPPacketHandlerSwapPreamblePattern ( SFunctionalState  xEnableSwap)
Parameters
xEnableSwapif it is S_DISABLE the preamble pattern will be 10101010. if it is S_ENABLE the preamble pattern will be 01010101.
Return values
None.

Definition at line 668 of file S2LP_PacketHandler.c.

◆ S2LPPacketHandlerWhitening()

void S2LPPacketHandlerWhitening ( SFunctionalState  xNewState)
Parameters
xNewStatenew state for WHITENING mode. This parameter can be S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 219 of file S2LP_PacketHandler.c.

◆ S2LPPktCommonFilterOnCrc()

void S2LPPktCommonFilterOnCrc ( SFunctionalState  xNewState)
Parameters
xNewStatenew state for CRC_CHECK. This parameter can be S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 352 of file S2LP_PacketHandler.c.

◆ S2LPSetBroadcastAddress()

void S2LPSetBroadcastAddress ( uint8_t  address)
Parameters
addressBROADCAST_ADDRESS to be set.
Return values
None.

Definition at line 489 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetDualSyncWords()

void S2LPSetDualSyncWords ( uint32_t  lSyncWords)
Parameters
lSyncWordssecondary sync word.
Return values
None.

Definition at line 835 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetMulticastAddress()

void S2LPSetMulticastAddress ( uint8_t  address)
Parameters
addressMULTICAST_ADDRESS to be set.
Return values
None.

Definition at line 500 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetMyAddress()

void S2LPSetMyAddress ( uint8_t  address)
Parameters
addressMY_ADDRESS to be set.
Return values
None.

Definition at line 512 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetPreambleLength()

void S2LPSetPreambleLength ( uint16_t  cPreambleLength)
Parameters
xPreambleLengthlength of PREAMBLE field in bits.
Return values
None.

Definition at line 142 of file S2LP_PacketHandler.c.

◆ S2LPSetRxSourceMask()

void S2LPSetRxSourceMask ( uint8_t  mask)
Parameters
maskSource mask to be set .
Return values
None.

Definition at line 467 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetRxSourceReferenceAddress()

void S2LPSetRxSourceReferenceAddress ( uint8_t  address)
Parameters
addressSource address to be used as a reference .
Return values
None.

Definition at line 478 of file S2LP_PacketHandler.c.

References g_xStatus.

◆ S2LPSetSyncLength()

void S2LPSetSyncLength ( uint8_t  cSyncLength)
Parameters
xSyncLengthlength of SYNC field in bits.
Return values
None.

Definition at line 183 of file S2LP_PacketHandler.c.

◆ S2LPSetSyncWords()

void S2LPSetSyncWords ( uint32_t  lSyncWords,
uint8_t  cSyncLength 
)
Parameters
lSyncWordsSYNC_WORD given a 32 bits aligned word.
SyncLengthlength of the sync word in bits.
Return values
None.

Definition at line 301 of file S2LP_PacketHandler.c.