mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 13:57:38 +00:00
[efr32] enable BRD4170A to support 915MHz and 2.4GHz by default (#3664)
This commit is contained in:
committed by
Jonathan Hui
parent
dea08b2db7
commit
1af2933449
@@ -35,6 +35,6 @@
|
|||||||
#ifndef __BOARD_CONFIG_H__
|
#ifndef __BOARD_CONFIG_H__
|
||||||
#define __BOARD_CONFIG_H__
|
#define __BOARD_CONFIG_H__
|
||||||
|
|
||||||
#define RADIO_SUPPORT_2P4GHZ_OQPSK 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
||||||
|
|
||||||
#endif // __BOARD_CONFIG_H__
|
#endif // __BOARD_CONFIG_H__
|
||||||
|
|||||||
@@ -35,6 +35,6 @@
|
|||||||
#ifndef __BOARD_CONFIG_H__
|
#ifndef __BOARD_CONFIG_H__
|
||||||
#define __BOARD_CONFIG_H__
|
#define __BOARD_CONFIG_H__
|
||||||
|
|
||||||
#define RADIO_SUPPORT_2P4GHZ_OQPSK 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
||||||
|
|
||||||
#endif // __BOARD_CONFIG_H__
|
#endif // __BOARD_CONFIG_H__
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#ifndef __BOARD_CONFIG_H__
|
#ifndef __BOARD_CONFIG_H__
|
||||||
#define __BOARD_CONFIG_H__
|
#define __BOARD_CONFIG_H__
|
||||||
|
|
||||||
#define RADIO_SUPPORT_2P4GHZ_OQPSK 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
||||||
#define RADIO_SUPPORT_915MHZ_OQPSK 1 ///< Dev board suppports OQPSK modulation in 915MHz band.
|
#define RADIO_CONFIG_915MHZ_OQPSK_SUPPORT 1 ///< Dev board suppports OQPSK modulation in 915MHz band.
|
||||||
|
|
||||||
#endif // __BOARD_CONFIG_H__
|
#endif // __BOARD_CONFIG_H__
|
||||||
|
|||||||
@@ -35,6 +35,6 @@
|
|||||||
#ifndef __BOARD_CONFIG_H__
|
#ifndef __BOARD_CONFIG_H__
|
||||||
#define __BOARD_CONFIG_H__
|
#define __BOARD_CONFIG_H__
|
||||||
|
|
||||||
#define RADIO_SUPPORT_2P4GHZ_OQPSK 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 ///< Dev board suppports OQPSK modulation in 2.4GHz band.
|
||||||
|
|
||||||
#endif // __BOARD_CONFIG_H__
|
#endif // __BOARD_CONFIG_H__
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
* for OpenThread.
|
* for OpenThread.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "board_config.h"
|
||||||
#include "em_msc.h"
|
#include "em_msc.h"
|
||||||
|
|
||||||
#ifndef OPENTHREAD_CORE_EFR32_CONFIG_H_
|
#ifndef OPENTHREAD_CORE_EFR32_CONFIG_H_
|
||||||
@@ -46,6 +47,26 @@
|
|||||||
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @def OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
|
||||||
|
*
|
||||||
|
* Define to 1 if you want to enable physical layer to support OQPSK modulation in 915MHz band.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef RADIO_CONFIG_915MHZ_OQPSK_SUPPORT
|
||||||
|
#define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @def OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT
|
||||||
|
*
|
||||||
|
* Define to 1 if you want to enable physical layer to support OQPSK modulation in 2.4GHz band.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT
|
||||||
|
#define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
|
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -64,14 +64,6 @@ enum
|
|||||||
IEEE802154_DSN_OFFSET = 2,
|
IEEE802154_DSN_OFFSET = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
EFR32_915MHZ_OQPSK_CHANNEL_MIN = 1,
|
|
||||||
EFR32_915MHZ_OQPSK_CHANNEL_MAX = 10,
|
|
||||||
EFR32_2P4GHZ_OQPSK_CHANNEL_MIN = 11,
|
|
||||||
EFR32_2P4GHZ_OQPSK_CHANNEL_MAX = 26,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
EFR32_RECEIVE_SENSITIVITY = -100, // dBm
|
EFR32_RECEIVE_SENSITIVITY = -100, // dBm
|
||||||
@@ -88,7 +80,7 @@ enum
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
#if RADIO_SUPPORT_2P4GHZ_OQPSK && RADIO_SUPPORT_915MHZ_OQPSK
|
#if RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT && RADIO_CONFIG_915MHZ_OQPSK_SUPPORT
|
||||||
EFR32_NUM_BAND_CONFIGS = 2,
|
EFR32_NUM_BAND_CONFIGS = 2,
|
||||||
#else
|
#else
|
||||||
EFR32_NUM_BAND_CONFIGS = 1,
|
EFR32_NUM_BAND_CONFIGS = 1,
|
||||||
@@ -278,25 +270,25 @@ void efr32BandConfigInit(void (*aEventCallback)(RAIL_Handle_t railHandle, RAIL_E
|
|||||||
{
|
{
|
||||||
uint8_t index = 0;
|
uint8_t index = 0;
|
||||||
|
|
||||||
#if RADIO_SUPPORT_2P4GHZ_OQPSK
|
#if RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT
|
||||||
sBandConfigs[index].mRailConfig.eventsCallback = aEventCallback;
|
sBandConfigs[index].mRailConfig.eventsCallback = aEventCallback;
|
||||||
sBandConfigs[index].mRailConfig.protocol = NULL;
|
sBandConfigs[index].mRailConfig.protocol = NULL;
|
||||||
sBandConfigs[index].mRailConfig.scheduler = &sBandConfigs[index].mRailSchedState;
|
sBandConfigs[index].mRailConfig.scheduler = &sBandConfigs[index].mRailSchedState;
|
||||||
sBandConfigs[index].mChannelConfig = NULL;
|
sBandConfigs[index].mChannelConfig = NULL;
|
||||||
sBandConfigs[index].mChannelMin = EFR32_2P4GHZ_OQPSK_CHANNEL_MIN;
|
sBandConfigs[index].mChannelMin = OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MIN;
|
||||||
sBandConfigs[index].mChannelMax = EFR32_2P4GHZ_OQPSK_CHANNEL_MAX;
|
sBandConfigs[index].mChannelMax = OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MAX;
|
||||||
|
|
||||||
assert((sBandConfigs[index].mRailHandle = efr32RailConfigInit(&sBandConfigs[index])) != NULL);
|
assert((sBandConfigs[index].mRailHandle = efr32RailConfigInit(&sBandConfigs[index])) != NULL);
|
||||||
index++;
|
index++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if RADIO_SUPPORT_915MHZ_OQPSK
|
#if RADIO_CONFIG_915MHZ_OQPSK_SUPPORT
|
||||||
sBandConfigs[index].mRailConfig.eventsCallback = aEventCallback;
|
sBandConfigs[index].mRailConfig.eventsCallback = aEventCallback;
|
||||||
sBandConfigs[index].mRailConfig.protocol = NULL;
|
sBandConfigs[index].mRailConfig.protocol = NULL;
|
||||||
sBandConfigs[index].mRailConfig.scheduler = &sBandConfigs[index].mRailSchedState;
|
sBandConfigs[index].mRailConfig.scheduler = &sBandConfigs[index].mRailSchedState;
|
||||||
sBandConfigs[index].mChannelConfig = channelConfigs[0];
|
sBandConfigs[index].mChannelConfig = channelConfigs[0];
|
||||||
sBandConfigs[index].mChannelMin = EFR32_915MHZ_OQPSK_CHANNEL_MIN;
|
sBandConfigs[index].mChannelMin = OT_RADIO_915MHZ_OQPSK_CHANNEL_MIN;
|
||||||
sBandConfigs[index].mChannelMax = EFR32_915MHZ_OQPSK_CHANNEL_MAX;
|
sBandConfigs[index].mChannelMax = OT_RADIO_915MHZ_OQPSK_CHANNEL_MAX;
|
||||||
|
|
||||||
assert((sBandConfigs[index].mRailHandle = efr32RailConfigInit(&sBandConfigs[index])) != NULL);
|
assert((sBandConfigs[index].mRailHandle = efr32RailConfigInit(&sBandConfigs[index])) != NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define RADIO_CONFIG_XTAL_FREQUENCY 38400000UL
|
#define RADIO_CONFIG_XTAL_FREQUENCY 38400000UL
|
||||||
|
|
||||||
#if RADIO_SUPPORT_915MHZ_OQPSK
|
#if RADIO_CONFIG_915MHZ_OQPSK_SUPPORT
|
||||||
extern const RAIL_ChannelConfig_t *channelConfigs[];
|
extern const RAIL_ChannelConfig_t *channelConfigs[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user