Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lbm_lib/smtc_modem_core/lr1mac/src/lr1mac_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,6 @@ typedef enum cid_from_device_e
NB_MAC_CMD_ANS
} cid_from_device_t;

static const uint8_t lr1mac_cmd_mac_ans_size[NB_MAC_CMD_ANS] = {
[LINK_CHECK_ANS] = LINK_CHECK_ANS_SIZE, [LINK_ADR_ANS] = LINK_ADR_ANS_SIZE,
[DUTY_CYCLE_ANS] = DUTY_CYCLE_ANS_SIZE, [RXPARRAM_SETUP_ANS] = RXPARRAM_SETUP_ANS_SIZE,
[DEV_STATUS_ANS] = DEV_STATUS_ANS_SIZE, [NEW_CHANNEL_ANS] = NEW_CHANNEL_ANS_SIZE,
[RXTIMING_SETUP_ANS] = RXTIMING_SETUP_ANS_SIZE, [TXPARAM_SETUP_ANS] = TXPARAM_SETUP_ANS_SIZE,
[DL_CHANNEL_ANS] = DL_CHANNEL_ANS_SIZE,
};

typedef enum lr1mac_bandwidth_e
{
BW125 = RAL_LORA_BW_125_KHZ,
Expand Down
8 changes: 8 additions & 0 deletions lbm_lib/smtc_modem_core/lr1mac/src/lr1mac_utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
#include "smtc_modem_hal.h"
#include "smtc_modem_hal_dbg_trace.h"

static const uint8_t lr1mac_cmd_mac_ans_size[NB_MAC_CMD_ANS] = {
[LINK_CHECK_ANS] = LINK_CHECK_ANS_SIZE, [LINK_ADR_ANS] = LINK_ADR_ANS_SIZE,
[DUTY_CYCLE_ANS] = DUTY_CYCLE_ANS_SIZE, [RXPARRAM_SETUP_ANS] = RXPARRAM_SETUP_ANS_SIZE,
[DEV_STATUS_ANS] = DEV_STATUS_ANS_SIZE, [NEW_CHANNEL_ANS] = NEW_CHANNEL_ANS_SIZE,
[RXTIMING_SETUP_ANS] = RXTIMING_SETUP_ANS_SIZE, [TXPARAM_SETUP_ANS] = TXPARAM_SETUP_ANS_SIZE,
[DL_CHANNEL_ANS] = DL_CHANNEL_ANS_SIZE,
};

uint32_t lr1mac_utilities_crc( uint8_t* buf, int len )
{
uint32_t crc = 0xFFFFFFFA;
Expand Down
4 changes: 4 additions & 0 deletions lbm_lib/smtc_modem_core/smtc_modem.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#include "ralf_lr11xx.h"
#elif defined( SX127X )
#include "ralf_sx127x.h"
#elif defined( TRANSPARENT_RADIO )
#include "ralf_transparent.h"
#endif

#if defined( ADD_SMTC_STREAM )
Expand Down Expand Up @@ -196,6 +198,8 @@ ralf_t modem_radio = RALF_LR11XX_INSTANTIATE( NULL );
#include "sx127x.h"
static sx127x_t sx127x;
ralf_t modem_radio = RALF_SX127X_INSTANTIATE( &sx127x );
#elif defined( TRANSPARENT_RADIO )
ralf_t modem_radio = RALF_TRANSPARENT_INSTANTIATE( NULL );
#else
#error "Please select radio board.."
#endif
Expand Down
5 changes: 5 additions & 0 deletions lbm_lib/smtc_modem_core/smtc_modem_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include "lr11xx_hal.h"
#elif defined( SX127X )
#include "sx127x_hal.h"
#elif defined( TRANSPARENT_RADIO )
#else
#error "Please select radio board.."
#endif
Expand Down Expand Up @@ -748,6 +749,8 @@ smtc_modem_return_code_t smtc_modem_test_direct_radio_write( uint8_t* command, u
#elif defined( SX127X )
// if( sx127x_hal_write( ( sx127x_t* ) ( modem_test_context.rp->radio->ral.context ), command, data,
// data_length ) != SX127X_HAL_STATUS_OK )
#elif defined( TRANSPARENT_RADIO )
return SMTC_MODEM_RC_OK;
#else
return SMTC_MODEM_RC_FAIL;
#endif
Expand Down Expand Up @@ -777,6 +780,8 @@ smtc_modem_return_code_t smtc_modem_test_direct_radio_read( uint8_t* command, ui
#elif defined( SX127X )
// if( sx127x_hal_read( ( sx127x_t* ) ( modem_test_context.rp->radio->ral.context ), command, data,
// data_length ) != SX127X_HAL_STATUS_OK )
#elif defined( TRANSPARENT_RADIO )
return SMTC_MODEM_RC_OK;
#else
return SMTC_MODEM_RC_FAIL;
#endif
Expand Down
Loading