Appiko
S2LP_PktBasic.h
Go to the documentation of this file.
1 
75 /* Define to prevent recursive inclusion -------------------------------------*/
76 #ifndef __S2LP_PKT_BASIC_H
77 #define __S2LP_PKT_BASIC_H
78 
79 /* Includes ------------------------------------------------------------------*/
80 
81 #include "S2LP_Regs.h"
82 #include "S2LP_Types.h"
83 #include "S2LP_PacketHandler.h"
84 
85 #ifdef __cplusplus
86  extern "C" {
87 #endif
88 
89 
113 
114 
115 
119 typedef struct {
120  uint16_t xPreambleLength;
121  uint8_t xSyncLength;
122  uint32_t lSyncWords;
129 } PktBasicInit;
130 
131 
136 typedef struct {
138  uint8_t cMyAddress;
144 
145 
162 #define S2LPPktBasicSetPreambleLength(xPreambleLength) S2LPSetPreambleLength(xPreambleLength)
163 
164 
170 #define S2LPPktBasicGetPreambleLength() S2LPGetPreambleLength()
171 
172 
179 #define S2LPPktBasicSetSyncLength(xSyncLength) S2LPSetSyncLength((PktSyncLength)xSyncLength)
180 
181 
187 #define S2LPPktBasicGetSyncLength() S2LPGetSyncLength()
188 
189 
196 #define S2LPPktBasicFilterOnCrc(xNewState) S2LPPktCommonFilterOnCrc(xNewState)
197 
198 
205 #define S2LPPktBasicWhitening(xNewState) S2LPWhitening(xNewState)
206 
207 
214 #define S2LPPktBasicFec(xNewState) S2LPFec(xNewState)
215 
216 
217 
227 #define S2LPPktBasicSetSyncWords(lSyncWords, xSyncLength) S2LPSetSyncWords(lSyncWords, xSyncLength)
228 
229 
240 void S2LPPktBasicInit(PktBasicInit* pxPktBasicInit);
241 void S2LPPktBasicGetInfo(PktBasicInit* pxPktBasicInit);
242 void S2LPPktBasicAddressesInit(PktBasicAddressesInit* pxPktBasicAddresses);
243 void S2LPPktBasicGetAddressesInfo(PktBasicAddressesInit* pxPktBasicAddresses);
244 void S2LPPktBasicSetFormat(void);
245 void S2LPPktBasicAddressField(SFunctionalState xAddressField);
247 void S2LPPktBasicSetPayloadLength(uint16_t nPayloadLength);
248 uint16_t S2LPPktBasicGetPayloadLength(void);
249 uint16_t S2LPPktBasicGetReceivedPktLength(void);
250 
264 #ifdef __cplusplus
265 }
266 #endif
267 
268 #endif
269 
270 /******************* (C) COPYRIGHT 2016 STMicroelectronics *****END OF FILE****/
void S2LPPktBasicSetPayloadLength(uint16_t nPayloadLength)
Set the payload length for S2LP Basic packets. Since the packet length depends from the address and t...
SFunctionalState xAddressField
SFunctionalState cExtendedPktLenField
SFunctionalState xDataWhitening
void S2LPPktBasicGetAddressesInfo(PktBasicAddressesInit *pxPktBasicAddresses)
Return the S2LP Basic packet addresses structure according to the specified parameters in the registe...
SFunctionalState xFilterOnMyAddress
uint16_t S2LPPktBasicGetPayloadLength(void)
Return the payload length for S2LP Basic packets. Since the packet length depends from the address an...
SFunctionalState
S2LP Functional state. Used to enable or disable a specific option.
Definition: S2LP_Types.h:67
uint16_t xPreambleLength
void S2LPPktBasicInit(PktBasicInit *pxPktBasicInit)
Initialize the S2LP Basic packet according to the specified parameters in the PktBasicInit struct....
Definition: S2LP_PktBasic.c:83
S2LP Basic Packet Init structure definition.
SFunctionalState xFilterOnBroadcastAddress
SFunctionalState xFilterOnMulticastAddress
S2LP Basic packet address structure definition. This structure allows users to specify the node/multi...
uint16_t S2LPPktBasicGetReceivedPktLength(void)
Return the packet length field of the received packet.
void S2LPPktBasicAddressField(SFunctionalState xAddressField)
Set the address length for S2LP Basic packets.
This file contains all the registers address and masks.
void S2LPPktBasicSetFormat(void)
Configure the Basic packet format as packet used by S2LP.
uint32_t lSyncWords
SFunctionalState xFixVarLength
void S2LPPktBasicAddressesInit(PktBasicAddressesInit *pxPktBasicAddresses)
Initialize the S2LP Basic packet addresses according to the specified parameters in the PktBasicAddre...
Configuration and management of the common features of S2-LP packets.
uint8_t xSyncLength
PktCrcMode xCrcMode
PktCrcMode
CRC length in bytes enumeration.
SFunctionalState xFec
Header file for S2-LP types.
void S2LPPktBasicGetInfo(PktBasicInit *pxPktBasicInit)
Return the S2LP Basic packet structure according to the specified parameters in the registers.
PktCrcMode BasicCrcMode
CRC length in bytes enumeration.
SFunctionalState S2LPPktBasicGetAddressField(void)
Specify if the Address field for S2LP Basic packets is enabled or disabled.