Skip to content

Commit

Permalink
v3.4 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovic-Lesur committed Nov 9, 2023
1 parent 91fd4ea commit 8c0c655
Show file tree
Hide file tree
Showing 20 changed files with 385 additions and 179 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v3.4](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.4) - 09 Nov 2023

### Added

* Add `RF_API_start_continuous_wave()` function template for **type approval addon**.
* Add required macros for **frequency hopping test mode** of type approval addon.
* Update `cmake` tool to generate **type approval addon** and add **predefined values list** for some parameters.

### Fixed

* Impose `READY` state to close the library (as shown in state machine).
* **Reset core context** in case of low level error.
* Fix downlink sequence in **pseudo-blocking mode** (asynchronous mode with process callback set to NULL).
* Add `BIDIRECTIONAL` flag on `MCU_API_print_dl_payload()` function.

### Changed

* Use `sfx_u32` type for **timer durations** (for type approval addon).
* Use **boolean type** for `bidirectional_flag` field in user API.

### Removed

* Remove **unused timer reasons** in local `_start_timer()` function.
* Remove **unused inclusion** of `sigfox_rc.h` file.
* Remove `doc` folder since images are now hosted on the GitHub wiki.

### Known limitations

* **Payload encryption** not supported.
* **Secure element** not supported.

## [v3.3](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.3) - 10 Aug 2023

### Added
Expand Down
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ opt(TYPE_BOOL USE_SIGFOX_EP_FLAGS_H ON "library compilation options. ON:in sigfo
if(NOT sigfox_ep_addon_rfp_IS_TOP_LEVEL)
opt(TYPE_BOOL ADDON_RFP OFF "Add RFP addon contents to build it with library")
endif()
#Option addon TA contents
if(NOT sigfox_ep_addon_ta_IS_TOP_LEVEL)
opt(TYPE_BOOL ADDON_TA OFF "Add TA addon contents to build it with library")
endif()
#Option RF API contents
if(NOT s2lp_rf_api_IS_TOP_LEVEL)
opt(TYPE_BOOL S2LP_RF_API OFF "Add S2LP RF API contents to build it with library")
Expand Down Expand Up @@ -144,12 +148,15 @@ else()
opt(TYPE_BOOL VERBOSE ON "Enable versionning functions")
opt(TYPE_BOOL CRC_HW OFF "Support hardware CRC")
opt(TYPE_BOOL ERROR_CODES ON "Enable error codes on all functions")
opt(TYPE_VALUE UL_BIT_RATE_BPS OFF "Fixed uplink bit rate in bps (100/600)")
opt(TYPE_VALUE UL_BIT_RATE_BPS OFF "Fixed uplink bit rate in bps (100/600)")
set_property(CACHE UL_BIT_RATE_BPS PROPERTY STRINGS OFF 100 600)
opt(TYPE_VALUE T_IFU_MS OFF "Fixed inter-frame delay in ms (10 to 2000)")
opt(TYPE_VALUE T_CONF_MS OFF "Fixed DL confirmation delay in ms (1400 to 4000)")
opt(TYPE_VALUE UL_PAYLOAD_SIZE OFF "Fixed UL payload size in bytes (0 to 12)")
opt(TYPE_VALUE TX_POWER_DBM_EIRP OFF "Fixed the TX power supported by the radio")
set_property(CACHE UL_PAYLOAD_SIZE PROPERTY STRINGS OFF 0 1 2 3 4 5 6 7 8 9 10 11 12)
opt(TYPE_VALUE TX_POWER_DBM_EIRP OFF "Fixed the TX power supported by the radio")
opt(TYPE_VALUE MESSAGE_COUNTER_ROLLOVER OFF "Fixed message counter rollover (128, 256, 512, 1024, 2048 or 4096)")
set_property(CACHE MESSAGE_COUNTER_ROLLOVER PROPERTY STRINGS OFF 128 256 512 1024 2048 4096)
opt(TYPE_VALUE ERROR_STACK 32 "Enable error stack and defined the depth")

foreach( COMPILE_FLAG ${COMPILE_FLAG_LIST} )
Expand Down Expand Up @@ -191,6 +198,10 @@ include(precompile)
if(ADDON_RFP)
include(addon_rfp)
endif()
#Addon TA module
if(ADDON_TA)
include(addon_ta)
endif()
#RF_API modules
if(S2LP_RF_API)
include(s2lp_rf_api)
Expand Down
311 changes: 205 additions & 106 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmake/addon_rfp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
addon_rfp
GIT_REPOSITORY "https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp"
GIT_TAG "v1.3"
GIT_TAG "v1.4"
GIT_PROGRESS TRUE
GIT_SHALLOW 1
#SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/addons/rfp
Expand Down
22 changes: 22 additions & 0 deletions cmake/addon_ta.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include(ExternalProject)
include(FetchContent)
Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
addon_ta
GIT_REPOSITORY "https://github.com/sigfox-tech-radio/sigfox-ep-addon-ta"
GIT_TAG "v1.0"
GIT_PROGRESS TRUE
GIT_SHALLOW 1
#SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/addons/ta
UPDATE_DISCONNECTED TRUE
STEP_TARGETS update
)
FetchContent_GetProperties(addon_ta)
if (NOT platform_POPULATED)
FetchContent_Populate(addon_ta)
add_subdirectory(${addon_ta_SOURCE_DIR} ${addon_ta_BINARY_DIR})
endif()
mark_as_advanced(FETCHCONTENT_QUIET FETCHCONTENT_BASE_DIR FETCHCONTENT_FULLY_DISCONNECTED FETCHCONTENT_UPDATES_DISCONNECTED)
mark_as_advanced(FETCHCONTENT_SOURCE_DIR_ADDON_TA FETCHCONTENT_UPDATES_DISCONNECTED_ADDON_TA)
#FetchContent_MakeAvailable(addon_ta)

2 changes: 1 addition & 1 deletion cmake/lr11xx_rf_api.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
lr11xx_rf_api
GIT_REPOSITORY "https://github.com/sigfox-tech-radio/sigfox-ep-rf-api-semtech-lr11xx"
GIT_TAG "v1.1"
GIT_TAG "v1.2"
GIT_PROGRESS TRUE
GIT_SHALLOW 1
#SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/addons/rfp
Expand Down
2 changes: 1 addition & 1 deletion cmake/s2lp_rf_api.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
s2lp_rf_api
GIT_REPOSITORY "https://github.com/sigfox-tech-radio/sigfox-ep-rf-api-st-s2lp"
GIT_TAG "v1.2"
GIT_TAG "v1.3"
GIT_PROGRESS TRUE
GIT_SHALLOW 1
#SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/addons/rfp
Expand Down
Binary file removed docs/images/sigfox_ep_lib_architecture.png
Binary file not shown.
8 changes: 4 additions & 4 deletions inc/core/sigfox_ep_bitstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ typedef struct {
#ifdef APPLICATION_MESSAGES
/*!******************************************************************
* \fn SIGFOX_EP_BITSTREAM_status_t SIGFOX_EP_BITSTREAM_build_application_frame(SIGFOX_EP_BITSTREAM_application_frame_t *input, sfx_u8 *bitstream, sfx_u8 *bitstream_size_bytes)
* \brief Build an application frame bistream.
* \brief Build an application frame bitstream.
* \param[in] input: Application frame input parameters.
* \param[out] bitstream: Computed bistream.
* \param[out] bitstream: Computed bitstream.
* \param[out] bitstream_size_bytes: Size of the computed bitstream in bytes.
* \retval Function execution status.
*******************************************************************/
Expand All @@ -158,9 +158,9 @@ SIGFOX_EP_BITSTREAM_status_t SIGFOX_EP_BITSTREAM_build_application_frame(SIGFOX_
#if (defined CONTROL_KEEP_ALIVE_MESSAGE) || (defined BIDIRECTIONAL)
/*!******************************************************************
* \fn SIGFOX_EP_BITSTREAM_status_t SIGFOX_EP_BITSTREAM_build_control_frame(SIGFOX_EP_BITSTREAM_control_frame_t *input, sfx_u8 *bitstream, sfx_u8 *bitstream_size_bytes)
* \brief Build a control frame bistream.
* \brief Build a control frame bitstream.
* \param[in] input: Control frame input parameters.
* \param[out] bitstream: Computed bistream.
* \param[out] bitstream: Computed bitstream.
* \param[out] bitstream_size_bytes: Size of the computed bitstream in bytes.
* \retval Function execution status.
*******************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion inc/core/sigfox_ep_frequency.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef struct {

/*!******************************************************************
* \fn SIGFOX_EP_FREQUENCY_status_t SIGFOX_EP_FREQUENCY_init(const SIGFOX_rc_t *rc, sfx_u8 *ep_id, sfx_u16 last_random_value)
* \brief Init the frequecy driver.
* \brief Init the frequency driver.
* \param[in] rc: Radio configuration.
* \param[in] ep_id: Device ID (used to randomize the frequency algorithm).
* \param[in] last_random_value: Last random value (read in NVM at device start-up).
Expand Down
6 changes: 4 additions & 2 deletions inc/manuf/mcu_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#endif
#ifdef CERTIFICATION
#define MCU_API_TIMER_INSTANCE_ADDON_RFP MCU_API_TIMER_3
#define MCU_API_TIMER_INSTANCE_ADDON_TA MCU_API_TIMER_3
#endif
#endif /* TIMER_REQUIRED */

Expand Down Expand Up @@ -139,6 +140,7 @@ typedef enum {
#endif
#ifdef CERTIFICATION
MCU_API_TIMER_REASON_ADDON_RFP,
MCU_API_TIMER_REASON_ADDON_TA,
#endif
MCU_API_TIMER_REASON_LAST
} MCU_API_timer_reason_t;
Expand Down Expand Up @@ -348,7 +350,7 @@ MCU_API_status_t MCU_API_set_nvm(sfx_u8 *nvm_data, sfx_u8 nvm_data_size_bytes);
MCU_API_status_t MCU_API_get_voltage_temperature(sfx_u16 *voltage_idle_mv, sfx_u16 *voltage_tx_mv, sfx_s16 *temperature_tenth_degrees);
#endif

#ifdef CERTIFICATION
#if (defined CERTIFICATION) && (defined BIDIRECTIONAL)
/*!******************************************************************
* \fn MCU_API_status_t MCU_API_print_dl_payload(sfx_u8 *dl_payload, sfx_u8 dl_payload_size, sfx_s16 rssi_dbm)
* \brief Print a downlink frame (only used by the RFP addon during downlink test modes).
Expand All @@ -364,7 +366,7 @@ MCU_API_status_t MCU_API_print_dl_payload(sfx_u8 *dl_payload, sfx_u8 dl_payload_
#ifdef VERBOSE
/*!******************************************************************
* \fn MCU_API_status_t MCU_API_get_initial_pac(sfx_u8 *initial_pac, sfx_u8 initial_pac_size_bytes)
* \brief Get device initital PAC code.
* \brief Get device initial PAC code.
* \param[in] initial_pac_size_bytes: Number of bytes of the PAC to read (full size is SIGFOX_EP_PAC_SIZE_BYTES).
* \param[out] initial_pac: Initial PAC.
* \retval Function execution status.
Expand Down
17 changes: 15 additions & 2 deletions inc/manuf/rf_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef void RF_API_status_t;
* \fn RF_API_process_cb_t To be called when the RF driver needs to be processed.
* \fn RF_API_error_cb_t To be called when an error occurs during RF operation.
* \fn RF_API_tx_cplt_cb_t To be called when a frame transmission is complete.
* \fn RF_API_rx_data_received_cb_t To be called when a diwnlink frame is received.
* \fn RF_API_rx_data_received_cb_t To be called when a downlink frame is received.
* \fn RF_API_channel_free_cb_t To be called when the carrier sense operation is complete.
*******************************/
typedef void (*RF_API_process_cb_t)(void);
Expand Down Expand Up @@ -332,13 +332,26 @@ RF_API_status_t RF_API_carrier_sense(RF_API_carrier_sense_parameters_t *carrier_
RF_API_status_t RF_API_get_latency(RF_API_latency_t latency_type, sfx_u32 *latency_ms);
#endif

#ifdef CERTIFICATION
/*!******************************************************************
* \fn RF_API_status_t RF_API_start_continuous_wave(void)
* \brief Start continuous wave transmission using radio parameters given in the RF_API_init() function.
* \brief This function is only called by the type approval addon (EP-ADDON-TA). In asynchronous mode, it must not issue any completion callback.
* \brief The transmission will be stopped by the RF_API_de_init() function.
* \param[in] none
* \param[out] none
* \retval Function execution status.
*******************************************************************/
RF_API_status_t RF_API_start_continuous_wave(void);
#endif

#ifdef VERBOSE
/*!******************************************************************
* \fn RF_API_status_t RF_API_get_version(sfx_u8 **version, sfx_u8 *version_size_char)
* \brief Get RF driver version.
* \param[in] none
* \param[out] version: RF driver version.
* \param[out] version_size_char: Pointer tha will contain the string size.
* \param[out] version_size_char: Pointer that will contain the string size.
* \retval Function execution status.
*******************************************************************/
RF_API_status_t RF_API_get_version(sfx_u8 **version, sfx_u8 *version_size_char);
Expand Down
2 changes: 1 addition & 1 deletion inc/sigfox_ep_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ typedef struct {
sfx_u8 ul_payload_size_bytes;
#endif
#ifdef BIDIRECTIONAL
sfx_u8 bidirectional_flag;
sfx_bool bidirectional_flag;
#ifndef T_CONF_MS
sfx_u16 t_conf_ms;
#endif
Expand Down
4 changes: 2 additions & 2 deletions inc/sigfox_ep_api_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ typedef struct {
sfx_u32 tx_frequency_hz; // If non-zero, bypass the uplink random frequency generator of the core library.
#ifdef BIDIRECTIONAL
sfx_u32 rx_frequency_hz; // If non-zero, bypass the downlink frequency generator of the core library.
sfx_u16 dl_t_w_ms; // If non-zero, bypass the downlink timer value (T_W) from the RC structure.
sfx_u16 dl_t_rx_ms; // If non-zero, bypass the downlink timeout value (T_RX) from the RC structure.
sfx_u32 dl_t_w_ms; // If non-zero, bypass the downlink timer value (T_W) from the RC structure.
sfx_u32 dl_t_rx_ms; // If non-zero, bypass the downlink timeout value (T_RX) from the RC structure.
#endif
#if (defined REGULATORY) && (defined SPECTRUM_ACCESS_LBT)
sfx_u32 lbt_cs_max_duration_first_frame_ms; // If non-zero, bypass the first CS timeout value of the selected RC.
Expand Down
2 changes: 1 addition & 1 deletion inc/sigfox_ep_lib_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/*** Main version ***/

#define SIGFOX_EP_LIB_VERSION "v3.3"
#define SIGFOX_EP_LIB_VERSION "v3.4"

/*** Compilation flags ***/

Expand Down
31 changes: 23 additions & 8 deletions inc/sigfox_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,29 @@ static const sfx_u16 SIGFOX_MESSAGE_COUNTER_ROLLOVER_LIST[SIGFOX_MESSAGE_COUNTER
#endif

#ifdef SPECTRUM_ACCESS_FH
#define SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ 200000
#define SIGFOX_FH_MACRO_CHANNEL_DELTA (SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ - SIGFOX_MACRO_CHANNEL_WIDTH_HZ)
#define SIGFOX_FH_MICRO_CHANNEL_NUMBER 8
#define SIGFOX_FH_MICRO_CHANNEL_USED 6
#define SIGFOX_FH_MICRO_CHANNEL_MASK 0x7E
#define SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ (SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ / SIGFOX_FH_MICRO_CHANNEL_NUMBER)
#define SIGFOX_FH_MACRO_CHANNEL_GUARD_BAND_HZ (SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ - (SIGFOX_FH_MACRO_CHANNEL_DELTA / 2))
#define SIGFOX_FH_MICRO_CHANNEL_GUARD_BAND_HZ 1000
#define SIGFOX_FH_MACRO_CHANNEL_NUMBER 9
#define SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ 200000
#define SIGFOX_FH_MACRO_CHANNEL_SPACING_HZ 300000
#define SIGFOX_FH_MACRO_CHANNEL_DELTA (SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ - SIGFOX_MACRO_CHANNEL_WIDTH_HZ)

#define SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL 8
#define SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED 6
#define SIGFOX_FH_MICRO_CHANNEL_MASK 0x7E
#define SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ (SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ / SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL)
#define SIGFOX_FH_MICRO_CHANNEL_GUARD_BAND_HZ 2000
#define SIGFOX_FH_MICRO_CHANNEL_OPERATED_WIDTH_HZ (SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ - (2 * SIGFOX_FH_MICRO_CHANNEL_GUARD_BAND_HZ))
#define SIGFOX_FH_MICRO_CHANNEL_NUMBER (SIGFOX_FH_MACRO_CHANNEL_NUMBER * SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED)


#define SIGFOX_FH_MACRO_CHANNEL_GUARD_BAND_HZ (SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ - (SIGFOX_FH_MACRO_CHANNEL_DELTA / 2))

#define SIGFOX_FH_RC2_FIRST_MICRO_CHANNEL_FREQUENCY_HZ 902137500
#define SIGFOX_FH_RC2_OPERATED_MACRO_CHANNEL_INDEX 0

#define SIGFOX_FH_RC4_FIRST_MICRO_CHANNEL_FREQUENCY_HZ 920137500
#define SIGFOX_FH_RC4_OPERATED_MACRO_CHANNEL_INDEX 2

#define SIGFOX_FH_MICRO_CHANNEL_HOP ((SIGFOX_FH_MACRO_CHANNEL_SPACING_HZ - SIGFOX_FH_MACRO_CHANNEL_WIDTH_HZ) + ((SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL - SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED) * SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ))
#endif

/*** Automatic timer required flag definition ***/
Expand Down
16 changes: 8 additions & 8 deletions src/core/sigfox_ep_frequency.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef struct {
#endif
#if (defined REGULATORY) && (defined SPECTRUM_ACCESS_FH) && !(defined SINGLE_FRAME)
sfx_bool micro_channel_table_initialized;
sfx_u8 micro_channel_frame_count[SIGFOX_FH_MICRO_CHANNEL_NUMBER];
sfx_u8 micro_channel_frame_count[SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL];
#endif
} SIGFOX_EP_FREQUENCY_context_t;

Expand Down Expand Up @@ -147,7 +147,7 @@ static sfx_bool _is_baseband_frequency_allowed(sfx_u32 baseband_frequency_hz) {
/*******************************************************************/
static sfx_bool _is_micro_channel_free(sfx_u8 micro_channel_index) {
// Thanks to the FH timer, a micro-channel is free when all frames of the message have been sent.
sfx_bool micro_channel_free = (sigfox_ep_frequency_ctx.micro_channel_frame_count[micro_channel_index] >= SIGFOX_FH_MICRO_CHANNEL_USED) ? SFX_TRUE : SFX_FALSE;
sfx_bool micro_channel_free = (sigfox_ep_frequency_ctx.micro_channel_frame_count[micro_channel_index] >= SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED) ? SFX_TRUE : SFX_FALSE;
return micro_channel_free;
}
#endif
Expand All @@ -159,7 +159,7 @@ static sfx_u8 _get_micro_channel_index(sfx_u32 baseband_frequency_hz) {
sfx_u8 micro_channel_index = 0;
// Compute index.
micro_channel_index = (sfx_u8) ((baseband_frequency_hz + (SIGFOX_FH_MACRO_CHANNEL_DELTA / 2)) / SIGFOX_FH_MICRO_CHANNEL_WIDTH_HZ);
micro_channel_index %= SIGFOX_FH_MICRO_CHANNEL_NUMBER;
micro_channel_index %= SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL;
// Check micro-channels mask.
if (((SIGFOX_FH_MICRO_CHANNEL_MASK >> micro_channel_index) & 0x01) == 0) {
micro_channel_index = SIGFOX_EP_FREQUENCY_FH_MICRO_CHANNEL_ERROR;
Expand Down Expand Up @@ -297,8 +297,8 @@ SIGFOX_EP_FREQUENCY_status_t SIGFOX_EP_FREQUENCY_init(const SIGFOX_rc_t *rc, sfx
#if (defined REGULATORY) && (defined SPECTRUM_ACCESS_FH) && !(defined SINGLE_FRAME)
// Init micro-channels frame count (only once).
if (sigfox_ep_frequency_ctx.micro_channel_table_initialized == SFX_FALSE) {
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_NUMBER ; idx++) {
sigfox_ep_frequency_ctx.micro_channel_frame_count[idx] = SIGFOX_FH_MICRO_CHANNEL_USED;
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL ; idx++) {
sigfox_ep_frequency_ctx.micro_channel_frame_count[idx] = SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED;
}
sigfox_ep_frequency_ctx.micro_channel_table_initialized = SFX_TRUE;
}
Expand Down Expand Up @@ -350,8 +350,8 @@ SIGFOX_EP_FREQUENCY_status_t SIGFOX_EP_FREQUENCY_compute_uplink(SIGFOX_EP_FREQUE
#if (defined REGULATORY) && (defined SPECTRUM_ACCESS_FH)
// The FH timer (or Tw for DL-CONF) has necessarily been launched before a first frame, allowing all micro-channels to be used again.
if ((input -> ul_frame_rank) == SIGFOX_UL_FRAME_RANK_1) {
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_NUMBER ; idx++) {
sigfox_ep_frequency_ctx.micro_channel_frame_count[idx] = SIGFOX_FH_MICRO_CHANNEL_USED;
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL ; idx++) {
sigfox_ep_frequency_ctx.micro_channel_frame_count[idx] = SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL_OPERATED;
}
}
#endif
Expand Down Expand Up @@ -414,7 +414,7 @@ SIGFOX_EP_FREQUENCY_status_t SIGFOX_EP_FREQUENCY_compute_uplink(SIGFOX_EP_FREQUE
#endif /* SINGLE_FRAME */
#if (defined REGULATORY) && (defined SPECTRUM_ACCESS_FH) && !(defined SINGLE_FRAME)
// Increment all micro-channels frame count.
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_NUMBER ; idx++) {
for (idx=0 ; idx<SIGFOX_FH_MICRO_CHANNEL_PER_MACRO_CHANNEL ; idx++) {
sigfox_ep_frequency_ctx.micro_channel_frame_count[idx]++;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/manuf/mcu_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ MCU_API_status_t MCU_API_get_voltage_temperature(sfx_u16 *voltage_idle_mv, sfx_u
}
#endif

#ifdef CERTIFICATION
#if (defined CERTIFICATION) && (defined BIDIRECTIONAL)
/*******************************************************************/
MCU_API_status_t MCU_API_print_dl_payload(sfx_u8 *dl_payload, sfx_u8 dl_payload_size, sfx_s16 rssi_dbm) {
/* To be implemented by the device manufacturer */
Expand Down
11 changes: 11 additions & 0 deletions src/manuf/rf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ RF_API_status_t RF_API_get_latency(RF_API_latency_t latency_type, sfx_u32 *laten
}
#endif

#ifdef CERTIFICATION
/*******************************************************************/
RF_API_status_t RF_API_start_continuous_wave(void) {
/* To be implemented by the device manufacturer */
#ifdef ERROR_CODES
RF_API_status_t status = RF_API_SUCCESS;
#endif
RETURN();
}
#endif

#ifdef VERBOSE
/*******************************************************************/
RF_API_status_t RF_API_get_version(sfx_u8 **version, sfx_u8 *version_size_char) {
Expand Down
Loading

0 comments on commit 8c0c655

Please sign in to comment.