Skip to content

Commit

Permalink
Merge pull request #162 from SiliconLabs/restyled/917soc_changes_for_…
Browse files Browse the repository at this point in the history
…wifi_sdk_v3.1.1

Restyle [WiFi] -Updating autogen and config files for 917soc with wifi-sdk v.3.1.1
  • Loading branch information
silabs-srishylam authored Dec 18, 2023
2 parents 5068b45 + 6913773 commit 5b78fa5
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 79 deletions.
20 changes: 9 additions & 11 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "sl_event_handler.h"

#include "rsi_chip.h"
#include "rsi_nvic_priorities_config.h"
#include "sli_siwx917_soc.h"
#include "cmsis_os2.h"
#include "rsi_board.h"
#include "rsi_chip.h"
#include "rsi_debug.h"
#include "sl_sleeptimer.h"
#include "rsi_nvic_priorities_config.h"
#include "sl_iostream_init_instances.h"
#include "sl_iostream_rtt.h"
#include "sl_si91x_button_instances.h"
#include "sl_si91x_led_instances.h"
#include "sl_iostream_rtt.h"
#include "cmsis_os2.h"
#include "sl_iostream_init_instances.h"
#include "sl_sleeptimer.h"
#include "sli_siwx917_soc.h"

void sl_platform_init(void) {
SystemCoreClockUpdate();
Expand All @@ -23,14 +23,12 @@ void sl_platform_init(void) {

void sl_kernel_start(void) { osKernelStart(); }

void sl_driver_init(void)
{
void sl_driver_init(void) {
button_init_instances();
led_init_instances();
}

void sl_service_init(void)
{
void sl_service_init(void) {
#ifdef DISPLAY_ENABLED
sl_sleeptimer_init();
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "sl_iostream.h"
#include "sl_iostream_handles.h"
#include "sl_iostream.h"
#include "string.h"

const sl_iostream_instance_info_t *sl_iostream_instances_info[] = {
Expand Down
34 changes: 15 additions & 19 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,24 @@
*
******************************************************************************/

#include "sl_si91x_button_pin_config.h"
#include "sl_si91x_button_btn0_config.h"
#include "sl_si91x_button_btn1_config.h"
#include "sl_si91x_button_pin_config.h"

sl_button_t button_btn0 = {
.port = SL_BUTTON_BTN0_PORT,
.pin = SL_BUTTON_BTN0_PIN,
.button_number = SL_BUTTON_BTN0_NUMBER,
#ifdef SL_BUTTON_BTN0_PAD
.pad = SL_BUTTON_BTN0_PAD,
#endif
.interrupt_config = SL_BUTTON_CONFIG_BTN0_INTR
};
sl_button_t button_btn1 = {
.port = SL_BUTTON_BTN1_PORT,
.pin = SL_BUTTON_BTN1_PIN,
.button_number = SL_BUTTON_BTN1_NUMBER,
#ifdef SL_BUTTON_BTN1_PAD
.pad = SL_BUTTON_BTN1_PAD,
#endif
.interrupt_config = SL_BUTTON_CONFIG_BTN1_INTR
};
sl_button_t button_btn0 = {.port = SL_BUTTON_BTN0_PORT,
.pin = SL_BUTTON_BTN0_PIN,
.button_number = SL_BUTTON_BTN0_NUMBER,
#ifdef SL_BUTTON_BTN0_PAD
.pad = SL_BUTTON_BTN0_PAD,
#endif
.interrupt_config = SL_BUTTON_CONFIG_BTN0_INTR};
sl_button_t button_btn1 = {.port = SL_BUTTON_BTN1_PORT,
.pin = SL_BUTTON_BTN1_PIN,
.button_number = SL_BUTTON_BTN1_NUMBER,
#ifdef SL_BUTTON_BTN1_PAD
.pad = SL_BUTTON_BTN1_PAD,
#endif
.interrupt_config = SL_BUTTON_CONFIG_BTN1_INTR};

void button_init_instances(void) {
sl_si91x_button_init(&button_btn0);
Expand Down
17 changes: 8 additions & 9 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@
#include "sl_si91x_led.h"
#include "sl_si91x_led_config.h"
sl_led_t led_led0 = {
.port = SL_LED_LED0_PORT,
.pin = SL_LED_LED0_PIN,
.led_number = SL_LED_LED0_NUMBER,
.port = SL_LED_LED0_PORT,
.pin = SL_LED_LED0_PIN,
.led_number = SL_LED_LED0_NUMBER,
};
sl_led_t led_led1 = {
.port = SL_LED_LED1_PORT,
.pin = SL_LED_LED1_PIN,
.led_number = SL_LED_LED1_NUMBER,
.port = SL_LED_LED1_PORT,
.pin = SL_LED_LED1_PIN,
.led_number = SL_LED_LED1_NUMBER,
};

void led_init_instances(void)
{
void led_init_instances(void) {
sl_si91x_led_init(&led_led0);
sl_si91x_led_init(&led_led1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
extern const sl_led_t led_led0;
extern const sl_led_t led_led1;


void led_init_instances(void);

#endif // SL_SI91x_LED_INSTANCES_H
#endif // SL_SI91x_LED_INSTANCES_H
22 changes: 11 additions & 11 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@
#define SL_SI91X_ULP_TIMER_INIT_H_

#include "sl_si91x_ulp_timer.h"
// Include instance config
// Include instance config

#include "sl_si91x_ulp_timer_timer0_config.h"

#if defined(SL_ULP_TIMER_TIMER0) // To verify UC inputs existance
ulp_timer_config_t sl_timer_handle_timer0 = {
.timer_num = SL_ULP_TIMER_TIMER0,
.timer_mode = SL_ULP_TIMER_MODE,
.timer_type = SL_ULP_TIMER_TYP,
.timer_match_value = SL_TIMER_MATCH_VALUE_DEFAULT,
.timer_direction = SL_ULP_TIMER_DIRECTION,
.timer_num = SL_ULP_TIMER_TIMER0,
.timer_mode = SL_ULP_TIMER_MODE,
.timer_type = SL_ULP_TIMER_TYP,
.timer_match_value = SL_TIMER_MATCH_VALUE_DEFAULT,
.timer_direction = SL_ULP_TIMER_DIRECTION,
};
#endif // SL_ULP_TIMER_INSTANCE

#if defined(SL_ULP_TIMER_CLK_TYPE) // To verify UC inputs existence
ulp_timer_clk_src_config_t sl_timer_clk_handle = {
.ulp_timer_clk_type = SL_ULP_TIMER_CLK_TYPE,
.ulp_timer_sync_to_ulpss_pclk = SL_ULP_TIMER_SYNC_TO_ULPSS_PCLK,
.ulp_timer_clk_input_src = SL_ULP_TIMER_CLK_INPUT_SOURCE,
.ulp_timer_skip_switch_time = SL_ULP_TIMER_SKIP_SWITCH_TIME,
.ulp_timer_clk_type = SL_ULP_TIMER_CLK_TYPE,
.ulp_timer_sync_to_ulpss_pclk = SL_ULP_TIMER_SYNC_TO_ULPSS_PCLK,
.ulp_timer_clk_input_src = SL_ULP_TIMER_CLK_INPUT_SOURCE,
.ulp_timer_skip_switch_time = SL_ULP_TIMER_SKIP_SWITCH_TIME,
};
#endif // SL_ULP_TIMER_CLK_TYPE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#define SL_SI91x_BUTTON_COUNT (2)

#define SL_BUTTON_BTN0_PIN RTE_BUTTON0_PIN
#define SL_BUTTON_BTN0_PORT RTE_BUTTON0_PORT
#define SL_BUTTON_BTN0_PIN RTE_BUTTON0_PIN
#define SL_BUTTON_BTN0_PORT RTE_BUTTON0_PORT
#define SL_BUTTON_BTN0_NUMBER RTE_BUTTON0_NUMBER

#define SL_BUTTON_BTN1_PIN RTE_BUTTON1_PIN
#define SL_BUTTON_BTN1_PORT RTE_BUTTON1_PORT
#define SL_BUTTON_BTN1_PIN RTE_BUTTON1_PIN
#define SL_BUTTON_BTN1_PORT RTE_BUTTON1_PORT
#define SL_BUTTON_BTN1_NUMBER RTE_BUTTON1_NUMBER
#define SL_BUTTON_BTN1_PAD RTE_BUTTON1_PAD
#define SL_BUTTON_BTN1_PAD RTE_BUTTON1_PAD

#endif // SL_SI91X_BUTTON_PIN_CONFIG_H
10 changes: 5 additions & 5 deletions matter/si91x/siwx917/BRD4338A/config/sl_si91x_led_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#define SL_SI91x_LED_COUNT 2

#define SL_LED_LED0_PIN RTE_LED0_PIN
#define SL_LED_LED0_PORT RTE_LED0_PORT
#define SL_LED_LED0_PIN RTE_LED0_PIN
#define SL_LED_LED0_PORT RTE_LED0_PORT
#define SL_LED_LED0_NUMBER RTE_LED0_NUMBER

#define SL_LED_LED1_PIN RTE_LED1_PIN
#define SL_LED_LED1_PORT RTE_LED1_PORT
#define SL_LED_LED1_PIN RTE_LED1_PIN
#define SL_LED_LED1_PORT RTE_LED1_PORT
#define SL_LED_LED1_NUMBER RTE_LED1_NUMBER
#define SL_LED_LED1_PAD RTE_LED1_PAD
#define SL_LED_LED1_PAD RTE_LED1_PAD

#endif // SL_SI91X_LED_CONFIG_H
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// <<< Use Configuration Wizard in Context Menu >>>

// <h>Clock Configuration
#define SL_ULP_TIMER_CLK_TYPE_STATIC 1
#define SL_ULP_TIMER_CLK_TYPE_STATIC 1
#define SL_ULP_TIMER_CLK_TYPE_DYNAMIC 0

// <o SL_ULP_TIMER_CLK_TYPE> Clock Type
Expand All @@ -50,17 +50,17 @@
#define SL_ULP_TIMER_SYNC_TO_ULPSS_PCLK 0

// <q SL_ULP_TIMER_SKIP_SWITCH_TIME> Wait for switching timer clock
// <i> 1 : Enable waiting for switching timer clk & 0 : Skip waiting for switching timer clk.
// <i> Default: 0
// <i> 1 : Enable waiting for switching timer clk & 0 : Skip waiting for
// switching timer clk. <i> Default: 0
#define SL_ULP_TIMER_SKIP_SWITCH_TIME 0

#define SL_ULP_TIMER_REF_CLK 0
#define SL_ULP_TIMER_32KHZ_RO_CLK 1
#define SL_ULP_TIMER_32KHZ_RC_CLK 2
#define SL_ULP_TIMER_REF_CLK 0
#define SL_ULP_TIMER_32KHZ_RO_CLK 1
#define SL_ULP_TIMER_32KHZ_RC_CLK 2
#define SL_ULP_TIMER_32KHZ_XTAL_CLK 3
#define SL_ULP_TIMER_32MHZ_RC_CLK 4
#define SL_ULP_TIMER_20MHZ_RO_CLK 5
#define SL_ULP_TIMER_ULP_SOC_CLK 6
#define SL_ULP_TIMER_32MHZ_RC_CLK 4
#define SL_ULP_TIMER_20MHZ_RO_CLK 5
#define SL_ULP_TIMER_ULP_SOC_CLK 6

// <o SL_ULP_TIMER_CLK_INPUT_SOURCE> clock source
// <SL_ULP_TIMER_REF_CLK=> Ref clock
Expand All @@ -71,7 +71,8 @@
// <SL_ULP_TIMER_20MHZ_RO_CLK=> 20MHZ_RO
// <SL_ULP_TIMER_ULP_SOC_CLK=> SOC_CLK
// <i> Selection of the Clock source
#define SL_ULP_TIMER_CLK_INPUT_SOURCE SL_ULP_TIMER_32MHZ_RC_CLK //default timer clock input source is ref clock
#define SL_ULP_TIMER_CLK_INPUT_SOURCE \
SL_ULP_TIMER_32MHZ_RC_CLK // default timer clock input source is ref clock

// </h>

Expand All @@ -91,27 +92,27 @@
#define SL_ULP_TIMER_DEFAULT SL_ULP_TIMER_TIMER0

#define SL_ULP_TIMER_TYP_DOWN_COUNTER 0
#define SL_ULP_TIMER_TYP_1US 1
#define SL_ULP_TIMER_TYP_256US 2
#define SL_ULP_TIMER_TYP_1US 1
#define SL_ULP_TIMER_TYP_256US 2

// <o SL_ULP_TIMER_TYP> Timer type
// <SL_ULP_TIMER_TYP_DOWN_COUNTER=> Down Counter (auto select)
// <SL_ULP_TIMER_TYP_1US=> 1 Micro-Sec
// <SL_ULP_TIMER_TYP_256US=> 256-Micro-Sec
// <i> Selection of the Timer type
#define SL_ULP_TIMER_TYP SL_ULP_TIMER_TYP_DOWN_COUNTER //default type is 1MS
#define SL_ULP_TIMER_TYP SL_ULP_TIMER_TYP_DOWN_COUNTER // default type is 1MS

#define SL_ULP_TIMER_MODE_ONESHOT 0
#define SL_ULP_TIMER_MODE_ONESHOT 0
#define SL_ULP_TIMER_MODE_PERIODIC 1

// <o SL_ULP_TIMER_MODE> Timer mode
// <SL_ULP_TIMER_MODE_ONESHOT=> One-shot
// <SL_ULP_TIMER_MODE_PERIODIC=> Periodic (auto select)
// <i> Selection of the Timer mode
#define SL_ULP_TIMER_MODE SL_ULP_TIMER_MODE_PERIODIC //default mode is periodic
#define SL_ULP_TIMER_MODE SL_ULP_TIMER_MODE_PERIODIC // default mode is periodic

#define SL_ULP_DOWN_COUNTER 0
#define SL_ULP_UP_COUNTER 1
#define SL_ULP_UP_COUNTER 1
// <o SL_ULP_TIMER_DIRECTION> Timer direction
// <SL_ULP_DOWN_COUNTER=> Down (auto select)
// <SL_ULP_UP_COUNTER=> Up
Expand Down

0 comments on commit 5b78fa5

Please sign in to comment.