Skip to content

Commit

Permalink
Fix 917 SoC build if button component disabled (#245)
Browse files Browse the repository at this point in the history
Added SL_CATALOG_SIMPLE_BUTTON_PRESENT macro where button code present
  • Loading branch information
bhmanda-silabs authored Dec 13, 2024
1 parent 6334d18 commit 42a263d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions matter/si91x/support/hal/rsi_hal_mcu_m4.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#include "rsi_pll.h"
#include "rsi_rom_clks.h"
#include "silabs_utils.h"
#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT
#include "sl_si91x_button_pin_config.h"
#endif //SL_CATALOG_SIMPLE_BUTTON_PRESENT
#include "sli_siwx917_soc.h"

#define SOC_PLL_REF_FREQUENCY 40000000 // /* PLL input REFERENCE clock 40MHZ */
Expand All @@ -43,7 +45,9 @@
#define MISC_CONFIG_MISC_CTRL1 *(volatile uint32_t *)(0x46008000 + 0x44)
#define MISC_QUASI_SYNC_MODE *(volatile uint32_t *)(0x46008000 + 0x84)

#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT
void sl_button_on_change(uint8_t btn, uint8_t btnAction);
#endif //SL_CATALOG_SIMPLE_BUTTON_PRESENT

int soc_pll_config(void) {
int32_t status = RSI_OK;
Expand Down Expand Up @@ -75,8 +79,10 @@ int soc_pll_config(void) {
return 0;
}

#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT
void sl_si91x_button_isr(uint8_t pin, int8_t state) {
(pin == SL_BUTTON_BTN0_PIN)
? sl_button_on_change(SL_BUTTON_BTN0_NUMBER, !state)
: sl_button_on_change(SL_BUTTON_BTN1_NUMBER, !state);
}
#endif //SL_CATALOG_SIMPLE_BUTTON_PRESENT

0 comments on commit 42a263d

Please sign in to comment.