EFR32 Blue Gecko 12 Software Documentation  efr32bg12-doc-5.1.2
ezradio_transmit_plugin.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef EZRADIO_TRANSMIT_PLUGIN_H_
35 #define EZRADIO_TRANSMIT_PLUGIN_H_
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /***************************************************************************/
46 /***************************************************************************/
51 /***************************************************************************/
56 /***************************************************************************/
63 // Transmit plugin related error codes
64 #define ECODE_EMDRV_EZRADIODRV_TRANSMIT_FAILED ( ECODE_EMDRV_EZRADIODRV_TRANSMIT_PLUGIN_BASE | 0x00000001 )
65 
66 #if defined(EZRADIO_PLUGIN_TRANSMIT)
67 
70 {
75 
78 {
80 #if defined(EZRADIO_PLUGIN_AUTO_ACK) && defined(EZRADIO_PLUGIN_RECEIVE)
82 #endif
84 
87 typedef struct EZRADIODRV_FieldLength
88 {
89  uint8_t f1;
90  uint8_t f2;
91  uint8_t f3;
92  uint8_t f4;
93  uint8_t f5;
95 
98 {
100  uint16_t pktLen;
103 
106 {
109  uint8_t channel;
111  uint16_t pktId;
113 
114 
115 Ecode_t ezradioStartTransmitBasic(EZRADIODRV_Handle_t radioHandle, uint16_t packetLength, uint8_t *pioRadioPacket);
116 Ecode_t ezradioStartTransmitConfigured(EZRADIODRV_Handle_t radioHandle, uint8_t *pioRadioPacket);
117 Ecode_t ezradioStartTransmitCustom(EZRADIODRV_Handle_t radioHandle, EZRADIODRV_PacketLengthConfig_t pktLengthConf, uint8_t *pioRadioPacket);
118 
119 Ecode_t ezradioStartTransmitDefault(EZRADIODRV_Handle_t radioHandle, uint8_t *pioRadioPacket);
120 Ecode_t ezradioStartTransmitSmart(EZRADIODRV_Handle_t radioHandle, EZRADIODRV_PacketLengthConfig_t pktLengthConf, uint8_t *pioRadioPacket);
121 
123 #define EZRADIODRV_TRANSMIT_PLUGIN_INIT_DEFAULT \
124 { /* Packet TX */ \
125  NULL, /* CallBack */ \
126  { /* Packet length config */ \
127  ezradiodrvTransmitLenghtDefault, /* Default length mode */ \
128  0, /* Packet length */ \
129  {0,0,0,0,0} /* Field lengths */ \
130  }, \
131  RADIO_CONFIGURATION_DATA_CHANNEL_NUMBER, /* Channel */ \
132  ezradiodrvPacketTypeNormal, /* Packet type */ \
133  0, /* Packet ID */ \
134 },
135 
136 #else //#if defined( EZRADIO_PLUGIN_TRANSMIT )
137 #define EZRADIODRV_TRANSMIT_PLUGIN_INIT_DEFAULT
138 #endif //#if defined( EZRADIO_PLUGIN_TRANSMIT )
139 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* EZRADIO_TRANSMIT_PLUGIN_H_ */
Ecode_t ezradioStartTransmitDefault(EZRADIODRV_Handle_t radioHandle, uint8_t *pioRadioPacket)
Start a default transmission using the packet information previously set to radioHandle. Depending on the information in the radioHandle parameter the function decides which transmission function has to be called.
uint8_t f1
Field 1 length.
uint8_t f5
Field 5 length.
EZRADIODRV_TransmitPacketType
EzRadio transmit packet type.
uint8_t channel
Transmission channel.
Auto acknowledge packet type.
EZRADIODRV_TransmitLengthMode_t lenMode
Length mode.
struct EZRADIODRV_PacketLengthConfig EZRADIODRV_PacketLengthConfig_t
EzRadio transmit packet length configuration structure.
EzRadio transmit packet length configuration structure.
EZRADIODRV_FieldLength_t fieldLen
Field lengths.
Ecode_t ezradioStartTransmitSmart(EZRADIODRV_Handle_t radioHandle, EZRADIODRV_PacketLengthConfig_t pktLengthConf, uint8_t *pioRadioPacket)
Start a smart transmission. Depending on the information in the pktLengthConf parameter the function ...
Ecode_t ezradioStartTransmitBasic(EZRADIODRV_Handle_t radioHandle, uint16_t packetLength, uint8_t *pioRadioPacket)
Start basic transmission. Radio transmits with data only in the first field in this case...
Transmit packet length is defined by the application for field1 only.
EZRADIODRV_Callback_t userCallback
User callback.
EZRADIODRV_TransmitLengthMode
EzRadio transmit packet length mode.
uint32_t Ecode_t
Typedef for API function error code return values.
Definition: ecode.h:51
Transmit packet length is defined in the generated configuration.
EzRadio transmit plug-in instance initialization and handler structure.
struct EZRADIODRV_FieldLength EZRADIODRV_FieldLength_t
uint8_t f4
Field 4 length.
void(* EZRADIODRV_Callback_t)(EZRADIODRV_Handle_t handle, Ecode_t status)
EZRADIODRV feature callback function interface.
Transmit packet length is defined by the application for multiple fields.
Ecode_t ezradioStartTransmitConfigured(EZRADIODRV_Handle_t radioHandle, uint8_t *pioRadioPacket)
Start transmission using the packet parameters from the generated configuration header file...
Ecode_t ezradioStartTransmitCustom(EZRADIODRV_Handle_t radioHandle, EZRADIODRV_PacketLengthConfig_t pktLengthConf, uint8_t *pioRadioPacket)
Start transmission using the packet parameters from pktLengthConf.
EZRADIODRV_TransmitPacketType_t pktType
Packet type.
uint8_t f2
Field 2 length.
enum EZRADIODRV_TransmitPacketType EZRADIODRV_TransmitPacketType_t
EzRadio transmit packet type.
enum EZRADIODRV_TransmitLengthMode EZRADIODRV_TransmitLengthMode_t
EzRadio transmit packet length mode.
EZRADIODRV_PacketLengthConfig_t lenConfig
Packet length configuration.
uint8_t f3
Field 3 length.
struct EZRADIODRV_PacketTxHandle EZRADIODRV_PacketTxHandle_t
EzRadio transmit plug-in instance initialization and handler structure.