Appiko
|
Configuration and management of S2-LP Basic packets. More...
Go to the source code of this file.
Data Structures | |
struct | PktBasicInit |
S2LP Basic Packet Init structure definition. More... | |
struct | PktBasicAddressesInit |
S2LP Basic packet address structure definition. This structure allows users to specify the node/multicast/broadcast addresses and the correspondent filtering options. More... | |
Macros | |
#define | S2LPPktBasicSetPreambleLength(xPreambleLength) S2LPSetPreambleLength(xPreambleLength) |
Sets the PREAMBLE field length for S2LP Basic packets. More... | |
#define | S2LPPktBasicGetPreambleLength() S2LPGetPreambleLength() |
Returns the PREAMBLE field length mode for S2LP Basic packets. More... | |
#define | S2LPPktBasicSetSyncLength(xSyncLength) S2LPSetSyncLength((PktSyncLength)xSyncLength) |
Sets the SYNC field length for S2LP Basic packets. More... | |
#define | S2LPPktBasicGetSyncLength() S2LPGetSyncLength() |
Returns the SYNC field length for S2LP Basic packets. More... | |
#define | S2LPPktBasicFilterOnCrc(xNewState) S2LPPktCommonFilterOnCrc(xNewState) |
Enables or Disables the CRC filtering. More... | |
#define | S2LPPktBasicWhitening(xNewState) S2LPWhitening(xNewState) |
Enables or Disables WHITENING for S2LP packets. More... | |
#define | S2LPPktBasicFec(xNewState) S2LPFec(xNewState) |
Enables or Disables FEC for S2LP Basic packets. More... | |
#define | S2LPPktBasicSetSyncWords(lSyncWords, xSyncLength) S2LPSetSyncWords(lSyncWords, xSyncLength) |
Sets multiple SYNC words for S2LP Basic packets. More... | |
Typedefs | |
typedef PktCrcMode | BasicCrcMode |
CRC length in bytes enumeration. | |
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... | |
This module can be used to manage the configuration of S2LP Basic packets. The user can obtain a packet configuration filling the structure PktBasicInit, defining in it some general parameters for the S2-LP Basic packet format. Another structure the user can fill is PktBasicAddressesInit to define the addresses which will be used during the communication. Moreover, functions to set the payload length and the destination address are provided.
Example:
The module provides some other functions that can be used to modify or read only some configuration parameters.
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_PktBasic.h.