Appiko
|
Configuration and management of the common features of S2-LP packets. More...
Go to the source code of this file.
Enumerations | |
enum | PktCrcMode { PKT_NO_CRC = 0x00, PKT_CRC_MODE_8BITS = 0x20, PKT_CRC_MODE_16BITS_1 = 0x40, PKT_CRC_MODE_16BITS_2 = 0x60, PKT_CRC_MODE_24BITS = 0x80, PKT_CRC_MODE_32BITS = 0xA0 } |
CRC length in bytes enumeration. More... | |
enum | DirectTx { NORMAL_TX_MODE = 0x00, DIRECT_TX_FIFO_MODE = 0x04, DIRECT_TX_GPIO_MODE = 0x08, PN9_TX_MODE = 0x0C } |
Direct transmission mode enumeration for SPIRIT. More... | |
enum | DirectRx { NORMAL_RX_MODE = 0x00, DIRECT_RX_FIFO_MODE = 0x10, DIRECT_RX_GPIO_MODE = 0x20 } |
Direct receive mode enumeration for SPIRIT. More... | |
Functions | |
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 | S2LPSetSyncWords (uint32_t lSyncWords, uint8_t xSyncLength) |
Set the SYNC_WORD. More... | |
void | S2LPGetSyncWords (uint32_t *lSyncWords, uint8_t *cSyncLength) |
Get the SYNC_WORD. 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 | S2LPPacketHandler3OutOf6 (SFunctionalState xNewState) |
Enable or Disable the 3o6 encoding. More... | |
void | S2LPPacketHandlerManchester (SFunctionalState xNewState) |
Enable or Disable the MANCHESTER encoding. More... | |
uint8_t | S2LPGetPacketFormat (void) |
Get the packet format. 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 | S2LPPacketHandlerSetTxMode (DirectTx xNewState) |
Set the TX mode of S2LP. More... | |
void | S2LPPacketHandlerSetRxMode (DirectRx xNewState) |
Set the DirectRF RX mode of S2LP. More... | |
DirectTx | S2LPPacketHandlerGetTxMode (void) |
Return the DirectRF TX mode of S2LP. More... | |
DirectRx | S2LPPacketHandlerGetRxMode (void) |
Return the DirectRF RX 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 | 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 | S2LPPacketHandlerSetVariableLength (SFunctionalState xVarLen) |
Set the variable length mode. More... | |
void | S2LPSetDualSyncWords (uint32_t lSyncWords) |
Set the secondary sync word. More... | |
void | S2LPGetDualSyncWords (uint32_t *lSyncWords) |
Get the secondary sync word. More... | |
void | S2LPSetRxSourceMask (uint8_t address) |
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... | |
This module provides all the common functions and definitions used by the packets modules. Here are also defined all the generic enumeration types that are redefined in the specific packets modules, but every enumeration value is referred to this module. So the user who wants to configure the preamble of a Basic, or a STack packet has to use the enumeration values defined here.
Example:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
Definition in file S2LP_PacketHandler.h.