From cdd534dd54af458a83bc50902b8ac6410a5c7ade Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 18 Dec 2023 02:48:05 +0000 Subject: [PATCH] Restyled by clang-format --- .../BRD4338A/autogen/sl_event_handler.c | 20 ++--- .../BRD4338A/autogen/sl_iostream_handles.c | 2 +- .../autogen/sl_si91x_button_instances.c | 34 ++++--- .../BRD4338A/autogen/sl_si91x_led_instances.c | 71 ++++++++------- .../BRD4338A/autogen/sl_si91x_led_instances.h | 57 ++++++------ .../autogen/sl_si91x_ulp_timer_init.h | 50 +++++------ .../config/sl_si91x_button_btn0_config.h | 12 +-- .../config/sl_si91x_button_btn1_config.h | 12 +-- .../config/sl_si91x_button_pin_config.h | 22 ++--- .../BRD4338A/config/sl_si91x_led_config.h | 22 ++--- .../config/sl_si91x_ulp_timer_timer0_config.h | 89 ++++++++++--------- 11 files changed, 192 insertions(+), 199 deletions(-) diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c b/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c index 57b9e9a207..4cd0db5c6d 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c @@ -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(); @@ -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 diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_iostream_handles.c b/matter/si91x/siwx917/BRD4338A/autogen/sl_iostream_handles.c index 87e19d5a55..ce72b733aa 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_iostream_handles.c +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_iostream_handles.c @@ -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[] = { diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c index 04b119f0c3..c8679c4b28 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c @@ -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); diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c index bc39e8f445..566ff6ac1d 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c @@ -1,48 +1,47 @@ /***************************************************************************/ /** - * @file sl_si91x_led_instances.c.jinja - * @brief Button Driver Instances - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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); } diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.h b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.h index 0bbfc7ba4e..02bb4eb5bf 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.h +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.h @@ -1,32 +1,32 @@ /***************************************************************************/ /** - * @file sl_si91x_led_instances.h.jinja - * @brief Button Driver Instances - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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 @@ -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 diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h index fb740b48ce..7cbcd53d27 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_ulp_timer_init.h @@ -1,19 +1,19 @@ -/***************************************************************************//** - * @file sl_si91x_ulp_timer_init.h - * @brief ULP Timer Instances - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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 + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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_ @@ -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 diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn0_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn0_config.h index dac1086d80..ee1b715065 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn0_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn0_config.h @@ -1,10 +1,10 @@ /***************************************************************************/ /** - * @file sl_si91x_button_config.h - * @brief Button Driver Configuration - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - *******************************************************************************/ + * @file sl_si91x_button_config.h + * @brief Button Driver Configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + *******************************************************************************/ #ifndef SL_SI91X_BUTTON_BTN0_CONFIG_H #define SL_SI91X_BUTTON_BTN0_CONFIG_H diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn1_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn1_config.h index 5f1a9a9a3e..ec0ccf88ae 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn1_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_btn1_config.h @@ -1,10 +1,10 @@ /***************************************************************************/ /** - * @file sl_si91x_button_config.h - * @brief Button Driver Configuration - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - *******************************************************************************/ + * @file sl_si91x_button_config.h + * @brief Button Driver Configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + *******************************************************************************/ #ifndef SL_SI91X_BUTTON_BTN1_CONFIG_H #define SL_SI91X_BUTTON_BTN1_CONFIG_H diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_pin_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_pin_config.h index b0121118bb..83083d4fee 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_pin_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_button_pin_config.h @@ -1,10 +1,10 @@ /***************************************************************************/ /** - * @file sl_si91x_button_config.h - * @brief Button Driver Configuration - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - *******************************************************************************/ + * @file sl_si91x_button_config.h + * @brief Button Driver Configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + *******************************************************************************/ #ifndef SL_SI91X_BUTTON_PIN_CONFIG_H #define SL_SI91X_BUTTON_PIN_CONFIG_H @@ -13,13 +13,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 diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_led_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_led_config.h index e7eaab11a7..f2fc8a9dc1 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_led_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_led_config.h @@ -1,10 +1,10 @@ /***************************************************************************/ /** - * @file RTE_led_config.h - * @brief Led Driver Configuration - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - *******************************************************************************/ + * @file RTE_led_config.h + * @brief Led Driver Configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + *******************************************************************************/ #ifndef SL_SI91X_LED_CONFIG_H #define SL_SI91X_LED_CONFIG_H @@ -13,13 +13,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 diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_ulp_timer_timer0_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_ulp_timer_timer0_config.h index f05a894076..757d94cd37 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_ulp_timer_timer0_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_ulp_timer_timer0_config.h @@ -1,32 +1,32 @@ /***************************************************************************/ /** - * @file sl_si91x_ulp_timer_inst_config.h - * @brief ULP Timer configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * 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_ulp_timer_inst_config.h + * @brief ULP Timer configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * 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_ULP_TIMER_TIMER0_CONFIG_H #define SL_SI91X_ULP_TIMER_TIMER0_CONFIG_H @@ -34,7 +34,7 @@ // <<< Use Configuration Wizard in Context Menu >>> // 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 // Clock Type @@ -49,17 +49,17 @@ #define SL_ULP_TIMER_SYNC_TO_ULPSS_PCLK 0 // Wait for switching timer clock -// 1 : Enable waiting for switching timer clk & 0 : Skip waiting for switching timer clk. -// Default: 0 +// 1 : Enable waiting for switching timer clk & 0 : Skip waiting for +// switching timer clk. 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 // clock source // Ref clock @@ -70,7 +70,8 @@ // 20MHZ_RO // SOC_CLK // 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 // @@ -90,27 +91,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 // Timer type // Down Counter (auto select) // 1 Micro-Sec // 256-Micro-Sec // 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 // Timer mode // One-shot // Periodic (auto select) // 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 // Timer direction // Down (auto select) // Up