mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 07:37:47 +00:00
[radio] refine the definition of SYMBOL_TIME (#8634)
This commit simplifies the definition of `OT_RADIO_SYMBOL_TIME` and provided the reference of the value from IEEE 802.15.4-2015.
This commit is contained in:
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (274)
|
||||
#define OPENTHREAD_API_VERSION (275)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -52,7 +52,7 @@ extern "C" {
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
#define OT_US_PER_TEN_SYMBOLS 160 ///< The microseconds per 10 symbols.
|
||||
#define OT_US_PER_TEN_SYMBOLS OT_RADIO_TEN_SYMBOLS_TIME ///< Time for 10 symbols in units of microseconds
|
||||
|
||||
/**
|
||||
* This structure represents link-specific information for messages received from the Thread radio.
|
||||
|
||||
@@ -68,13 +68,20 @@ extern "C" {
|
||||
|
||||
enum
|
||||
{
|
||||
OT_RADIO_FRAME_MAX_SIZE = 127, ///< aMaxPHYPacketSize (IEEE 802.15.4-2006)
|
||||
OT_RADIO_FRAME_MIN_SIZE = 3, ///< Minimal size of frame FCS + CONTROL
|
||||
OT_RADIO_FRAME_MAX_SIZE = 127, ///< aMaxPHYPacketSize (IEEE 802.15.4-2006)
|
||||
OT_RADIO_FRAME_MIN_SIZE = 3, ///< Minimal size of frame FCS + CONTROL
|
||||
|
||||
OT_RADIO_SYMBOLS_PER_OCTET = 2, ///< 2.4 GHz IEEE 802.15.4-2006
|
||||
OT_RADIO_BIT_RATE = 250000, ///< 2.4 GHz IEEE 802.15.4 (bits per second)
|
||||
OT_RADIO_BITS_PER_OCTET = 8, ///< Number of bits per octet
|
||||
|
||||
OT_RADIO_SYMBOL_TIME = ((OT_RADIO_BITS_PER_OCTET / OT_RADIO_SYMBOLS_PER_OCTET) * 1000000) / OT_RADIO_BIT_RATE,
|
||||
// Per IEEE 802.15.4-2015, 12.3.3 Symbol rate:
|
||||
// The O-QPSK PHY symbol rate shall be 25 ksymbol/s when operating in the 868 MHz band and 62.5 ksymbol/s when
|
||||
// operating in the 780 MHz, 915 MHz, 2380 MHz, or 2450 MHz band
|
||||
OT_RADIO_SYMBOL_RATE = 62500, ///< The O-QPSK PHY symbol rate when operating in the 780MHz, 915MHz, 2380MHz, 2450MHz
|
||||
OT_RADIO_SYMBOL_TIME = 1000000 * 1 / OT_RADIO_SYMBOL_RATE, ///< Symbol duration time in unit of microseconds
|
||||
OT_RADIO_TEN_SYMBOLS_TIME = 10 * OT_RADIO_SYMBOL_TIME, ///< Time for 10 symbols in unit of microseconds
|
||||
|
||||
OT_RADIO_LQI_NONE = 0, ///< LQI measurement not supported
|
||||
OT_RADIO_RSSI_INVALID = 127, ///< Invalid or unknown RSSI value
|
||||
OT_RADIO_POWER_INVALID = 127, ///< Invalid or unknown power value
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
namespace ot {
|
||||
|
||||
static constexpr uint32_t kUsPerTenSymbols = OT_US_PER_TEN_SYMBOLS; ///< The microseconds per 10 symbols.
|
||||
static constexpr uint32_t kUsPerTenSymbols = OT_US_PER_TEN_SYMBOLS; ///< Time for 10 symbols in units of microseconds
|
||||
|
||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user