Skip to content

Commit

Permalink
Added OFDM configurations and FEC in RF config structure (ARMmbed#2513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarkko Paso committed Dec 10, 2020
1 parent b88abfa commit e483a07
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nanostack/platform/arm_hal_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,25 @@ typedef enum {
MODULATION_INDEX_UNDEFINED ///< Modulation index undefined
} phy_modulation_index_e;

/** OFDM option */
typedef enum {
OFDM_OPTION_1 = 1, ///< OFDM option 1
OFDM_OPTION_2 = 2, ///< OFDM option 2
OFDM_OPTION_3 = 3, ///< OFDM option 3
OFDM_OPTION_4 = 4 ///< OFDM option 4
} phy_ofdm_option_e;

/** Modulation and coding scheme (OFDM) */
typedef enum {
OFDM_MCS_0 = 0, ///< OFDM MCS 0
OFDM_MCS_1 = 1, ///< OFDM MCS 1
OFDM_MCS_2 = 2, ///< OFDM MCS 2
OFDM_MCS_3 = 3, ///< OFDM MCS 3
OFDM_MCS_4 = 4, ///< OFDM MCS 4
OFDM_MCS_5 = 5, ///< OFDM MCS 5
OFDM_MCS_6 = 6 ///< OFDM MCS 6
} phy_ofdm_mcs_e;

/**
* @brief enum phy_802_15_4_mode_t IEEE 802.15.4 mode
*
Expand All @@ -192,6 +211,9 @@ typedef struct phy_rf_channel_configuration_s {
uint16_t number_of_channels; ///< Number of channels
phy_modulation_e modulation; ///< Modulation scheme
phy_modulation_index_e modulation_index; ///< Modulation index
bool fec; ///< Forward error correction, true - enabled, false - disabled
phy_ofdm_option_e ofdm_option; ///< OFDM option
phy_ofdm_mcs_e ofdm_mcs; ///< OFDM modulation and coding scheme
} phy_rf_channel_configuration_s;

/** Channel page configuration */
Expand Down
1 change: 1 addition & 0 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2396,6 +2396,7 @@ int ws_bootstrap_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t
static int ws_bootstrap_set_domain_rf_config(protocol_interface_info_entry_t *cur)
{
phy_rf_channel_configuration_s rf_configs;
memset(&rf_configs, 0, sizeof(phy_rf_channel_configuration_s));
rf_configs.channel_0_center_frequency = (uint32_t)cur->ws_info->hopping_schdule.ch0_freq * 100000;
rf_configs.channel_spacing = ws_decode_channel_spacing(cur->ws_info->hopping_schdule.channel_spacing);
rf_configs.datarate = ws_get_datarate_using_operating_mode(cur->ws_info->hopping_schdule.operating_mode);
Expand Down
3 changes: 3 additions & 0 deletions source/MAC/IEEE802_15_4/mac_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,9 @@ int8_t mac_mlme_set_req(protocol_interface_rf_mac_setup_s *rf_mac_setup, const m
tr_info("Number of channels: %u", config_params->number_of_channels);
tr_info("Modulation: %u", config_params->modulation);
tr_info("Modulation index: %u", config_params->modulation_index);
tr_info("FEC: %u", config_params->fec);
tr_info("OFDM MCS: %u", config_params->ofdm_mcs);
tr_info("OFDM option: %u", config_params->ofdm_option);
return 0;
default:
return mac_mlme_handle_set_values(rf_mac_setup, set_req);
Expand Down

0 comments on commit e483a07

Please sign in to comment.