Skip to content

Commit e483a07

Browse files
author
Jarkko Paso
authored
Added OFDM configurations and FEC in RF config structure (ARMmbed#2513)
1 parent b88abfa commit e483a07

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

nanostack/platform/arm_hal_phy.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,25 @@ typedef enum {
175175
MODULATION_INDEX_UNDEFINED ///< Modulation index undefined
176176
} phy_modulation_index_e;
177177

178+
/** OFDM option */
179+
typedef enum {
180+
OFDM_OPTION_1 = 1, ///< OFDM option 1
181+
OFDM_OPTION_2 = 2, ///< OFDM option 2
182+
OFDM_OPTION_3 = 3, ///< OFDM option 3
183+
OFDM_OPTION_4 = 4 ///< OFDM option 4
184+
} phy_ofdm_option_e;
185+
186+
/** Modulation and coding scheme (OFDM) */
187+
typedef enum {
188+
OFDM_MCS_0 = 0, ///< OFDM MCS 0
189+
OFDM_MCS_1 = 1, ///< OFDM MCS 1
190+
OFDM_MCS_2 = 2, ///< OFDM MCS 2
191+
OFDM_MCS_3 = 3, ///< OFDM MCS 3
192+
OFDM_MCS_4 = 4, ///< OFDM MCS 4
193+
OFDM_MCS_5 = 5, ///< OFDM MCS 5
194+
OFDM_MCS_6 = 6 ///< OFDM MCS 6
195+
} phy_ofdm_mcs_e;
196+
178197
/**
179198
* @brief enum phy_802_15_4_mode_t IEEE 802.15.4 mode
180199
*
@@ -192,6 +211,9 @@ typedef struct phy_rf_channel_configuration_s {
192211
uint16_t number_of_channels; ///< Number of channels
193212
phy_modulation_e modulation; ///< Modulation scheme
194213
phy_modulation_index_e modulation_index; ///< Modulation index
214+
bool fec; ///< Forward error correction, true - enabled, false - disabled
215+
phy_ofdm_option_e ofdm_option; ///< OFDM option
216+
phy_ofdm_mcs_e ofdm_mcs; ///< OFDM modulation and coding scheme
195217
} phy_rf_channel_configuration_s;
196218

197219
/** Channel page configuration */

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,7 @@ int ws_bootstrap_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t
23962396
static int ws_bootstrap_set_domain_rf_config(protocol_interface_info_entry_t *cur)
23972397
{
23982398
phy_rf_channel_configuration_s rf_configs;
2399+
memset(&rf_configs, 0, sizeof(phy_rf_channel_configuration_s));
23992400
rf_configs.channel_0_center_frequency = (uint32_t)cur->ws_info->hopping_schdule.ch0_freq * 100000;
24002401
rf_configs.channel_spacing = ws_decode_channel_spacing(cur->ws_info->hopping_schdule.channel_spacing);
24012402
rf_configs.datarate = ws_get_datarate_using_operating_mode(cur->ws_info->hopping_schdule.operating_mode);

source/MAC/IEEE802_15_4/mac_mlme.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,9 @@ int8_t mac_mlme_set_req(protocol_interface_rf_mac_setup_s *rf_mac_setup, const m
828828
tr_info("Number of channels: %u", config_params->number_of_channels);
829829
tr_info("Modulation: %u", config_params->modulation);
830830
tr_info("Modulation index: %u", config_params->modulation_index);
831+
tr_info("FEC: %u", config_params->fec);
832+
tr_info("OFDM MCS: %u", config_params->ofdm_mcs);
833+
tr_info("OFDM option: %u", config_params->ofdm_option);
831834
return 0;
832835
default:
833836
return mac_mlme_handle_set_values(rf_mac_setup, set_req);

0 commit comments

Comments
 (0)