Multi Rail Demo#

API and Callbacks for the Multi Rail Demo Component.

This component provides the sample code for using dual RAIL instances. It includes a simple CLI to demonstrate the functionality.

Modules#

Multirail Demo

API#

RAIL_Handle_t
sl_zigbee_af_multirail_demo_init(RAIL_Config_t *railCfg, RAIL_TxPowerConfig_t *txPowerConfig, bool paAutoMode, RAIL_TxPower_t defaultTxPower, uint8_t *txFifo, uint16_t txFifoSize, uint16_t panId, const uint8_t *ieeeAddr)

Initialize a new RAIL handle.

RAIL_Handle_t

Return the second RAIL handle.

RAIL_Status_t
sl_zigbee_af_multirail_demo_send(const uint8_t *buff, uint32_t size, uint8_t channel, RAIL_ScheduleTxConfig_t *scheduledTxConfig, RAIL_SchedulerInfo_t *schedulerInfo)

Send a packet using the second RAIL instance.

API Documentation#

sl_zigbee_af_multirail_demo_init#

RAIL_Handle_t sl_zigbee_af_multirail_demo_init (RAIL_Config_t * railCfg, RAIL_TxPowerConfig_t * txPowerConfig, bool paAutoMode, RAIL_TxPower_t defaultTxPower, uint8_t * txFifo, uint16_t txFifoSize, uint16_t panId, const uint8_t * ieeeAddr)

Initialize a new RAIL handle.

Parameters
TypeDirectionArgument NameDescription
RAIL_Config_t *N/ArailCfg

RAIL init options (NULL to use the current Zigbee config)

RAIL_TxPowerConfig_t *N/AtxPowerConfig

RAIL power options (NULL to use defaults)

boolN/ApaAutoMode

Whether an automatic PA mode is enabled

RAIL_TxPower_tN/AdefaultTxPower

Default TX power in deci-dBm

uint8_t *N/AtxFifo

Pointer to a TX FIFO buffer (NULL to use the default)

uint16_tN/AtxFifoSize

Size of the TX buffer

uint16_tN/ApanId

PAN ID (use 0xFFFF if not needed)

const uint8_t *N/AieeeAddr

Long IEEE address (use NULL if not needed)

Returns

  • New RAIL handle, NULL if not successfully initialized.


sl_zigbee_af_multirail_demo_get_handle#

RAIL_Handle_t sl_zigbee_af_multirail_demo_get_handle (void )

Return the second RAIL handle.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • The second RAIL handle. Null if not initialized.


sl_zigbee_af_multirail_demo_send#

RAIL_Status_t sl_zigbee_af_multirail_demo_send (const uint8_t * buff, uint32_t size, uint8_t channel, RAIL_ScheduleTxConfig_t * scheduledTxConfig, RAIL_SchedulerInfo_t * schedulerInfo)

Send a packet using the second RAIL instance.

Parameters
TypeDirectionArgument NameDescription
const uint8_t *N/Abuff

Pointer to the data (make sue it is properly formatted)

uint32_tN/Asize

Size of the data

uint8_tN/Achannel

Channel (11-26, or 0 to use the current Zigbee channel)

RAIL_ScheduleTxConfig_t *N/AscheduledTxConfig

(optional)

RAIL_SchedulerInfo_t *N/AschedulerInfo

(optional) Scheduler configuration (NULL to use defaults)

Returns

  • RAIL status.