4343#include "sigfox_error.h"
4444#include "sigfox_types.h"
4545
46- LR11XX_HW_API_status_t LR11XX_HW_API_open (LR11XX_HW_irq_cb_t callback ) {
46+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_open (LR11XX_HW_irq_cb_t callback ) {
4747 /* To be implemented by the device manufacturer */
4848#ifdef ERROR_CODES
4949 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
5050#endif
51+ SFX_UNUSED (callback );
5152 // Configure all hardware pin of LR11XX chipset.
5253 // Configure SPI peripherial.
5354 // Configure interrupt pin to handle radio interrupt.
5455 // The callback function must be called when such event occurs.
5556 RETURN ();
5657}
5758
58- LR11XX_HW_API_status_t LR11XX_HW_API_close (void ) {
59+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_close (void ) {
5960 /* To be implemented by the device manufacturer */
6061#ifdef ERROR_CODES
6162 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
@@ -64,63 +65,70 @@ LR11XX_HW_API_status_t LR11XX_HW_API_close(void) {
6465 RETURN ();
6566}
6667
67- LR11XX_HW_API_status_t LR11XX_HW_API_delayMs (unsigned short delay_ms ) {
68+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_delayMs (unsigned short delay_ms ) {
6869 /* To be implemented by the device manufacturer */
6970#ifdef ERROR_CODES
7071 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
7172#endif
73+ SFX_UNUSED (delay_ms );
7274 RETURN ();
7375}
7476
75- LR11XX_HW_API_status_t LR11XX_HW_API_get_fem_mask (LR11XX_HW_API_FEM_t fem , sfx_u8 * rfsw_dio_mask ) {
77+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_get_fem_mask (LR11XX_HW_API_FEM_t fem , sfx_u8 * rfsw_dio_mask ) {
7678 /* To be implemented by the device manufacturer */
7779#ifdef ERROR_CODES
7880 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
7981#endif
82+ SFX_UNUSED (fem );
83+ SFX_UNUSED (rfsw_dio_mask );
8084 RETURN ();
8185}
8286
83- LR11XX_HW_API_status_t LR11XX_HW_API_get_xosc_cfg (LR11XX_HW_API_xosc_cfg_t * xosc_cfg ) {
87+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_get_xosc_cfg (LR11XX_HW_API_xosc_cfg_t * xosc_cfg ) {
8488 /* To be implemented by the device manufacturer */
8589#ifdef ERROR_CODES
8690 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
8791#endif
92+ SFX_UNUSED (xosc_cfg );
8893 RETURN ();
8994}
9095
91- LR11XX_HW_API_status_t LR11XX_HW_API_get_pa_pwr_cfg (LR11XX_HW_API_pa_pwr_cfg_t * pa_pwr_cfg , sfx_u32 rf_freq_in_hz , sfx_s8 expected_output_pwr_in_dbm ){
96+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_get_pa_pwr_cfg (LR11XX_HW_API_pa_pwr_cfg_t * pa_pwr_cfg , sfx_u32 rf_freq_in_hz , sfx_s8 expected_output_pwr_in_dbm ){
9297 /* To be implemented by the device manufacturer */
9398#ifdef ERROR_CODES
9499 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
95100#endif
101+ SFX_UNUSED (pa_pwr_cfg );
102+ SFX_UNUSED (rf_freq_in_hz );
103+ SFX_UNUSED (expected_output_pwr_in_dbm );
96104 RETURN ();
97105}
98106
99- LR11XX_HW_API_status_t LR11XX_HW_API_tx_on (void ) {
107+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_tx_on (void ) {
100108 /* To be implemented by the device manufacturer */
101109#ifdef ERROR_CODES
102110 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
103111#endif
104112 RETURN ();
105113}
106114
107- LR11XX_HW_API_status_t LR11XX_HW_API_tx_off (void ) {
115+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_tx_off (void ) {
108116 /* To be implemented by the device manufacturer */
109117#ifdef ERROR_CODES
110118 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
111119#endif
112120 RETURN ();
113121}
114122
115- LR11XX_HW_API_status_t LR11XX_HW_API_rx_on (void ) {
123+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_rx_on (void ) {
116124 /* To be implemented by the device manufacturer */
117125#ifdef ERROR_CODES
118126 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
119127#endif
120128 RETURN ();
121129}
122130
123- LR11XX_HW_API_status_t LR11XX_HW_API_rx_off (void ) {
131+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_rx_off (void ) {
124132 /* To be implemented by the device manufacturer */
125133#ifdef ERROR_CODES
126134 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
@@ -130,11 +138,13 @@ LR11XX_HW_API_status_t LR11XX_HW_API_rx_off(void) {
130138
131139#if (defined TIMER_REQUIRED ) && (defined LATENCY_COMPENSATION )
132140/*******************************************************************/
133- LR11XX_HW_API_status_t LR11XX_HW_API_get_latency (LR11XX_HW_API_latency_t latency_type , sfx_u32 * latency_ms ) {
141+ LR11XX_HW_API_status_t __attribute__(( weak )) LR11XX_HW_API_get_latency (LR11XX_HW_API_latency_t latency_type , sfx_u32 * latency_ms ) {
134142 /* To be implemented by the device manufacturer */
135143#ifdef ERROR_CODES
136144 LR11XX_HW_API_status_t status = LR11XX_HW_API_SUCCESS ;
137145#endif
146+ SFX_UNUSED (latency_type );
147+ SFX_UNUSED (latency_ms );
138148 RETURN ();
139149}
140150#endif
0 commit comments