Appiko
S2LP_PktWMbus.h
Go to the documentation of this file.
1 
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __S2LP_PACKET_WMBUS_H
53 #define __S2LP_PACKET_WMBUS_H
54 
55 
56 /* Includes ------------------------------------------------------------------*/
57 
58 #include "S2LP_Regs.h"
59 #include "S2LP_Types.h"
60 #include "S2LP_PacketHandler.h"
61 
62 #ifdef __cplusplus
63  extern "C" {
64 #endif
65 
66 
67 
92 typedef enum {
98 } WMbusSubmode;
99 
100 
104 typedef struct {
106  uint8_t cPreambleLength;
108 } PktWMbusInit;
109 
127 #define S2LPPktWMbusSetPreambleLength(xPreambleLength) S2LPPktCommonSetPreambleLength((PktPreambleLength)xPreambleLength)
128 
129 
135 #define S2LPPktWMbusGetPreambleLength() S2LPPktCommonGetPreambleLength()
136 
137 
138 void S2LPPktWMbusInit(PktWMbusInit* pxPktWMbusInit);
139 void S2LPPktWMbusGetInfo(PktWMbusInit* pxPktWMbusInit);
140 void S2LPPktWMbusSetFormat(void);
141 void S2LPPktWMbusSetPostamble(uint8_t cPostamble);
142 uint8_t S2LPPktWMbusGetPostamble(void);
143 void S2LPPktWMbusSetPostamblePattern(uint8_t cPostamble);
144 uint8_t S2LPPktWMbusGetPostamblePattern(void);
145 void S2LPPktWMbusSetSubmode(WMbusSubmode xWMbusSubmode);
147 void S2LPPktWMbusSetPayloadLength(uint16_t nPayloadLength);
148 uint16_t S2LPPktWMbusGetPayloadLength(void);
149 
150 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif
170 
171 /******************* (C) COPYRIGHT 2016 STMicroelectronics *****END OF FILE****/
S2LP WMBUS Packet Init structure definition.
WMbusSubmode
WMbus submode enumeration.
Definition: S2LP_PktWMbus.h:92
void S2LPPktWMbusSetPostamble(uint8_t cPostamble)
Set how many chips will be used in postamble.
void S2LPPktWMbusGetInfo(PktWMbusInit *pxPktWMbusInit)
Return the S2LP WMBUS packet structure according to the specified parameters in the registers.
void S2LPPktWMbusInit(PktWMbusInit *pxPktWMbusInit)
Initialize the S2LP WMBUS packet according to the specified parameters in the PktWMbusInit struct.
This file contains all the registers address and masks.
uint8_t S2LPPktWMbusGetPostamble(void)
Returns how many chips are used in the postamble.
WMbusSubmode xWMbusSubmode
void S2LPPktWMbusSetPostamblePattern(uint8_t cPostamble)
Set the pattern of the postamble.
uint16_t S2LPPktWMbusGetPayloadLength(void)
Return the payload length for WMBUS packets.
Configuration and management of the common features of S2-LP packets.
void S2LPPktWMbusSetSubmode(WMbusSubmode xWMbusSubmode)
Set the W-MBus submode.
uint8_t S2LPPktWMbusGetPostamblePattern(void)
Returns the pattern of the postamble.
void S2LPPktWMbusSetFormat(void)
Configure the WMBUS packet format as the one used by S2LP.
WMbusSubmode S2LPPktWMbusGetSubmode(void)
Return the WMBUS submode used.
void S2LPPktWMbusSetPayloadLength(uint16_t nPayloadLength)
Sets the payload length for S2LP WMBUS packets.
uint8_t cPreambleLength
Header file for S2-LP types.
uint8_t cPostambleLength