EFR32 Mighty Gecko 13 Software Documentation  efr32mg13-doc-5.1.2
Transmit_Plugin

Detailed Description

Transmit plugin, see Plugin System Layer for detailed documentation.

.

Data Structures

struct  EZRADIODRV_FieldLength
 
struct  EZRADIODRV_PacketLengthConfig
 EzRadio transmit packet length configuration structure. More...
 
struct  EZRADIODRV_PacketTxHandle
 EzRadio transmit plug-in instance initialization and handler structure. More...
 

Macros

#define ECODE_EMDRV_EZRADIODRV_TRANSMIT_FAILED   ( ECODE_EMDRV_EZRADIODRV_TRANSMIT_PLUGIN_BASE | 0x00000001 )
 Unable to start transmission.
 
#define EZRADIODRV_TRANSMIT_PLUGIN_INIT_DEFAULT
 Configuration data for EzRadio transmit plug-in. More...
 

Typedefs

typedef struct EZRADIODRV_FieldLength EZRADIODRV_FieldLength_t
 
typedef struct EZRADIODRV_PacketLengthConfig EZRADIODRV_PacketLengthConfig_t
 EzRadio transmit packet length configuration structure.
 
typedef struct EZRADIODRV_PacketTxHandle EZRADIODRV_PacketTxHandle_t
 EzRadio transmit plug-in instance initialization and handler structure.
 
typedef enum EZRADIODRV_TransmitLengthMode EZRADIODRV_TransmitLengthMode_t
 EzRadio transmit packet length mode.
 
typedef enum EZRADIODRV_TransmitPacketType EZRADIODRV_TransmitPacketType_t
 EzRadio transmit packet type.
 

Enumerations

enum  EZRADIODRV_TransmitLengthMode {
  ezradiodrvTransmitLenghtDefault = 0,
  ezradiodrvTransmitLenghtCustomPacketLen = 1,
  ezradiodrvTransmitLenghtCustomFieldLen = 2
}
 EzRadio transmit packet length mode. More...
 
enum  EZRADIODRV_TransmitPacketType {
  ezradiodrvPacketTypeNormal = 0,
  ezradiodrvPacketTypeAutoAck = 1
}
 EzRadio transmit packet type. More...
 

Functions

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. More...
 
Ecode_t ezradioStartTransmitConfigured (EZRADIODRV_Handle_t radioHandle, uint8_t *pioRadioPacket)
 Start transmission using the packet parameters from the generated configuration header file. More...
 
Ecode_t ezradioStartTransmitCustom (EZRADIODRV_Handle_t radioHandle, EZRADIODRV_PacketLengthConfig_t pktLengthConf, uint8_t *pioRadioPacket)
 Start transmission using the packet parameters from pktLengthConf. More...
 
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. More...
 
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 decides which transmission function has to be called. More...
 

Macro Definition Documentation

#define EZRADIODRV_TRANSMIT_PLUGIN_INIT_DEFAULT
Value:
{ /* Packet TX */ \
NULL, /* CallBack */ \
{ /* Packet length config */ \
ezradiodrvTransmitLenghtDefault, /* Default length mode */ \
0, /* Packet length */ \
{0,0,0,0,0} /* Field lengths */ \
}, \
RADIO_CONFIGURATION_DATA_CHANNEL_NUMBER, /* Channel */ \
ezradiodrvPacketTypeNormal, /* Packet type */ \
0, /* Packet ID */ \
},

Configuration data for EzRadio transmit plug-in.

Definition at line 123 of file ezradio_transmit_plugin.h.

Typedef Documentation

EzRadio transmit field length sturcture. Holds length information on all available fields. Data is got from the generated radio configuration header file.

Enumeration Type Documentation

EzRadio transmit packet length mode.

Enumerator
ezradiodrvTransmitLenghtDefault 

Transmit packet length is defined in the generated configuration.

ezradiodrvTransmitLenghtCustomPacketLen 

Transmit packet length is defined by the application for field1 only.

ezradiodrvTransmitLenghtCustomFieldLen 

Transmit packet length is defined by the application for multiple fields.

Definition at line 69 of file ezradio_transmit_plugin.h.

EzRadio transmit packet type.

Enumerator
ezradiodrvPacketTypeNormal 

Normal packet type.

ezradiodrvPacketTypeAutoAck 

Auto acknowledge packet type.

Definition at line 77 of file ezradio_transmit_plugin.h.

Function Documentation

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.

Parameters
radioHandleHandler of the EzRadio driver instance where packet length and channel configurations are set.
packetLengthLength of the basic packet.
pioRadioPacketPointer to the packet buffer.
Returns
ECODE_EMDRV_EZRADIODRV_OK on success. On failure an appropriate EZRADIODRV Ecode_t is returned.

Definition at line 70 of file ezradio_transmit_plugin.c.

References ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE, ECODE_EMDRV_EZRADIODRV_OK, ezradiodrvTransmitLenghtCustomPacketLen, EZRADIODRV_FieldLength::f1, EZRADIODRV_FieldLength::f2, EZRADIODRV_FieldLength::f3, EZRADIODRV_FieldLength::f4, EZRADIODRV_FieldLength::f5, EZRADIODRV_PacketLengthConfig::fieldLen, EZRADIODRV_PacketTxHandle::lenConfig, EZRADIODRV_PacketLengthConfig::lenMode, EZRADIODRV_HandleData::packetTx, and EZRADIODRV_PacketLengthConfig::pktLen.

Referenced by ezradioStartTransmitSmart().

Ecode_t ezradioStartTransmitConfigured ( EZRADIODRV_Handle_t  radioHandle,
uint8_t *  pioRadioPacket 
)

Start transmission using the packet parameters from the generated configuration header file.

Parameters
radioHandleHandler of the EzRadio driver instance where packet length and channel configurations are set.
pioRadioPacketPointer to the packet buffer.
Returns
ECODE_EMDRV_EZRADIODRV_OK on success. On failure an appropriate EZRADIODRV Ecode_t is returned.

Definition at line 114 of file ezradio_transmit_plugin.c.

References ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE, ECODE_EMDRV_EZRADIODRV_OK, ezradiodrvTransmitLenghtDefault, EZRADIODRV_FieldLength::f1, EZRADIODRV_FieldLength::f2, EZRADIODRV_FieldLength::f3, EZRADIODRV_FieldLength::f4, EZRADIODRV_FieldLength::f5, EZRADIODRV_PacketLengthConfig::fieldLen, EZRADIODRV_PacketTxHandle::lenConfig, EZRADIODRV_PacketLengthConfig::lenMode, EZRADIODRV_HandleData::packetTx, and EZRADIODRV_PacketLengthConfig::pktLen.

Referenced by ezradioStartTransmitSmart().

Ecode_t ezradioStartTransmitCustom ( EZRADIODRV_Handle_t  radioHandle,
EZRADIODRV_PacketLengthConfig_t  pktLengthConf,
uint8_t *  pioRadioPacket 
)

Start transmission using the packet parameters from pktLengthConf.

Parameters
radioHandleHandler of the EzRadio driver instance where packet length and channel configurations are set.
pktLengthConfPacket length configuration structure configuration of the custom packet.
pioRadioPacketPointer to the packet buffer.
Returns
ECODE_EMDRV_EZRADIODRV_OK on success. On failure an appropriate EZRADIODRV Ecode_t is returned.

Definition at line 157 of file ezradio_transmit_plugin.c.

References ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE, ECODE_EMDRV_EZRADIODRV_OK, ezradiodrvTransmitLenghtCustomPacketLen, EZRADIODRV_FieldLength::f1, EZRADIODRV_FieldLength::f2, EZRADIODRV_FieldLength::f3, EZRADIODRV_FieldLength::f4, EZRADIODRV_FieldLength::f5, EZRADIODRV_PacketLengthConfig::fieldLen, EZRADIODRV_PacketTxHandle::lenConfig, EZRADIODRV_PacketLengthConfig::lenMode, EZRADIODRV_HandleData::packetTx, and EZRADIODRV_PacketLengthConfig::pktLen.

Referenced by ezradioStartTransmitSmart().

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.

Parameters
radioHandleHandler of the EzRadio driver instance where packet length and channel configurations are set.
pioRadioPacketPointer to the packet buffer.
Returns
ECODE_EMDRV_EZRADIODRV_OK on success. On failure an appropriate EZRADIODRV Ecode_t is returned.

Definition at line 234 of file ezradio_transmit_plugin.c.

References ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE, ECODE_EMDRV_EZRADIODRV_OK, ezradioStartTransmitSmart(), EZRADIODRV_PacketTxHandle::lenConfig, and EZRADIODRV_HandleData::packetTx.

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 decides which transmission function has to be called.

Parameters
radioHandleHandler of the EzRadio driver instance where packet length and channel configurations are set.
pktLengthConfPacket length configuration structure configuration of the custom packet.
pioRadioPacketPointer to the packet buffer.
Returns
ECODE_EMDRV_EZRADIODRV_OK on success. On failure an appropriate EZRADIODRV Ecode_t is returned.

Definition at line 198 of file ezradio_transmit_plugin.c.

References ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE, ECODE_EMDRV_EZRADIODRV_OK, ezradiodrvTransmitLenghtCustomFieldLen, ezradiodrvTransmitLenghtCustomPacketLen, ezradiodrvTransmitLenghtDefault, ezradioStartTransmitBasic(), ezradioStartTransmitConfigured(), ezradioStartTransmitCustom(), EZRADIODRV_PacketLengthConfig::lenMode, and EZRADIODRV_PacketLengthConfig::pktLen.

Referenced by ezradioStartTransmitDefault().