Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Dec 18, 2023
1 parent 162bcc6 commit cdd534d
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 199 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
71 changes: 35 additions & 36 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
/***************************************************************************/ /**
* @file sl_si91x_led_instances.c.jinja
* @brief Button Driver Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
* @file sl_si91x_led_instances.c.jinja
* @brief Button Driver Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

#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);
}
57 changes: 28 additions & 29 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.h
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
/***************************************************************************/ /**
* @file sl_si91x_led_instances.h.jinja
* @brief Button Driver Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/
* @file sl_si91x_led_instances.h.jinja
* @brief Button Driver Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Zlib
*
* The licensor of this software is Silicon Laboratories Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
******************************************************************************/

#ifndef SL_SI91x_LED_INSTANCES_H
#define SL_SI91x_LED_INSTANCES_H
Expand All @@ -36,7 +36,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
50 changes: 25 additions & 25 deletions matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/***************************************************************************//**
* @file sl_si91x_ulp_timer_init.h
* @brief ULP Timer Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
/***************************************************************************/ /**
* @file sl_si91x_ulp_timer_init.h
* @brief ULP Timer Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/

#ifndef SL_SI91X_ULP_TIMER_INIT_H_
#define SL_SI91X_ULP_TIMER_INIT_H_
Expand All @@ -25,20 +25,20 @@

#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
@@ -1,10 +1,10 @@
/***************************************************************************/ /**
* @file sl_si91x_button_config.h
* @brief Button Driver Configuration
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************/
* @file sl_si91x_button_config.h
* @brief Button Driver Configuration
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************/

#ifndef SL_SI91X_BUTTON_BTN0_CONFIG_H
#define SL_SI91X_BUTTON_BTN0_CONFIG_H
Expand Down
Loading

0 comments on commit cdd534d

Please sign in to comment.