zephyr: Kconfig: Add CONFIG_SOC_GECKO_CUSTOM_RADIO_PHY

Currently on Zephyr, RAIL library is used only by Bluetooth applications,
with this update, it will be able to be used for sample applications with
custom radio phys.
All files were copied from Silicon Labs GSDK v4.2.4.
commit hash: 1335d677c43c3e0e37af16583ec97a1e0c6f0be6

Signed-off-by: Zoltan Havas <zoltan.havas@silabs.com>
This commit is contained in:
Zoltan Havas 2023-10-26 14:25:48 +02:00 committed by Filip Kokosiński
parent d077bf632a
commit 72a67203f0
19 changed files with 6298 additions and 0 deletions

View File

@ -90,6 +90,21 @@ if(${CONFIG_SOC_GECKO_HAS_RADIO})
# prebuilt libs
add_prebuilt_library(librail gecko/platform/radio/rail_lib/autogen/librail_release/librail_efr32xg${GECKO_SERIES_NUMBER}_gcc_release.a)
if(CONFIG_SOC_GECKO_CUSTOM_RADIO_PHY)
zephyr_include_directories(
platform/radio/rail_lib/plugin/rail_util_init/config/proprietary
platform/radio/rail_lib/plugin/rail_util_callbacks
platform/radio/rail_lib/plugin/rail_util_callbacks/config
platform/radio/rail_lib/plugin/rail_util_protocol
platform/radio/rail_lib/plugin/rail_util_protocol/config/efr32xg${GECKO_SERIES_NUMBER}/
platform/radio/rail_lib/protocol/ble
platform/radio/rail_lib/protocol/ieee802154
platform/radio/rail_lib/protocol/zwave
)
zephyr_sources(platform/radio/rail_lib/plugin/rail_util_protocol/sl_rail_util_protocol.c)
endif()
endif()
endif()

View File

@ -0,0 +1,44 @@
/***************************************************************************//**
* @file
* @brief RAIL callbacks configuration header file.
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_CALLBACKS_CONFIG_H
#define SL_RAIL_UTIL_CALLBACKS_CONFIG_H
// <<< Use Configuration Wizard in Context Menu >>>
// <h> RAIL Callbacks Configuration
// <q SL_RAIL_UTIL_CALLBACKS_ASSERT_FAILED_OVERRIDE> Override weak internal RAIL callback RAILCb_AssertFailed()
// <i> Default: 1
#define SL_RAIL_UTIL_CALLBACKS_ASSERT_FAILED_OVERRIDE 1
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_CALLBACKS_CONFIG_H

View File

@ -0,0 +1,82 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_CALLBACKS_H
#define SL_RAIL_UTIL_CALLBACKS_H
#include "rail.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* A callback available to the application, called on RAIL asserts.
*
* @param[in] rail_handle The RAIL handle associated with the assert.
* @param[in] error_code The assertion error code.
*/
void sl_rail_util_on_assert_failed(RAIL_Handle_t rail_handle,
RAIL_AssertErrorCodes_t error_code);
/**
* A callback available to the application, called on RAIL init completion.
*
* @param[in] rail_handle The RAIL handle associated with the RAIL init
* completion notification.
*/
void sl_rail_util_on_rf_ready(RAIL_Handle_t rail_handle);
/**
* A callback available to the application, called on a channel configuration
* change.
*
* @param[in] rail_handle The RAIL handle associated with the channel config
* change notification.
* @param[in] entry The channel configuration being changed to.
*/
void sl_rail_util_on_channel_config_change(RAIL_Handle_t rail_handle,
const RAIL_ChannelConfigEntry_t *entry);
/**
* A callback available to the application, called on registered RAIL events.
*
* @param[in] rail_handle The RAIL handle associated with the RAIL event
* notification.
* @param[in] events The RAIL events having occurred.
*/
void sl_rail_util_on_event(RAIL_Handle_t rail_handle,
RAIL_Events_t events);
#ifdef __cplusplus
}
#endif
#endif // SL_RAIL_UTIL_CALLBACKS_H

View File

@ -0,0 +1,81 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SLI_RAIL_UTIL_CALLBACKS_H
#define SLI_RAIL_UTIL_CALLBACKS_H
#include "rail.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* An internal callback, called on RAIL init completion.
*
* @param[in] rail_handle The RAIL handle associated with the RAIL init
* completion notification.
*
* @note: This function is not intended for application use. For application
* use, see \ref sl_rail_util_on_rf_ready.
*/
void sli_rail_util_on_rf_ready(RAIL_Handle_t rail_handle);
/**
* An internal callback, called on a channel configuration change.
*
* @param[in] rail_handle The RAIL handle associated with the channel config
* change notification.
* @param[in] entry The channel configuration being changed to.
*
* @note: This function is not intended for application use. For application
* use, see \ref sl_rail_util_on_channel_config_change.
*/
void sli_rail_util_on_channel_config_change(RAIL_Handle_t rail_handle,
const RAIL_ChannelConfigEntry_t *entry);
/**
* An internal callback, called on registered RAIL events.
*
* @param[in] rail_handle The RAIL handle associated with the RAIL event
* notification.
* @param[in] events The RAIL events having occurred.
*
* @note: This function is not intended for application use. For application
* use, see \ref sl_rail_util_on_event.
*/
void sli_rail_util_on_event(RAIL_Handle_t rail_handle,
RAIL_Events_t events);
#ifdef __cplusplus
}
#endif
#endif // SLI_RAIL_UTIL_CALLBACKS_H

View File

@ -0,0 +1,332 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_INIT_INST0_CONFIG_H
#define SL_RAIL_UTIL_INIT_INST0_CONFIG_H
#include "rail_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> RAIL Init Configuration
// <e SL_RAIL_UTIL_INIT_INST0_ENABLE> Initialize RAIL
// <i> Default: 1
#define SL_RAIL_UTIL_INIT_INST0_ENABLE 1
// <h> Project Configuration
// <q SL_RAIL_UTIL_INIT_RADIO_CONFIG_SUPPORT_INST0_ENABLE> Enable Radio Configurator Support (include rail_config.c/h generated by Radio Config)
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_RADIO_CONFIG_SUPPORT_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_INIT_COMPLETE_CALLBACK_INST0_ENABLE> Enable RAIL Init Complete Callback
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_INIT_COMPLETE_CALLBACK_INST0_ENABLE 1
// </h>
// <e SL_RAIL_UTIL_INIT_PROTOCOLS_INST0_ENABLE> Protocol Configuration
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_PROTOCOLS_INST0_ENABLE 1
// <h> Radio Configuration
// <o SL_RAIL_UTIL_INIT_PROTOCOL_INST0_DEFAULT> Default Radio Configuration
// <SL_RAIL_UTIL_PROTOCOL_PROPRIETARY=> Proprietary (use rail_config.c/h)
// <SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS=> Bluetooth LE 1Mbps
// <SL_RAIL_UTIL_PROTOCOL_BLE_2MBPS=> Bluetooth LE 2Mbps
// <SL_RAIL_UTIL_PROTOCOL_BLE_CODED_125KBPS=> Bluetooth LE Coded 125Kbps
// <SL_RAIL_UTIL_PROTOCOL_BLE_CODED_500KBPS=> Bluetooth LE Coded 500Kbps
// <SL_RAIL_UTIL_PROTOCOL_BLE_QUUPPA_1MBPS=> Bluetooth Quuppa 1Mbps
// <SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ=> IEEE 802.15.4 2.4GHz
// <SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV=> IEEE 802.15.4 2.4GHz, antenna diversity
// <SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_COEX=> IEEE 802.15.4 2.4GHz, coexistence
// <SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV_COEX=> IEEE 802.15.4 2.4GHz, antenna diversity, coexistence
// <i> Default: SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS
#define SL_RAIL_UTIL_INIT_PROTOCOL_INST0_DEFAULT SL_RAIL_UTIL_PROTOCOL_PROPRIETARY
// <o SL_RAIL_UTIL_INIT_PROTOCOL_PROPRIETARY_INST0_INDEX> Proprietary Radio Config Index (if Proprietary radio config selected, use index X of channelConfigs[X])
// <0-255:1>
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_PROTOCOL_PROPRIETARY_INST0_INDEX 0
// </h>
// </e>
// <e SL_RAIL_UTIL_INIT_CALIBRATIONS_INST0_ENABLE> Calibration Configuration
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_CALIBRATIONS_INST0_ENABLE 1
// <h> Calibration Notifications
// <q SL_RAIL_UTIL_INIT_CALIBRATION_TEMPERATURE_NOTIFY_INST0_ENABLE> Enable Temperature Calibration Notifications (RAIL_EVENT_CAL_NEEDED radio event issued when temperature calibrations needed, for example VCO calibration)
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_CALIBRATION_TEMPERATURE_NOTIFY_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_CALIBRATION_ONETIME_NOTIFY_INST0_ENABLE> Enable One-time Calibration Notifications (RAIL_EVENT_CAL_NEEDED radio event issued when one-time calibrations needed, for example IR calibration)
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_CALIBRATION_ONETIME_NOTIFY_INST0_ENABLE 1
// </h>
// </e>
// <e SL_RAIL_UTIL_INIT_TRANSITIONS_INST0_ENABLE> Auto Transition Configuration
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_TRANSITIONS_INST0_ENABLE 1
// <h> TX Transitions
// <o SL_RAIL_UTIL_INIT_TRANSITION_INST0_TX_SUCCESS> Transition on TX Success
// <RAIL_RF_STATE_RX=> RX
// <RAIL_RF_STATE_IDLE=> Idle
// <i> Default: RAIL_RF_STATE_IDLE
#define SL_RAIL_UTIL_INIT_TRANSITION_INST0_TX_SUCCESS RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_INIT_TRANSITION_INST0_TX_ERROR> Transition on TX Error
// <RAIL_RF_STATE_RX=> RX
// <RAIL_RF_STATE_IDLE=> Idle
// <i> Default: RAIL_RF_STATE_IDLE
#define SL_RAIL_UTIL_INIT_TRANSITION_INST0_TX_ERROR RAIL_RF_STATE_RX
// </h>
// <h> RX Transitions
// <o SL_RAIL_UTIL_INIT_TRANSITION_INST0_RX_SUCCESS> Transition on RX Success
// <RAIL_RF_STATE_RX=> RX
// <RAIL_RF_STATE_TX=> TX
// <RAIL_RF_STATE_IDLE=> Idle
// <i> Default: RAIL_RF_STATE_IDLE
#define SL_RAIL_UTIL_INIT_TRANSITION_INST0_RX_SUCCESS RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_INIT_TRANSITION_INST0_RX_ERROR> Transition on RX Error
// <RAIL_RF_STATE_RX=> RX
// <RAIL_RF_STATE_IDLE=> Idle
// <i> Default: RAIL_RF_STATE_IDLE
#define SL_RAIL_UTIL_INIT_TRANSITION_INST0_RX_ERROR RAIL_RF_STATE_RX
// </h>
// </e>
// <e SL_RAIL_UTIL_INIT_DATA_FORMATS_INST0_ENABLE> Data Format Configuration
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_DATA_FORMATS_INST0_ENABLE 1
// <h> TX Data
// <o SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_TX_SOURCE> Source of TX Data
// <TX_PACKET_DATA=> Use frame hardware to packetize data
// <i> Default: TX_PACKET_DATA
#define SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_TX_SOURCE TX_PACKET_DATA
// <o SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_TX_MODE> Method of Providing TX Data
// <PACKET_MODE=> Packet Mode
// <FIFO_MODE=> FIFO Mode
// <i> Default: PACKET_MODE
#define SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_TX_MODE PACKET_MODE
// </h>
// <h> RX Data
// <o SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_RX_SOURCE> Source of RX Data
// <RX_PACKET_DATA=> Use frame hardware to packetize data
// <RX_DEMOD_DATA=> Get 8-bit output from demodulator
// <RX_IQDATA_FILTLSB=> Get lowest 16 bits of I/Q data provided to demodulator
// <RX_IQDATA_FILTMSB=> Get highest 16 bits of I/Q data provided to demodulator
// <i> Default: RX_PACKET_DATA
#define SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_RX_SOURCE RX_PACKET_DATA
// <o SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_RX_MODE> Method of Retrieving RX Data
// <PACKET_MODE=> Packet Mode
// <FIFO_MODE=> FIFO Mode
// <i> Default: PACKET_MODE
#define SL_RAIL_UTIL_INIT_DATA_FORMAT_INST0_RX_MODE PACKET_MODE
// </h>
// </e>
// <e SL_RAIL_UTIL_INIT_EVENTS_INST0_ENABLE> Radio Event Configuration
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENTS_INST0_ENABLE 1
// <h> RX Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_RX_TIMING_DETECT_INST0_ENABLE> RX Timing Detect
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_TIMING_DETECT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_TIMING_LOST_INST0_ENABLE> RX Timing Lost
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_TIMING_LOST_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_PREAMBLE_DETECT_INST0_ENABLE> RX Preamble Detect
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_PREAMBLE_DETECT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_PREAMBLE_LOST_INST0_ENABLE> RX Preamble Lost
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_PREAMBLE_LOST_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_RX_SYNC1_DETECT_INST0_ENABLE> RX Sync1 Detect
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_SYNC1_DETECT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_SYNC2_DETECT_INST0_ENABLE> RX Sync2 Detect
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_SYNC2_DETECT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_FILTER_PASSED_INST0_ENABLE> RX Filter Passed
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_FILTER_PASSED_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_ADDRESS_FILTERED_INST0_ENABLE> RX Address Filtered
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_ADDRESS_FILTERED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_RX_PACKET_RECEIVED_INST0_ENABLE> RX Packet Received
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_PACKET_RECEIVED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_RX_FRAME_ERROR_INST0_ENABLE> RX Frame Error
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_FRAME_ERROR_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_PACKET_ABORTED_INST0_ENABLE> RX Packet Aborted
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_PACKET_ABORTED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_RX_TIMEOUT_INST0_ENABLE> RX Timeout
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_TIMEOUT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_CHANNEL_HOPPING_COMPLETE_INST0_ENABLE> RX Channel Hopping Complete
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_CHANNEL_HOPPING_COMPLETE_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_DUTY_CYCLE_RX_END_INST0_ENABLE> RX Duty Cycle RX End
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_DUTY_CYCLE_RX_END_INST0_ENABLE 0
// </h>
// <h> TX Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_TX_PACKET_SENT_INST0_ENABLE> TX Packet Sent
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_PACKET_SENT_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_ABORTED_INST0_ENABLE> TX Aborted
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_ABORTED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_BLOCKED_INST0_ENABLE> TX Blocked
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_BLOCKED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_STARTED_INST0_ENABLE> TX Started
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_STARTED_INST0_ENABLE 0
// </h>
// <h> RSSI Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_RSSI_AVERAGE_DONE_INST0_ENABLE> RSSI Average Done
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RSSI_AVERAGE_DONE_INST0_ENABLE 0
// </h>
// <h> FIFO Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_ALMOST_FULL_INST0_ENABLE> RX FIFO, Almost Full
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_ALMOST_FULL_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_FULL_INST0_ENABLE> RX FIFO, Full
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_FULL_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_OVERFLOW_INST0_ENABLE> RX FIFO, Overflow
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_FIFO_OVERFLOW_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_FIFO_ALMOST_EMPTY_INST0_ENABLE> TX FIFO, Almost Empty
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_FIFO_ALMOST_EMPTY_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TX_UNDERFLOW_INST0_ENABLE> TX FIFO, Underflow
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_UNDERFLOW_INST0_ENABLE 1
// </h>
// <h> CCA Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_TX_CHANNEL_CLEAR_INST0_ENABLE> TX CCA, Channel Clear
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_CHANNEL_CLEAR_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TX_CHANNEL_BUSY_INST0_ENABLE> TX CCA, Channel Busy
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_CHANNEL_BUSY_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_CCA_RETRY_INST0_ENABLE> TX CCA, Retry
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_CCA_RETRY_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TX_START_CCA_INST0_ENABLE> TX CCA, Started
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_START_CCA_INST0_ENABLE 0
// </h>
// <h> Scheduled Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_RX_TX_SCHEDULED_RX_TX_STARTED_INST0_ENABLE> Scheduled RX/TX Started
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_TX_SCHEDULED_RX_TX_STARTED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_RX_SCHEDULED_RX_END_INST0_ENABLE> Scheduled RX End
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_SCHEDULED_RX_END_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_RX_SCHEDULED_RX_MISSED_INST0_ENABLE> Scheduled RX Missed
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_SCHEDULED_RX_MISSED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_TX_SCHEDULED_TX_MISSED_INST0_ENABLE> Scheduled TX Missed
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_SCHEDULED_TX_MISSED_INST0_ENABLE 1
// </h>
// <h> ACK Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_RX_ACK_TIMEOUT_INST0_ENABLE> RX ACK, Timeout
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_RX_ACK_TIMEOUT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TXACK_PACKET_SENT_INST0_ENABLE> TX ACK, Packet Sent
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TXACK_PACKET_SENT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TXACK_ABORTED_INST0_ENABLE> TX ACK, Aborted
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TXACK_ABORTED_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TXACK_BLOCKED_INST0_ENABLE> TX ACK, Blocked
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TXACK_BLOCKED_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TXACK_UNDERFLOW_INST0_ENABLE> TX ACK, FIFO Underflow
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TXACK_UNDERFLOW_INST0_ENABLE 0
// </h>
// <h> Protocol Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_IEEE802154_DATA_REQUEST_COMMAND_INST0_ENABLE> IEEE 802.15.4 Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_IEEE802154_DATA_REQUEST_COMMAND_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_ZWAVE_BEAM_INST0_ENABLE> Z-Wave Beam
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_ZWAVE_BEAM_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_ZWAVE_LR_ACK_REQUEST_COMMAND_INST0_ENABLE> Z-Wave LR ACK Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_ZWAVE_LR_ACK_REQUEST_COMMAND_INST0_ENABLE 0
// </h>
// <h> Dynamic Multiprotocol (DMP) Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_CONFIG_UNSCHEDULED_INST0_ENABLE> Config Unscheduled
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_CONFIG_UNSCHEDULED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_CONFIG_SCHEDULED_INST0_ENABLE> Config Scheduled
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_CONFIG_SCHEDULED_INST0_ENABLE 1
// <q SL_RAIL_UTIL_INIT_EVENT_SCHEDULER_STATUS_INST0_ENABLE> Scheduler Status
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_SCHEDULER_STATUS_INST0_ENABLE 1
// </h>
// <h> Calibration Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_CAL_NEEDED_INST0_ENABLE> Calibration Needed
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_CAL_NEEDED_INST0_ENABLE 1
// </h>
// <h> RSSI Radio Events
// <q SL_RAIL_UTIL_INIT_EVENT_DETECT_RSSI_THRESHOLD_INST0_ENABLE> RSSI detect threshold
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_DETECT_RSSI_THRESHOLD_INST0_ENABLE 0
// </h>
// <h> Thermistor Events
// <q SL_RAIL_UTIL_INIT_EVENT_THERMISTOR_DONE_INST0_ENABLE> End of thermistor measurement
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_THERMISTOR_DONE_INST0_ENABLE 0
// </h>
// <h> Temperature Events
// <q SL_RAIL_UTIL_INIT_EVENT_TX_BLOCKED_TOO_HOT_INST0_ENABLE> Transmit blocked because of temperature limitation
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TX_BLOCKED_TOO_HOT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TEMPERATURE_TOO_HOT_INST0_ENABLE> Temperature is too hot for Tx operation
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TEMPERATURE_TOO_HOT_INST0_ENABLE 0
// <q SL_RAIL_UTIL_INIT_EVENT_TEMPERATURE_COOL_DOWN_INST0_ENABLE> Temperature has cooled enough for Tx operation
// <i> Default: 0
#define SL_RAIL_UTIL_INIT_EVENT_TEMPERATURE_COOL_DOWN_INST0_ENABLE 0
// </h>
// </e>
// </e>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_INIT_INST0_CONFIG_H

View File

@ -0,0 +1,344 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, 2.4 GHz Settings
// <h> 2.4 GHz: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE> Enable/Disable IEEE 802.15.4 2.4 GHz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> 2.4 GHz: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> 2.4 GHz: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 182
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US 182
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 192
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US 192
// </h>
// <h> 2.4 GHz: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> 2.4 GHz: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 672
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US 672
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, GB868 Settings
// <h> GB868: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE> Enable/Disable IEEE 802.15.4 868 Hz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> GB868: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> GB868: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 440
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US 440
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 450
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US 450
// </h>
// <h> GB868: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> GB868: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 1800
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US 1800
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <h> Z-Wave Settings
// <h> Z-Wave: Configuration Options
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE> Enable/Disable Z-Wave
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE> Enable Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE> Accept Beam Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE> Filter Packets Based on Node ID
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE> Enable Promiscuous Beam Mode
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE 0
// </h>
// <h> Z-Wave: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 1000
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US 1000
// </h>
// <h> Z-Wave: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> Z-Wave: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-9600:1>
// <i> Default: 9600
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US 9600
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,174 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, 2.4 GHz Settings
// <h> 2.4 GHz: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE> Enable/Disable IEEE 802.15.4 2.4 GHz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> 2.4 GHz: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> 2.4 GHz: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 182
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US 182
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 192
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US 192
// </h>
// <h> 2.4 GHz: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> 2.4 GHz: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 672
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US 672
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,174 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, 2.4 GHz Settings
// <h> 2.4 GHz: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE> Enable/Disable IEEE 802.15.4 2.4 GHz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> 2.4 GHz: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> 2.4 GHz: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 182
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US 182
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 192
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US 192
// </h>
// <h> 2.4 GHz: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> 2.4 GHz: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 672
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US 672
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,122 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
#ifdef RAIL_INTERNAL_BUILD
#include "sl_rail_util_protocol_config_internal.h"
#endif
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Z-Wave Settings
// <h> Z-Wave: Configuration Options
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE> Enable/Disable Z-Wave
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE> Enable Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE> Accept Beam Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE> Filter Packets Based on Node ID
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE> Enable Promiscuous Beam Mode
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE 0
// </h>
// <h> Z-Wave: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 1000
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US 1000
// </h>
// <h> Z-Wave: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> Z-Wave: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-9600:1>
// <i> Default: 9600
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US 9600
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,174 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, 2.4 GHz Settings
// <h> 2.4 GHz: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE> Enable/Disable IEEE 802.15.4 2.4 GHz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> 2.4 GHz: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> 2.4 GHz: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 182
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US 182
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 192
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US 192
// </h>
// <h> 2.4 GHz: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> 2.4 GHz: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 672
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US 672
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,210 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> IEEE 802.15.4, GB868 Settings
// <h> GB868: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE> Enable/Disable IEEE 802.15.4 868 Hz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> GB868: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> GB868: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 440
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US 440
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 450
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US 450
// </h>
// <h> GB868: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> GB868: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 1800
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US 1800
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <h> Z-Wave Settings
// <h> Z-Wave: Configuration Options
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE> Enable/Disable Z-Wave
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE> Enable Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE> Accept Beam Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE> Filter Packets Based on Node ID
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE> Enable Promiscuous Beam Mode
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE 0
// </h>
// <h> Z-Wave: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 1000
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US 1000
// </h>
// <h> Z-Wave: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> Z-Wave: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-9600:1>
// <i> Default: 9600
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US 9600
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,174 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, 2.4 GHz Settings
// <h> 2.4 GHz: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE> Enable/Disable IEEE 802.15.4 2.4 GHz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> 2.4 GHz: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> 2.4 GHz: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 182
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US 182
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 192
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US 192
// </h>
// <h> 2.4 GHz: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> 2.4 GHz: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 672
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US 672
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,252 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#define SL_RAIL_UTIL_PROTOCOL_CONFIG_H
#include "sl_rail_util_protocol_types.h"
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Bluetooth LE Settings
// <h> BLE: Transition Times
// <q SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE> Enable/Disable BLE
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US 150
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 150
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US 150
// </h>
// <h> BLE: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// </h>
// <h> IEEE 802.15.4, GB868 Settings
// <h> GB868: Node Configuration
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE> Enable/Disable IEEE 802.15.4 868 Hz Protocol
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE> PAN Coordinator
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE> Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE> Default Frame Pending bit value for outgoing ACKs in response to Data Request Command
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE 0
// </h>
// <h> GB868: Receivable Frame Types
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE> Beacon Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE> Data Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE> ACK Frames
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE> Command Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE 1
// </h>
// <h> GB868: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 440
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US 440
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 450
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US 450
// </h>
// <h> GB868: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> GB868: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE 1
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-65535:1>
// <i> Default: 1800
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US 1800
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <h> Z-Wave Settings
// <h> Z-Wave: Configuration Options
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE> Enable/Disable Z-Wave
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE> Enable Promiscuous Mode
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE> Accept Beam Frames
// <i> Default: 1
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE 1
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE> Filter Packets Based on Node ID
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE 0
// <q SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE> Enable Promiscuous Beam Mode
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE 0
// </h>
// <h> Z-Wave: Transition Times
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US> Transition time (microseconds) from idle to RX
// <0-65535:1>
// <i> Default: 100
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US 100
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US> Transition time (microseconds) from TX to RX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US> Transition time (microseconds) from idle to TX
// <0-65535:1>
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US> Transition time (microseconds) from RX to TX
// <0-65535:1>
// <i> Default: 1000
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US 1000
// </h>
// <h> Z-Wave: RX Search Timeouts
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE> Enable RX Search timeout after Idle
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US> Max time (microseconds) radio will search for packet when coming from idle
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US 65535
// </e>
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE> Enable RX Search timeout after TX
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US> Max time (microseconds) radio will search for packet when coming from TX
// <1-65535:1>
// <i> Default: 65535
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US 65535
// </e>
// </h>
// <h> Z-Wave: Auto ACK Configuration
// <e SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE> Enable Auto ACKs
// <i> Default: 0
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE 0
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US> RX ACK timeout duration (microseconds)
// <1-9600:1>
// <i> Default: 9600
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US 9600
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE> Radio state transition after attempting to receive ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE RAIL_RF_STATE_RX
// <o SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE> Radio state transition after transmitting ACK
// <RAIL_RF_STATE_IDLE=> Idle
// <RAIL_RF_STATE_RX=> RX
// <i> Default: RAIL_RF_STATE_RX
#define SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE RAIL_RF_STATE_RX
// </e>
// </h>
// </h>
// <<< end of configuration section >>>
#endif // SL_RAIL_UTIL_PROTOCOL_CONFIG_H

View File

@ -0,0 +1,395 @@
/***************************************************************************//**
* @file
* @brief This file implements the radio config commands for RAILtest
* applications.
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#include <string.h>
#include <stdio.h>
#include "rail.h"
#include "rail_ble.h"
#include "rail_ieee802154.h"
#include "rail_zwave.h"
#include "sl_rail_util_protocol.h"
static RAIL_Status_t sl_rail_util_protocol_config_proprietary(RAIL_Handle_t handle)
{
(void) RAIL_SetPtiProtocol(handle, RAIL_PTI_PROTOCOL_CUSTOM);
return RAIL_STATUS_NO_ERROR;
}
#if RAIL_SUPPORTS_2P4GHZ_BAND && SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE
static RAIL_Status_t sl_rail_util_protocol_config_ble(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol)
{
RAIL_Status_t status;
// Override BLE's default timings to get rid of the default rx search timeout
RAIL_StateTiming_t timings = {
.idleToRx = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_RX_US,
.txToRx = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_TX_TO_RX_US,
.idleToTx = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_IDLE_TO_TX_US,
.rxToTx = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_TO_TX_US,
.rxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE
? SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US
: 0U,
.txToRxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE
? SL_RAIL_UTIL_PROTOCOL_BLE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US
: 0U,
};
RAIL_BLE_Init(handle);
switch (protocol) {
case SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS:
status = RAIL_BLE_ConfigPhy1MbpsViterbi(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_BLE_2MBPS:
status = RAIL_BLE_ConfigPhy2MbpsViterbi(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_BLE_CODED_125KBPS:
status = RAIL_BLE_ConfigPhyCoded(handle, RAIL_BLE_Coding_125kbps);
break;
case SL_RAIL_UTIL_PROTOCOL_BLE_CODED_500KBPS:
status = RAIL_BLE_ConfigPhyCoded(handle, RAIL_BLE_Coding_500kbps);
break;
case SL_RAIL_UTIL_PROTOCOL_BLE_QUUPPA_1MBPS:
status = RAIL_BLE_ConfigPhyQuuppa(handle);
break;
default:
status = RAIL_STATUS_INVALID_PARAMETER;
break;
}
if (RAIL_STATUS_NO_ERROR == status) {
status = RAIL_SetStateTiming(handle, &timings);
}
if (RAIL_STATUS_NO_ERROR != status) {
RAIL_BLE_Deinit(handle);
}
return status;
}
#endif
#if RAIL_SUPPORTS_IEEE802154_BAND_2P4 && SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE
static RAIL_Status_t sl_rail_util_protocol_config_ieee802154_2p4ghz(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol)
{
RAIL_Status_t status;
RAIL_IEEE802154_Config_t config = {
.addresses = NULL,
.ackConfig = {
.enable = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_ENABLE,
.ackTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TIMEOUT_US,
.rxTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_RX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
},
.txTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_AUTO_ACK_TX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
}
},
.timings = {
.idleToTx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_TX_US,
.idleToRx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_IDLE_TO_RX_US,
.rxToTx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_TO_TX_US,
// Make txToRx slightly lower than desired to make sure we get to
// RX in time.
.txToRx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_TX_TO_RX_US,
.rxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE
? SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US
: 0,
.txToRxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE
? SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US
: 0
},
.framesMask = 0U // enable appropriate mask bits
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_BEACON_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_BEACON_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_DATA_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_DATA_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_ACK_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_ACK_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ACCEPT_COMMAND_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_COMMAND_FRAMES : 0U),
// Enable promiscous mode since no PANID or destination address is
// specified.
.promiscuousMode = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PROMISCUOUS_MODE_ENABLE,
.isPanCoordinator = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_PAN_COORDINATOR_ENABLE,
.defaultFramePendingInOutgoingAcks = SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_DEFAULT_FRAME_PENDING_STATE,
};
status = RAIL_IEEE802154_Init(handle, &config);
if (RAIL_STATUS_NO_ERROR == status) {
switch (protocol) {
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ:
status = RAIL_IEEE802154_Config2p4GHzRadio(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV:
status = RAIL_IEEE802154_Config2p4GHzRadioAntDiv(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_COEX:
status = RAIL_IEEE802154_Config2p4GHzRadioCoex(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV_COEX:
status = RAIL_IEEE802154_Config2p4GHzRadioAntDivCoex(handle);
break;
default:
status = RAIL_STATUS_INVALID_PARAMETER;
break;
}
}
if (RAIL_STATUS_NO_ERROR != status) {
(void) RAIL_IEEE802154_Deinit(handle);
} else {
(void) RAIL_SetPtiProtocol(handle, RAIL_PTI_PROTOCOL_802154);
}
return status;
}
#endif // RAIL_FEAT_2G4_RADIO
#if RAIL_SUPPORTS_SUBGHZ_BAND && SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE
static RAIL_Status_t sl_rail_util_protocol_config_ieee802154_gb868(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol)
{
RAIL_Status_t status;
RAIL_IEEE802154_Config_t config = {
.addresses = NULL,
.ackConfig = {
.enable = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_ENABLE,
.ackTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TIMEOUT_US,
.rxTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_RX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
},
.txTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_AUTO_ACK_TX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
}
},
.timings = {
.idleToTx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_TX_US,
.idleToRx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_IDLE_TO_RX_US,
.rxToTx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_TO_TX_US,
// Make txToRx slightly lower than desired to make sure we get to
// RX in time.
.txToRx = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_TX_TO_RX_US,
.rxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE
? SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US
: 0,
.txToRxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE
? SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US
: 0
},
.framesMask = 0U // enable appropriate mask bits
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_BEACON_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_BEACON_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_DATA_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_DATA_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_ACK_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_ACK_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ACCEPT_COMMAND_FRAME_ENABLE
? RAIL_IEEE802154_ACCEPT_COMMAND_FRAMES : 0U),
// Enable promiscous mode since no PANID or destination address is
// specified.
.promiscuousMode = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PROMISCUOUS_MODE_ENABLE,
.isPanCoordinator = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_PAN_COORDINATOR_ENABLE,
.defaultFramePendingInOutgoingAcks = SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_DEFAULT_FRAME_PENDING_STATE,
};
status = RAIL_IEEE802154_Init(handle, &config);
if (RAIL_STATUS_NO_ERROR == status) {
switch (protocol) {
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_915MHZ:
status = RAIL_IEEE802154_ConfigGB915MHzRadio(handle);
break;
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_863MHZ:
status = RAIL_IEEE802154_ConfigGB863MHzRadio(handle);
break;
default:
status = RAIL_STATUS_INVALID_PARAMETER;
break;
}
}
if (RAIL_STATUS_NO_ERROR != status) {
(void) RAIL_IEEE802154_Deinit(handle);
} else {
(void) RAIL_SetPtiProtocol(handle, RAIL_PTI_PROTOCOL_802154);
}
return status;
}
#endif // RAIL_FEAT_SUBGIG_RADIO
#if RAIL_SUPPORTS_SUBGHZ_BAND && SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE
static RAIL_Status_t sl_rail_util_protocol_config_zwave(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol)
{
RAIL_Status_t status;
RAIL_ZWAVE_Config_t config = {
.options = 0U // enable appropriate mask bits
| (SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_MODE_ENABLE
? RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE : 0U)
| (SL_RAIL_UTIL_PROTOCOL_ZWAVE_DETECT_BEAM_FRAME_ENABLE
? RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES : 0U)
| (SL_RAIL_UTIL_PROTOCOL_ZWAVE_NODE_ID_FILTERING_ENABLE
? RAIL_ZWAVE_OPTION_NODE_ID_FILTERING : 0U)
| (SL_RAIL_UTIL_PROTOCOL_ZWAVE_PROMISCUOUS_BEAM_MODE_ENABLE
? RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE : 0U),
.ackConfig = {
.enable = SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_ENABLE,
.ackTimeout = SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TIMEOUT_US,
.rxTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_RX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
},
.txTransitions = {
.success = SL_RAIL_UTIL_PROTOCOL_ZWAVE_AUTO_ACK_TX_TRANSITION_STATE,
.error = RAIL_RF_STATE_IDLE // this parameter ignored
}
},
.timings = {
.idleToTx = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_TX_US,
.idleToRx = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_IDLE_TO_RX_US,
.rxToTx = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_TO_TX_US,
// Make txToRx slightly lower than desired to make sure we get to
// RX in time.
.txToRx = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_TX_TO_RX_US,
.rxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_ENABLE
? SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_IDLE_US
: 0,
.txToRxSearchTimeout = SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_ENABLE
? SL_RAIL_UTIL_PROTOCOL_ZWAVE_TIMING_RX_SEARCH_TIMEOUT_AFTER_TX_US
: 0
}
};
status = RAIL_ZWAVE_Init(handle, &config);
if (RAIL_STATUS_NO_ERROR == status) {
switch (protocol) {
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_ANZ: // Australia
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_ANZ);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_CN: // China
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_CN);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_EU: // European Union
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_EU);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_HK: // Hong Kong
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_HK);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_IN: // India
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_IN);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_IL: // Israel
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_IL);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_JP: // Japan
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_JP);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_KR: // Korea
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_KR);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_MY: // Malaysia
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_MY);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_RU: // Russia
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_RU);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US: // United States
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_US);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR1: // US, Long Range 1
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_US_LR1);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR2: // US, Long Range 2
status = RAIL_ZWAVE_ConfigRegion(handle, &RAIL_ZWAVE_REGION_US_LR2);
break;
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR_END_DEVICE: // US, LR End Device
status = RAIL_ZWAVE_ConfigRegion(handle,
&RAIL_ZWAVE_REGION_US_LR_END_DEVICE);
break;
default:
status = RAIL_STATUS_INVALID_PARAMETER;
break;
}
}
if (RAIL_STATUS_NO_ERROR == status) {
status = RAIL_ZWAVE_SetNodeId(handle, RAIL_ZWAVE_NODE_ID_DEFAULT);
}
if (RAIL_STATUS_NO_ERROR != status) {
(void) RAIL_ZWAVE_Deinit(handle);
}
return status;
}
#endif // RAIL_FEAT_SUBGIG_RADIO
RAIL_Status_t sl_rail_util_protocol_config(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol)
{
switch (protocol) {
case SL_RAIL_UTIL_PROTOCOL_PROPRIETARY:
return sl_rail_util_protocol_config_proprietary(handle);
#if RAIL_SUPPORTS_2P4GHZ_BAND && SL_RAIL_UTIL_PROTOCOL_BLE_ENABLE
case SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS:
case SL_RAIL_UTIL_PROTOCOL_BLE_2MBPS:
case SL_RAIL_UTIL_PROTOCOL_BLE_CODED_125KBPS:
case SL_RAIL_UTIL_PROTOCOL_BLE_CODED_500KBPS:
case SL_RAIL_UTIL_PROTOCOL_BLE_QUUPPA_1MBPS:
return sl_rail_util_protocol_config_ble(handle, protocol);
#if RAIL_SUPPORTS_IEEE802154_BAND_2P4 && SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ENABLE
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ:
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV:
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_COEX:
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV_COEX:
return sl_rail_util_protocol_config_ieee802154_2p4ghz(handle, protocol);
#endif
#endif
#if RAIL_SUPPORTS_SUBGHZ_BAND && SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_ENABLE
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_915MHZ:
case SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_863MHZ:
return sl_rail_util_protocol_config_ieee802154_gb868(handle, protocol);
#endif
#if RAIL_SUPPORTS_SUBGHZ_BAND && SL_RAIL_UTIL_PROTOCOL_ZWAVE_ENABLE
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_ANZ: // Australia
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_CN: // China
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_EU: // European Union
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_HK: // Hong Kong
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_IN: // India
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_IL: // Israel
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_JP: // Japan
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_KR: // Korea
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_MY: // Malaysia
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_RU: // Russia
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US: // United States
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR1: // United States, Long Range 1
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR2: // United States, Long Range 2
case SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR_END_DEVICE: // US, LR End Device
return sl_rail_util_protocol_config_zwave(handle, protocol);
#endif
default:
return RAIL_STATUS_INVALID_PARAMETER;
}
}

View File

@ -0,0 +1,56 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_H
#define SL_RAIL_UTIL_PROTOCOL_H
#include "rail.h"
#include "sl_rail_util_protocol_types.h"
#include "sl_rail_util_protocol_config.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Initialize and configure the radio for use.
*
* @param[in] handle The RAIL handle to apply the radio configuration to.
* @param[in] config The radio configuration type to initialize and configure.
* @return A status code indicating success of the function call.
*/
RAIL_Status_t sl_rail_util_protocol_config(RAIL_Handle_t handle,
sl_rail_util_protocol_type_t protocol);
#ifdef __cplusplus
}
#endif
#endif // SL_RAIL_UTIL_PROTOCOL_H

View File

@ -0,0 +1,103 @@
/***************************************************************************//**
* @file
* @brief
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef SL_RAIL_UTIL_PROTOCOL_TYPES_H
#define SL_RAIL_UTIL_PROTOCOL_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
typedef enum sl_rail_util_protocol_type{
SL_RAIL_UTIL_PROTOCOL_PROPRIETARY, /* use rail_config.c/h */
SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS,
SL_RAIL_UTIL_PROTOCOL_BLE_2MBPS,
SL_RAIL_UTIL_PROTOCOL_BLE_CODED_125KBPS,
SL_RAIL_UTIL_PROTOCOL_BLE_CODED_500KBPS,
SL_RAIL_UTIL_PROTOCOL_BLE_QUUPPA_1MBPS,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_COEX,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV_COEX,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_915MHZ,
SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_863MHZ,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_ANZ,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_CN,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_EU,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_HK,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_IN,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_IL,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_JP,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_KR,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_MY,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_RU,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_US,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR1,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR2,
SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR_END_DEVICE,
} sl_rail_util_protocol_type_t;
#define SL_RAIL_UTIL_PROTOCOL_IS_BLE(x) \
((x == SL_RAIL_UTIL_PROTOCOL_BLE_1MBPS) \
|| (x == SL_RAIL_UTIL_PROTOCOL_BLE_2MBPS) \
|| (x == SL_RAIL_UTIL_PROTOCOL_BLE_CODED_125KBPS) \
|| (x == SL_RAIL_UTIL_PROTOCOL_BLE_CODED_500KBPS))
#define SL_RAIL_UTIL_PROTOCOL_IS_IEEE802154_2G4(x) \
((x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ) \
|| (x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV) \
|| (x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_COEX) \
|| (x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_2P4GHZ_ANTDIV_COEX))
#define SL_RAIL_UTIL_PROTOCOL_IS_IEEE802154_GB868(x) \
((x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_915MHZ) \
|| (x == SL_RAIL_UTIL_PROTOCOL_IEEE802154_GB868_863MHZ))
#define SL_RAIL_UTIL_PROTOCOL_IS_ZWAVE(x) \
((x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_ANZ) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_CN) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_EU) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_HK) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_IN) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_IL) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_JP) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_KR) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_MY) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_RU) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_US) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR1) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR2) \
|| (x == SL_RAIL_UTIL_PROTOCOL_ZWAVE_US_LR_END_DEVICE))
#ifdef __cplusplus
}
#endif
#endif // SL_RAIL_UTIL_PROTOCOL_TYPES_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,904 @@
/***************************************************************************//**
* @file
* @brief The Z-Wave specific header file for the RAIL library.
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
#ifndef __RAIL_ZWAVE_H__
#define __RAIL_ZWAVE_H__
#include "rail_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// @addtogroup Z_Wave Z-Wave
/// @ingroup Protocol_Specific
/// @brief Z-Wave configuration routines
///
/// The functions in this group configure RAIL Z-Wave hardware
/// acceleration features.
///
/// To configure Z-Wave functionality, the application must first set up
/// a RAIL instance with RAIL_Init() and other setup functions.
///
/// @code{.c}
///
/// RAIL_ZWAVE_NodeId_t gRecentBeamNodeId;
/// uint8_t gRecentBeamChannelIndex;
///
/// // Main RAIL_EVENT callback
/// static void RAILCb_Event(RAIL_Handle_t railHandle, RAIL_Events_t events)
/// {
/// // Get beamNodeId and channel index from beam packet
/// if (events & RAIL_EVENT_ZWAVE_BEAM) {
/// if (RAIL_ZWAVE_IsEnabled(railHandle)) {
/// if ((RAIL_ZWAVE_GetBeamNodeId(railHandle, &gRecentBeamNodeId)
/// != RAIL_STATUS_NO_ERROR)
/// || (RAIL_ZWAVE_GetBeamChannelIndex(railHandle, &gRecentBeamChannelIndex)
/// != RAIL_STATUS_NO_ERROR)) {
/// return;
/// }
/// }
/// }
/// }
///
/// static const RAIL_ZWAVE_Config_t zwaveConfig = {
/// .options = RAIL_ZWAVE_OPTIONS_DEFAULT
/// };
///
/// RAIL_Status_t zwaveInit(void)
/// {
/// // initialize Z-Wave
/// RAIL_Status_t status = RAIL_ZWAVE_Init(railHandle, &zwaveConfig);
///
/// if (status != RAIL_STATUS_NO_ERROR) {
/// return status;
/// }
///
/// uint8_t myHomeId[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
/// RAIL_ZWAVE_SetNodeId(railHandle, RAIL_ZWAVE_NODE_ID_DEFAULT);
/// RAIL_ZWAVE_SetHomeId(railHandle, myHomeId, RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE);
///
/// // configure region to EU(European Union)
/// return RAIL_ZWAVE_ConfigRegion(railHandle, RAIL_ZWAVE_REGION_EU);
/// }
/// @endcode
///
/// @{
/**
* @enum RAIL_ZWAVE_Options_t
* @brief Z-Wave options.
*/
RAIL_ENUM_GENERIC(RAIL_ZWAVE_Options_t, uint32_t) {
// Z-Wave Option Bit Shifts
/** Shift position of \ref RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE bit */
RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE_SHIFT = 0,
/** Shift position of \ref RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES bit */
RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES_SHIFT,
/** Shift position of \ref RAIL_ZWAVE_OPTION_NODE_ID_FILTERING bit */
RAIL_ZWAVE_OPTION_NODE_ID_FILTERING_SHIFT,
/** Shift position of \ref RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE bit */
RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE_SHIFT,
};
// RAIL_ZWAVE_Options_t bitmasks
/** A value representing no options */
#define RAIL_ZWAVE_OPTIONS_NONE 0U
/** All options are disabled by default. */
#define RAIL_ZWAVE_OPTIONS_DEFAULT RAIL_ZWAVE_OPTIONS_NONE
/**
* An option to configure promiscuous mode, accepting non-beam packets
* regardless of their HomeId. By default packets are filtered by their HomeId.
* When true, such filtering is disabled.
*/
#define RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE \
(1u << RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE_SHIFT)
/**
* An option to filter non-beam packets based on their NodeId when
* \ref RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE is disabled.
*
* @note This option has no effect when
* \ref RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE is enabled.
*/
#define RAIL_ZWAVE_OPTION_NODE_ID_FILTERING \
(1u << RAIL_ZWAVE_OPTION_NODE_ID_FILTERING_SHIFT)
/**
* An option to configure beam frame recognition. By default beams are not
* considered special and will be received as if they were normal Z-Wave
* frames, assuredly triggering \ref RAIL_EVENT_RX_FRAME_ERROR.
* When true, beam frames that are broadcast or match the NodeId and
* HomeIdHash values will trigger \ref RAIL_EVENT_ZWAVE_BEAM event.
* (All beams additionally trigger \ref RAIL_EVENT_RX_PACKET_ABORTED
* regardless of NodeId / HomeIdHash values.)
*
* @note This option takes precedence over \ref
* RAIL_ZWAVE_OPTION_PROMISCUOUS_MODE when receiving a beam frame.
* For promiscuous beam handling see related
* \ref RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE option.
*/
#define RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES \
(1u << RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES_SHIFT)
/**
* An option to receive all beams promiscuously when \ref
* RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES is enabled.
* When true, beam frames are received regardless of their NodeId or HomeIdHash
* resulting in \ref RAIL_EVENT_ZWAVE_BEAM (and also \ref
* RAIL_EVENT_RX_PACKET_ABORTED) for each beam frame.
*
* @note This option has no effect when
* \ref RAIL_ZWAVE_OPTION_DETECT_BEAM_FRAMES is disabled.
*/
#define RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE \
(1u << RAIL_ZWAVE_OPTION_PROMISCUOUS_BEAM_MODE_SHIFT)
/** A value representing all options */
#define RAIL_ZWAVE_OPTIONS_ALL 0xFFFFFFFFU
/**
* @enum RAIL_ZWAVE_NodeId_t
* @brief A Z-Wave Node ID.
*
* This data type is 12 bits wide when using the ZWave Long Range PHY, and
* 8 bits wide otherwise.
*
* @note When using the Long Range PHY, values 0xFA1..0xFFE are reserved.
* Otherwise, values 0xE9..0xFE are reserved.
*/
RAIL_ENUM_GENERIC(RAIL_ZWAVE_NodeId_t, uint16_t) {
/** The unknown NodeId for uninitialized nodes. */
RAIL_ZWAVE_NODE_ID_NONE = 0x00U,
/** The broadcast NodeId. */
RAIL_ZWAVE_NODE_ID_BROADCAST = 0xFFU,
/** Default to the broadcast NodeId. */
RAIL_ZWAVE_NODE_ID_DEFAULT = RAIL_ZWAVE_NODE_ID_BROADCAST,
// All other values between 0x00 and 0xFE are valid node IDs normally
/** The Long Range broadcast NodeId. */
RAIL_ZWAVE_NODE_ID_BROADCAST_LONGRANGE = 0xFFFU,
/** Default to the Long Range broadcast NodeId. */
RAIL_ZWAVE_NODE_ID_DEFAULT_LONGRANGE = RAIL_ZWAVE_NODE_ID_BROADCAST_LONGRANGE,
// All values from 0x001 to 0xFA1 are valid node IDs with a Long Range PHY.
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Self-referencing defines minimize compiler complaints when using RAIL_ENUM
#define RAIL_ZWAVE_NODE_ID_NONE ((RAIL_ZWAVE_NodeId_t) RAIL_ZWAVE_NODE_ID_NONE)
#define RAIL_ZWAVE_NODE_ID_BROADCAST ((RAIL_ZWAVE_NodeId_t) RAIL_ZWAVE_NODE_ID_BROADCAST)
#define RAIL_ZWAVE_NODE_ID_DEFAULT ((RAIL_ZWAVE_NodeId_t) RAIL_ZWAVE_NODE_ID_DEFAULT)
#endif//DOXYGEN_SHOULD_SKIP_THIS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
/** Defines for subPhyID field in RAIL_RxPacketDetails_t */
#define RAIL_ZWAVE_RX_SUBPHY_ID_0 (0U)
#define RAIL_ZWAVE_RX_SUBPHY_ID_1 (1U)
#define RAIL_ZWAVE_RX_SUBPHY_ID_2 (2U)
#define RAIL_ZWAVE_RX_SUBPHY_ID_3 (3U)
#endif//DOXYGEN_SHOULD_SKIP_THIS
/**
* @enum RAIL_ZWAVE_HomeId_t
* @brief A Z-Wave Home ID.
*
* @note Home IDs in the range 0x54000000..0x55FFFFFF are illegal.
*/
RAIL_ENUM_GENERIC(RAIL_ZWAVE_HomeId_t, uint32_t) {
RAIL_ZWAVE_HOME_ID_UNKNOWN = 0x00000000U, /**< The unknown HomeId. */
RAIL_ZWAVE_HOME_ID_DEFAULT = 0x54545454U, /**< An impossible and unlikely HomeId. */
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Self-referencing defines minimize compiler complaints when using RAIL_ENUM
#define RAIL_ZWAVE_HOME_ID_UNKNOWN ((RAIL_ZWAVE_HomeId_t) RAIL_ZWAVE_HOME_ID_UNKNOWN)
#define RAIL_ZWAVE_HOME_ID_DEFAULT ((RAIL_ZWAVE_HomeId_t) RAIL_ZWAVE_HOME_ID_DEFAULT)
#endif//DOXYGEN_SHOULD_SKIP_THIS
/**
* @enum RAIL_ZWAVE_HomeIdHash_t
* @brief A Z-Wave Home ID hash.
*
* @note Certain values (as shown) are illegal.
*/
RAIL_ENUM(RAIL_ZWAVE_HomeIdHash_t) {
RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_1 = 0x0AU, /**< An illegal HomeIdHash value. */
RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_2 = 0x4AU, /**< An illegal HomeIdHash value. */
RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_3 = 0x55U, /**< An illegal HomeIdHash value. */
RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE = 0x55U, /**< Illegal HomeIdHash value that
suppresses checking the
HomeIdHash field of beam
packets. */
RAIL_ZWAVE_HOME_ID_HASH_DEFAULT
= RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE, /**< Default to don't care. */
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Self-referencing defines minimize compiler complaints when using RAIL_ENUM
#define RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_1 ((RAIL_ZWAVE_HomeIdHash_t) RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_1)
#define RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_2 ((RAIL_ZWAVE_HomeIdHash_t) RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_2)
#define RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_3 ((RAIL_ZWAVE_HomeIdHash_t) RAIL_ZWAVE_HOME_ID_HASH_ILLEGAL_3)
#define RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE ((RAIL_ZWAVE_HomeIdHash_t) RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE)
#define RAIL_ZWAVE_HOME_ID_HASH_DEFAULT ((RAIL_ZWAVE_HomeIdHash_t) RAIL_ZWAVE_HOME_ID_HASH_DEFAULT)
#endif//DOXYGEN_SHOULD_SKIP_THIS
/**
* @struct RAIL_ZWAVE_Config_t
* @brief A configuration structure for Z-Wave in RAIL.
*/
typedef struct RAIL_ZWAVE_Config {
/**
* Defines Z-Wave options.
*/
RAIL_ZWAVE_Options_t options;
/**
* Defines Z-Wave ACKing configuration.
*/
RAIL_AutoAckConfig_t ackConfig;
/**
* Defines state timings for Z-Wave.
*/
RAIL_StateTiming_t timings;
} RAIL_ZWAVE_Config_t;
/**
* @enum RAIL_ZWAVE_Baud_t
* @brief Z-Wave supported baudrates or PHYs.
*/
RAIL_ENUM(RAIL_ZWAVE_Baud_t) {
RAIL_ZWAVE_BAUD_9600, /**< 9.6kbps baudrate*/
RAIL_ZWAVE_BAUD_40K, /**< 40kbps baudrate*/
RAIL_ZWAVE_BAUD_100K, /**< 100kbps baudrate*/
RAIL_ZWAVE_LR, /**< Long Range PHY*/
RAIL_ZWAVE_ENERGY_DETECT = RAIL_ZWAVE_LR, /**< Energy detection PHY*/
RAIL_ZWAVE_BAUD_INVALID /**< Sentinel value for invalid baud rate*/
};
/**
* Sentinel value to indicate that a channel (and thus its frequency)
* are invalid.
*/
#define RAIL_ZWAVE_FREQ_INVALID 0xFFFFFFFFUL
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Self-referencing defines minimize compiler complaints when using RAIL_ENUM
#define RAIL_ZWAVE_BAUD_9600 ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_BAUD_9600)
#define RAIL_ZWAVE_BAUD_40K ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_BAUD_40K)
#define RAIL_ZWAVE_BAUD_100K ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_BAUD_100K)
#define RAIL_ZWAVE_LR ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_LR)
#define RAIL_ZWAVE_ENERGY_DETECT ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_ENERGY_DETECT)
#define RAIL_ZWAVE_INVALID ((RAIL_ZWAVE_Baud_t) RAIL_ZWAVE_INVALID)
#endif//DOXYGEN_SHOULD_SKIP_THIS
/**
* @enum RAIL_ZWAVE_RegionId_t
* @brief Z-Wave region identifications.
*/
RAIL_ENUM(RAIL_ZWAVE_RegionId_t) {
RAIL_ZWAVE_REGIONID_UNKNOWN, /**< Unknown/Invalid*/
RAIL_ZWAVE_REGIONID_EU, /**< European Union*/
RAIL_ZWAVE_REGIONID_US, /**< United States*/
RAIL_ZWAVE_REGIONID_ANZ, /**< Australia/New Zealand*/
RAIL_ZWAVE_REGIONID_HK, /**< Hong Kong*/
RAIL_ZWAVE_REGIONID_MY, /**< Malaysia*/
RAIL_ZWAVE_REGIONID_IN, /**< India*/
RAIL_ZWAVE_REGIONID_JP, /**< Japan*/
RAIL_ZWAVE_REGIONID_RU, /**< Russian Federation*/
RAIL_ZWAVE_REGIONID_IL, /**< Israel*/
RAIL_ZWAVE_REGIONID_KR, /**< Korea*/
RAIL_ZWAVE_REGIONID_CN, /**< China*/
RAIL_ZWAVE_REGIONID_US_LR1, /**< United States, with first long range PHY*/
RAIL_ZWAVE_REGIONID_US_LR2, /**< United States, with second long range PHY*/
RAIL_ZWAVE_REGIONID_US_LR_END_DEVICE, /**< United States long range end device PHY for both LR frequencies*/
RAIL_ZWAVE_REGIONID_COUNT /**< Count of known regions, must be last*/
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Self-referencing defines minimize compiler complaints when using RAIL_ENUM
#define RAIL_ZWAVE_REGIONID_UNKNOWN ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_UNKNOWN)
#define RAIL_ZWAVE_REGIONID_EU ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_EU)
#define RAIL_ZWAVE_REGIONID_US ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_US)
#define RAIL_ZWAVE_REGIONID_ANZ ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_ANZ)
#define RAIL_ZWAVE_REGIONID_HK ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_HK)
#define RAIL_ZWAVE_REGIONID_MY ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_MY)
#define RAIL_ZWAVE_REGIONID_IN ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_IN)
#define RAIL_ZWAVE_REGIONID_JP ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_JP)
#define RAIL_ZWAVE_REGIONID_RU ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_RU)
#define RAIL_ZWAVE_REGIONID_IL ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_IL)
#define RAIL_ZWAVE_REGIONID_KR ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_KR)
#define RAIL_ZWAVE_REGIONID_CN ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_CN)
#define RAIL_ZWAVE_REGIONID_US_LR1 ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_US_LR1)
#define RAIL_ZWAVE_REGIONID_US_LR2 ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_US_LR2)
#define RAIL_ZWAVE_REGIONID_US_LR_END_DEVICE ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_US_LR_END_DEVICE)
#define RAIL_ZWAVE_REGIONID_COUNT ((RAIL_ZWAVE_RegionId_t) RAIL_ZWAVE_REGIONID_COUNT)
#endif//DOXYGEN_SHOULD_SKIP_THIS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Largest ACK timeout period based on
// aPhyTurnaroundTimeRxTx (1 ms max)+ (aMacTransferAckTimeTX (168 bits)* (1/data rate))
// For slowest Data Rate R1 (19.6 kbit/s)
#define RAIL_ZWAVE_MAX_ACK_TIMEOUT_US (9600U)
// Defines for Transition timing
#define RAIL_ZWAVE_TIME_IDLE_TO_RX_US (100U)
#define RAIL_ZWAVE_TIME_TX_TO_RX_US (0U)
#define RAIL_ZWAVE_TIME_IDLE_TO_TX_US (0U)
#define RAIL_ZWAVE_TIME_RX_TO_TX_US (1000U)
#endif//DOXYGEN_SHOULD_SKIP_THIS
/**
* Invalid beam TX power value returned when \ref RAIL_ZWAVE_GetLrBeamTxPower
* is called after receiving a regular non-long-range beam.
*/
#define RAIL_ZWAVE_LR_BEAM_TX_POWER_INVALID (0xFFU)
/**
* @struct RAIL_ZWAVE_LrAckData_t
* @brief Configuration structure for Z-Wave Long Range ACK.
*/
typedef struct RAIL_ZWAVE_LrAckData {
/// Radio noise level measured on the channel the frame is transmitted on.
int8_t noiseFloorDbm;
/// Transmit power used to transmit the ongoing Z-Wave Long Range ACK.
int8_t txPowerDbm;
/// Signal strength measured while receiving the Z-Wave Long Range frame.
int8_t receiveRssiDbm;
} RAIL_ZWAVE_LrAckData_t;
/**
* @struct RAIL_ZWAVE_BeamRxConfig_t
* @brief Configuration structure for Z-Wave beam detection.
* This structure should not be used without direct instruction
* by Silicon Labs. Appropriate defaults for this are built into
* the RAIL library.
*/
typedef struct RAIL_ZWAVE_BeamRxConfig {
/// Channel hopping pattern to use for beam detection.
RAIL_RxChannelHoppingConfig_t channelHoppingConfig;
/// Amount of time to spend trying to receive a beam once detected.
/// 100kbps only
RAIL_RxDutyCycleConfig_t receiveConfig_100;
/// Amount of time to spend trying to receive a beam once detected.
/// 40kbps only
RAIL_RxDutyCycleConfig_t receiveConfig_40;
} RAIL_ZWAVE_BeamRxConfig_t;
/**
* Number of channels in each of Z-Wave's region-based PHYs
*/
#define RAIL_NUM_ZWAVE_CHANNELS (4U)
/**
* @struct RAIL_ZWAVE_RegionConfig_t
* @brief Each Z-Wave region supports 3 channels.
*/
typedef struct RAIL_ZWAVE_RegionConfig {
uint32_t frequency[RAIL_NUM_ZWAVE_CHANNELS]; /**< Channel frequency in hertz*/
RAIL_TxPower_t maxPower[RAIL_NUM_ZWAVE_CHANNELS]; /**< The maximum power allowed on the channel*/
RAIL_ZWAVE_Baud_t baudRate[RAIL_NUM_ZWAVE_CHANNELS]; /**< Channel baud rate index*/
RAIL_ZWAVE_RegionId_t regionId; /**< Identification number for the region*/
} RAIL_ZWAVE_RegionConfig_t;
/**
* @struct RAIL_ZWAVE_IrcalVal_t
* @brief Structure for Z-Wave Image Rejection Calibration.
*
* @note Index 0 will hold the low side image rejection calibration value (channel 0),
* while index 1 will hold the high side image rejection value (channel 1).
*/
typedef struct RAIL_ZWAVE_IrcalVal {
RAIL_IrCalValues_t imageRejection[2]; /**< Low side and high side image rejection values*/
} RAIL_ZWAVE_IrcalVal_t;
/**
* @typedef RAIL_RxChannelHoppingParameters_t
* @brief Rx channel hopping on-channel time for all Z-Wave channels in a region
*/
typedef RAIL_RxChannelHoppingParameter_t RAIL_RxChannelHoppingParameters_t[RAIL_NUM_ZWAVE_CHANNELS];
/**
* Switch the Z-Wave region.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] regionCfg Z-Wave channel configuration for the selected region
* @return Status code indicating success of the function call.
*
* @note Setting a new Z-Wave Region will default any Low Power values to
* Normal Power values for the region.
* Z-Wave Region configuration must always be followed by a Low Power setup
* in case one desires to have the Low Power ACKing functionality.
*/
RAIL_Status_t RAIL_ZWAVE_ConfigRegion(RAIL_Handle_t railHandle,
const RAIL_ZWAVE_RegionConfig_t *regionCfg);
/**
* Perform image rejection calibration on all valid channels of a
* Z-Wave region.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in, out] pIrCalVals An application-provided pointer of
* type \ref RAIL_ZWAVE_IrcalVal_t. This is populated with image rejection
* calibration values, if not NULL or initialized with
* \ref RAIL_CAL_INVALID_VALUE or if forceIrcal is true.
* @param[in] forceIrcal If true, will always perform image rejection calibration
* and not use previously cached values.
* @return Status code indicating success of the function call.
*
* Note: This function also calibrates for beam detection and should be
* called before \ref RAIL_ZWAVE_ReceiveBeam() and after the Z-Wave region
* has been configured via \ref RAIL_ZWAVE_ConfigRegion().
* Channel hopping must be disabled otherwise this function will return
* \ref RAIL_STATUS_INVALID_CALL.
*/
RAIL_Status_t RAIL_ZWAVE_PerformIrcal(RAIL_Handle_t railHandle,
RAIL_ZWAVE_IrcalVal_t *pIrCalVals,
bool forceIrcal);
/**
* Initialize RAIL for Z-Wave features.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] config A Z-Wave configuration structure.
* @return A status code indicating success of the function call.
*
* This function is the entry point for working with Z-Wave within
* RAIL. It sets up relevant hardware acceleration for Z-Wave-specific
* features, such as HomeId filtering and beam packets (as
* specified in the configuration) and allows users to select the
* relevant Z-Wave region-specific PHY via \ref RAIL_ZWAVE_ConfigRegion.
*/
RAIL_Status_t RAIL_ZWAVE_Init(RAIL_Handle_t railHandle,
const RAIL_ZWAVE_Config_t *config);
/**
* De-initialize Z-Wave hardware acceleration.
*
* @param[in] railHandle A handle of RAIL instance.
* @return A status code indicating success of the function call.
*
* Disables and resets all Z-Wave hardware acceleration features. This
* function should only be called when the radio is IDLE.
*/
RAIL_Status_t RAIL_ZWAVE_Deinit(RAIL_Handle_t railHandle);
/**
* Return whether Z-Wave hardware acceleration is currently enabled.
*
* @param[in] railHandle A handle of RAIL instance.
* @return True if Z-Wave hardware acceleration was enabled to start with
* and false otherwise.
*/
bool RAIL_ZWAVE_IsEnabled(RAIL_Handle_t railHandle);
/**
* Configure Z-Wave options.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] mask A bitmask containing which options should be modified.
* @param[in] options A bitmask containing desired configuration settings.
* Bit positions for each option are found in the \ref RAIL_ZWAVE_Options_t.
* @return Status code indicating success of the function call.
*/
RAIL_Status_t RAIL_ZWAVE_ConfigOptions(RAIL_Handle_t railHandle,
RAIL_ZWAVE_Options_t mask,
RAIL_ZWAVE_Options_t options);
/**
* Inform RAIL of the Z-Wave node's NodeId for receive filtering.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] nodeId A Z-Wave Node ID.
* @return Status code indicating success of the function call.
*
* @note Until this API is called, RAIL will assume the NodeId is
* \ref RAIL_ZWAVE_NODE_ID_DEFAULT.
*/
RAIL_Status_t RAIL_ZWAVE_SetNodeId(RAIL_Handle_t railHandle,
RAIL_ZWAVE_NodeId_t nodeId);
/**
* Inform RAIL of the Z-Wave node's HomeId and its hash for receive filtering
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] homeId A Z-Wave HomeId.
* @param[in] homeIdHash The hash of the HomeId expected in beam frames.
* If this is \ref RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE, beam frame detection
* will not check the HomeIdHash in a received beam frame at all, and
* \ref RAIL_EVENT_ZWAVE_BEAM will trigger based solely on the NodeId
* in the beam frame.
* @return Status code indicating success of the function call.
*
* @note Until this API is called, RAIL will assume the HomeId is an
* illegal one of \ref RAIL_ZWAVE_HOME_ID_DEFAULT, and its hash is \ref
* RAIL_ZWAVE_HOME_ID_HASH_DONT_CARE.
*/
RAIL_Status_t RAIL_ZWAVE_SetHomeId(RAIL_Handle_t railHandle,
RAIL_ZWAVE_HomeId_t homeId,
RAIL_ZWAVE_HomeIdHash_t homeIdHash);
/**
* Get the NodeId of the most recently seen beam frame that triggered
* \ref RAIL_EVENT_ZWAVE_BEAM.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[out] pNodeId A pointer to \ref RAIL_ZWAVE_NodeId_t to populate.
* @return Status code indicating success of the function call.
*
* @note This is best called while handling the \ref RAIL_EVENT_ZWAVE_BEAM
* event; if multiple beams are received only the most recent beam's NodeId
* is provided.
*/
RAIL_Status_t RAIL_ZWAVE_GetBeamNodeId(RAIL_Handle_t railHandle,
RAIL_ZWAVE_NodeId_t *pNodeId);
/**
* Get the HomeIdHash of the most recently seen beam frame that triggered
* \ref RAIL_EVENT_ZWAVE_BEAM.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[out] pBeamHomeIdHash A pointer to \ref RAIL_ZWAVE_HomeIdHash_t to populate.
* @return Status code indicating success of the function call.
*
* @note This is best called while handling the \ref RAIL_EVENT_ZWAVE_BEAM
* event; if multiple beams are received only the most recent beam's HomeIdHash
* is provided.
*/
RAIL_Status_t RAIL_ZWAVE_GetBeamHomeIdHash(RAIL_Handle_t railHandle,
RAIL_ZWAVE_HomeIdHash_t *pBeamHomeIdHash);
/**
* Get the channel hopping index of the most recently seen beam frame that
* triggered \ref RAIL_EVENT_ZWAVE_BEAM.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[out] pChannelIndex A pointer to a uint8_t to populate with
* the channel hopping index. If channel-hopping was off at the time
* the beam packet was received, \ref RAIL_CHANNEL_HOPPING_INVALID_INDEX
* is provided.
* @return Status code indicating success of the function call.
*
* @note This is best called while handling the \ref RAIL_EVENT_ZWAVE_BEAM
* event; if multiple beams are received only the most recent beam's
* channel hopping index is provided.
*/
RAIL_Status_t RAIL_ZWAVE_GetBeamChannelIndex(RAIL_Handle_t railHandle,
uint8_t *pChannelIndex);
/**
* Get the TX power used by the transmitter of the most recently seen
* long range beam frame that triggered \ref RAIL_EVENT_ZWAVE_BEAM.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[out] pLrBeamTxPower An application provided pointer to a uint8_t to
* be populated with the TX power of the latest long range beam. This will
* be set to \ref RAIL_ZWAVE_LR_BEAM_TX_POWER_INVALID if this API is called
* after receiving a regular non-long-range beam.
* @return Status code indicating success of the function call. This function
* will return \ref RAIL_STATUS_INVALID_STATE if called after receiving a
* regular (non-long-range) beam.
*
* @note This is best called while handling the \ref RAIL_EVENT_ZWAVE_BEAM
* event; if multiple beams are received only the most recent long range
* beam's TX power is provided.
*
* @note The following table shows long range beam TX power value to dBm
* value mapping:
*
* <table>
* <tr><th>Tx Power Value <th>Description
* <tr><td>0 <td>-6dBm
* <tr><td>1 <td>-2dBm
* <tr><td>2 <td>+2dBm
* <tr><td>3 <td>+6dBm
* <tr><td>4 <td>+10dBm
* <tr><td>5 <td>+13dBm
* <tr><td>6 <td>+16dBm
* <tr><td>7 <td>+19dBm
* <tr><td>8 <td>+21dBm
* <tr><td>9 <td>+23Bm
* <tr><td>10 <td>+25dBm
* <tr><td>11 <td>+26dBm
* <tr><td>12 <td>+27dBm
* <tr><td>13 <td>+28dBm
* <tr><td>14 <td>+29dBm
* <tr><td>15 <td>+30dBm
* </table>
*/
RAIL_Status_t RAIL_ZWAVE_GetLrBeamTxPower(RAIL_Handle_t railHandle,
uint8_t *pLrBeamTxPower);
/**
* Get the RSSI of the received beam frame.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[out] pBeamRssi An application provided pointer to a int8_t to
* be populated with the latest beam's RSSI, in dBm.
* @return Status code indicating success of the function call. This function
* will return \ref RAIL_STATUS_INVALID_STATE if called without ever
* having received a beam.
*
* @note This is best called while handling the \ref RAIL_EVENT_ZWAVE_BEAM
* event; if multiple beams are received only the most recent beam's
* RSSI is provided.
*/
RAIL_Status_t RAIL_ZWAVE_GetBeamRssi(RAIL_Handle_t railHandle,
int8_t *pBeamRssi);
/**
* Set the Raw Low Power settings.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] powerLevel Desired low power raw level.
* @return Status code indicating success of the function call.
*
* Low Power settings are required during ACK transmissions when
* the Low Power Bit is set. This setting is only valid for one
* subsequent transmission, after which all transmissions will be
* at the nominal power setting, until re-invoked.
*/
RAIL_Status_t RAIL_ZWAVE_SetTxLowPower(RAIL_Handle_t railHandle,
uint8_t powerLevel);
/**
* Set the Low Power settings in dBm.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] powerLevel Desired low power level dBm.
* @return Status code indicating success of the function call.
*
* Low Power settings are required during ACK transmissions when
* the Low Power Bit is set. This setting is only valid for one
* subsequent transmission, after which all transmissions will be
* at the nominal power setting, until re-invoked.
*/
RAIL_Status_t RAIL_ZWAVE_SetTxLowPowerDbm(RAIL_Handle_t railHandle,
RAIL_TxPower_t powerLevel);
/**
* Get the TX low power in raw units (see \ref rail_chip_specific.h for
* value ranges).
*
* @param[in] railHandle A RAIL instance handle.
* @return The chip-specific \ref RAIL_TxPowerLevel_t raw value of the low
* transmit power.
*
* This API returns the low raw power value that was set by
* \ref RAIL_ZWAVE_SetTxLowPower.
*
* Calling this function before configuring the Low Power PA
* (i.e., before a successful
* call to \ref RAIL_ZWAVE_SetTxLowPowerDbm or \ref RAIL_ZWAVE_SetTxLowPower)
* will return the low power value same as the nominal power.
* Also, calling this function before configuring the PA
* (i.e., before a successful call to \ref RAIL_ConfigTxPower) will return an error
* (RAIL_TX_POWER_LEVEL_INVALID).
*/
RAIL_TxPowerLevel_t RAIL_ZWAVE_GetTxLowPower(RAIL_Handle_t railHandle);
/**
* Get the TX low power in terms of deci-dBm instead of raw power level.
*
* @param[in] railHandle A RAIL instance handle.
* @return The chip-specific \ref RAIL_TxPower_t value of the low
* transmit power in deci-dBm.
*/
RAIL_TxPower_t RAIL_ZWAVE_GetTxLowPowerDbm(RAIL_Handle_t railHandle);
/**
* Implement beam detection and reception algorithms.
* It will take care of all configuration and radio setup to
* detect and receive beams in the current Z-Wave region.
* If a beam is detected, RAIL will provide
* the usual \ref RAIL_EVENT_ZWAVE_BEAM event during which time users can
* process the beam as expected. However, normal packets may also be
* received during this time (also triggering \ref RAIL_EVENTS_RX_COMPLETION
* events), in which case, this API may need to be re-called to receive
* a beam. Users should also listen for
* \ref RAIL_EVENT_RX_CHANNEL_HOPPING_COMPLETE, which will indicate
* that no beam is heard. At that point, the radio will be automatically idled.
* Until one of these events is received, users should not try to
* reconfigure radio settings or start another radio operation. If an application
* needs to do some other operation or configuration, it must first call
* \ref RAIL_Idle and wait for the radio to idle.
*
* @note: The radio must be idle before calling this function.
*
* @note: \ref RAIL_ConfigRxChannelHopping must have been called successfully
* in Z-Wave before this function is called to provide a valid memory buffer
* for internal use (see \ref RAIL_RxChannelHoppingConfig_t::buffer).
*
* @note: This function alters radio functionality substantially. After calling
* it, the user should call \ref RAIL_ZWAVE_ConfigRegion,
* \ref RAIL_ConfigRxChannelHopping, \ref RAIL_EnableRxChannelHopping,
* and \ref RAIL_SetRxTransitions to reset these parameters to whatever
* behaviors were desired before calling this function. Additionally,
* this function will idle the radio upon on exit.
*
* @param[in] railHandle A RAIL instance handle.
* @param[out] beamDetectIndex Indicator of whether or not a beam was detected
* at all, regardless of if it was received, generally for use only by instruction
* from Silicon Labs. Can be NULL.
* @param[out] schedulerInfo While Z-Wave is currently not supported in
* RAIL Multiprotocol, this scheduler info is added to future proof
* against any future version of multiprotocol which may support it. For now,
* this argument can be NULL.
*
* @return status indicating whether or not the radio was able to configure
* beam packet detection/reception. Reasons for failure include an un-idled
* radio or a non-Japan non-Korea region configured before calling this function.
*/
RAIL_Status_t RAIL_ZWAVE_ReceiveBeam(RAIL_Handle_t railHandle,
uint8_t *beamDetectIndex,
const RAIL_SchedulerInfo_t *schedulerInfo);
/**
* Configure the receive algorithm used in \ref RAIL_ZWAVE_ReceiveBeam.
* This function should not be used without direct instruction by Silicon Labs.
*
* @param[in] railHandle A RAIL instance handle.
* @param[in] config Configuration for beam detection algorithm.
* @return Status code indicating success of the function call.
*/
RAIL_Status_t RAIL_ZWAVE_ConfigBeamRx(RAIL_Handle_t railHandle, RAIL_ZWAVE_BeamRxConfig_t *config);
/**
* Set the default RX beam configuration.
*
* @param[in] railHandle A RAIL instance handle.
* @return Status code indicating success of the function call.
*
* @note This function resets any changes made to the beam configuration via
* \ref RAIL_ZWAVE_ConfigBeamRx and the default beam configuration will be in effect
* on subsequent call(s) to \ref RAIL_ZWAVE_ReceiveBeam.
*/
RAIL_Status_t RAIL_ZWAVE_SetDefaultRxBeamConfig(RAIL_Handle_t railHandle);
/**
* Get the current RX beam configuration.
*
* @param[out] pConfig A pointer to \ref RAIL_ZWAVE_BeamRxConfig_t to be
* populated with the current beam configuration.
* @return A status code indicating success of the function call.
*/
RAIL_Status_t RAIL_ZWAVE_GetRxBeamConfig(RAIL_ZWAVE_BeamRxConfig_t *pConfig);
/**
* Configure the channel hop timings for use in Z-Wave RX channel hop configuration.
* This function should not be used without direct instruction by Silicon Labs.
*
* @param[in] railHandle A RAIL instance handle.
* @param[in, out] config Configuration for Z-Wave RX channel hopping.
* This structure must be allocated in application global read-write memory.
* RAIL will populate fields within or referenced by this structure during its
* operation. Be sure to allocate \ref RAIL_RxChannelHoppingConfigEntry_t
* entries[] for \ref RAIL_NUM_ZWAVE_CHANNELS. Be sure to set \ref
* RAIL_RxChannelHoppingConfig_t::numberOfChannels to the desired number of
* channels.
* @return Status code indicating success of the function call.
*
* @note: This API must be called before \ref RAIL_EnableRxChannelHopping(). This
* API must never be called while the radio is on with RX Duty Cycle or Channel
* Hopping enabled.
*/
RAIL_Status_t RAIL_ZWAVE_ConfigRxChannelHopping(RAIL_Handle_t railHandle, RAIL_RxChannelHoppingConfig_t *config);
/**
* Get the Z-Wave region.
*
* @param[in] railHandle A RAIL instance handle.
* @return The \ref RAIL_ZWAVE_RegionId_t value
*
* @note: \ref RAIL_ZWAVE_ConfigRegion must have been called successfully
* before this function is called. Otherwise, \ref RAIL_ZWAVE_REGIONID_UNKNOWN
* is returned.
*/
RAIL_ZWAVE_RegionId_t RAIL_ZWAVE_GetRegion(RAIL_Handle_t railHandle);
/**
* Write the AutoACK FIFO for the next outgoing Z-Wave Long Range ACK.
*
* @param[in] railHandle A handle of RAIL instance.
* @param[in] pLrAckData An application provided pointer to a const
* \ref RAIL_ZWAVE_LrAckData_t to populate the noise floor, TX power and receive
* rssi bytes of the outgoing Z-Wave Long Range ACK packet.
* @return A status code indicating success of the function call.
*
* This function sets the AutoACK data to use in acknowledging the frame
* being received. It must only be called while processing the \ref
* RAIL_EVENT_ZWAVE_LR_ACK_REQUEST_COMMAND.
* This will return \ref RAIL_STATUS_INVALID_STATE if it is too late to
* write the outgoing ACK. When successful, the ackData will
* only be sent once. Subsequent packets needing an Z-Wave Long Range ACK will
* each need to call this function to write the ACK information.
*/
RAIL_Status_t RAIL_ZWAVE_SetLrAckData(RAIL_Handle_t railHandle,
const RAIL_ZWAVE_LrAckData_t *pLrAckData);
/** EU-European Union, RAIL_ZWAVE_REGION_EU */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_EU;
/** US-United States, RAIL_ZWAVE_REGION_US */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_US;
/** ANZ-Australia/New Zealand, RAIL_ZWAVE_REGION_ANZ */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_ANZ;
/** HK-Hong Kong, RAIL_ZWAVE_REGION_HK */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_HK;
/** MY-Malaysia, RAIL_ZWAVE_REGION_MY */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_MY;
/** IN-India, RAIL_ZWAVE_REGION_IN */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_IN;
/** JP-Japan, RAIL_ZWAVE_REGION_JP */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_JP;
/** JP-Japan, RAIL_ZWAVE_REGION_JP */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_JPED;
/** RU-Russia, RAIL_ZWAVE_REGION_RU */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_RU;
/** IL-Israel, RAIL_ZWAVE_REGION_IL */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_IL;
/** KR-Korea, RAIL_ZWAVE_REGION_KR */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_KR;
/** KR-Korea, RAIL_ZWAVE_REGION_KR */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_KRED;
/** CN-China, RAIL_ZWAVE_REGION_CN */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_CN;
/** US-Long Range 1, RAIL_ZWAVE_REGION_US_LR1 */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_US_LR1;
/** US-Long Range 2, RAIL_ZWAVE_REGION_US_LR2 */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_US_LR2;
/** US-Long Range End Device, RAIL_ZWAVE_REGION_US_LR_END_DEVICE */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_US_LR_END_DEVICE;
/** Invalid Region */
extern const RAIL_ZWAVE_RegionConfig_t RAIL_ZWAVE_REGION_INVALID;
/** @} */ // end of Z_Wave
#ifdef __cplusplus
}
#endif
#endif // __RAIL_ZWAVE_H__