Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SiWx917] Update autogen files for brd2605a #236

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#define SL_CATALOG_SIMPLE_BUTTON_BTN0_PRESENT
#define SL_CATALOG_BTN1_PRESENT
#define SL_CATALOG_SIMPLE_BUTTON_BTN1_PRESENT
#define SL_CATALOG_LEDB_PRESENT
#define SL_CATALOG_SIMPLE_LED_PRESENT
#define SL_CATALOG_SIMPLE_LED_LEDB_PRESENT
#define SL_CATALOG_LED0_PRESENT
#define SL_CATALOG_LED_PRESENT
#define SL_CATALOG_LED_LED0_PRESENT
#define SL_CATALOG_ULP_TIMER_PRESENT
#define SL_CATALOG_ULP_TIMER_TIMER0_PRESENT
#define SL_CATALOG_CMSIS_OS_COMMON_PRESENT
Expand All @@ -22,12 +22,10 @@
#define SL_CATALOG_MEMORY_MANAGER_PRESENT
#define SL_CATALOG_NVM3_PRESENT
#define SL_CATALOG_SEGGER_RTT_PRESENT
#if defined(DISPLAY_ENABLED) || defined(SL_ICD_ENABLED)
#define SL_CATALOG_SLEEPTIMER_PRESENT
#ifdef DISPLAY_ENABLED
#define SL_CATALOG_DMD_MEMLCD_PRESENT
#define SL_CATALOG_GLIB_PRESENT
#endif // DISPLAY_ENABLED
#endif // DISPLAY_ENABLED || SL_ICD_ENABLED

#endif // SL_COMPONENT_CATALOG_H
7 changes: 3 additions & 4 deletions matter/si91x/siwx917/BRD2605A/autogen/sl_event_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "SEGGER_RTT.h"
#include "sl_sleeptimer.h"
#include "sl_si91x_button_instances.h"
#include "sl_si91x_led_instances.h"
#include "sl_si91x_rgb_led_instances.h"
#include "sl_ulp_timer_instances.h"
#include "sl_iostream_rtt.h"
#include "cmsis_os2.h"
Expand All @@ -26,6 +26,7 @@ void sl_platform_init(void)
sli_si91x_platform_init();
RSI_Board_Init();
DEBUGINIT();
SEGGER_RTT_Init();
#if SL_ICD_ENABLED
sl_si91x_hardware_setup();
#endif // SL_ICD_ENABLED
Expand All @@ -40,7 +41,7 @@ void sl_kernel_start(void)
void sl_driver_init(void)
{
button_init_instances();
led_init_instances();
rgb_led_init_instances();
}

void sl_service_init(void)
Expand All @@ -49,9 +50,7 @@ void sl_service_init(void)
sl_si91x_power_manager_init();
sli_si91x_power_manager_configure_ram_and_peripheral();
#endif // SL_ICD_ENABLED
#if defined(DISPLAY_ENABLED) || defined(SL_ICD_ENABLED)
sl_sleeptimer_init();
#endif // DISPLAY_ENABLED || SL_ICD_ENABLED
sl_iostream_init_instances();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

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

sl_button_t const button_btn0 = {
.port = SL_BUTTON_BTN0_PORT,
.pin = SL_BUTTON_BTN0_PIN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#define SL_SI91X_BUTTON_INSTANCES_H

#include "sl_si91x_button.h"
#include "sl_si91x_button_init_btn0_config.h"
#include "sl_si91x_button_init_btn1_config.h"


extern const sl_button_t button_btn0;
extern const sl_button_t button_btn1;
Expand Down
43 changes: 0 additions & 43 deletions matter/si91x/siwx917/BRD2605A/autogen/sl_si91x_led_instances.c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/***************************************************************************/
/**
* @file sl_si91x_rgb_led_instances.c.jinja
* @brief RGB LED 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_rgb_led.h"
#include "sl_si91x_rgb_led_config.h"

#ifdef SI917_RGB_DRIVER_OLD
sl_led_t led_red = {
.port = SL_LED_RED_PORT,
.pin = SL_LED_RED_PIN,
.led_number = SL_LED_RED_NUMBER,
.pad = SL_LED_RED_PAD,
};

sl_led_t led_green = {
.port = SL_LED_GREEN_PORT,
.pin = SL_LED_GREEN_PIN,
.led_number = SL_LED_GREEN_NUMBER,
.pad = SL_LED_GREEN_PAD,
};

sl_led_t led_blue = {
.port = SL_LED_BLUE_PORT,
.pin = SL_LED_BLUE_PIN,
.led_number = SL_LED_BLUE_NUMBER,
.pad = SL_LED_BLUE_PAD,
};
#else
sl_led_t led_led0_red = {
.port = SL_LED_LED0_RED_PORT,
.pin = SL_LED_LED0_RED_PIN,
.led_number = SL_LED_LED0_RED_NUMBER,
.pad = SL_LED_LED0_RED_PAD,
};

sl_led_t led_led0_green = {
.port = SL_LED_LED0_GREEN_PORT,
.pin = SL_LED_LED0_GREEN_PIN,
.led_number = SL_LED_LED0_GREEN_NUMBER,
.pad = SL_LED_LED0_GREEN_PAD,
};

sl_led_t led_led0_blue = {
.port = SL_LED_LED0_BLUE_PORT,
.pin = SL_LED_LED0_BLUE_PIN,
.led_number = SL_LED_LED0_BLUE_NUMBER,
.pad = SL_LED_LED0_BLUE_PAD,
};

const sl_rgb_led_t led_led0 = {
.red = &led_led0_red,
.green = &led_led0_green,
.blue = &led_led0_blue,
};
#endif

void rgb_led_init_instances(void)
{
#ifdef SI917_RGB_DRIVER_OLD
sl_si91x_rgb_led_init(&led_red);
sl_si91x_rgb_led_init(&led_green);
sl_si91x_rgb_led_init(&led_blue);
#else
sl_si91x_simple_rgb_led_init(&led_led0);
#endif
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************/ /**
* @file sl_si91x_led_instances.h.jinja
* @brief Button Driver Instances
* @file sl_si91x_rgb_led_instances.h.jinja
* @brief RGB LED Instances
*******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
Expand Down Expand Up @@ -28,14 +28,19 @@
*
******************************************************************************/

#ifndef SL_SI91x_LED_INSTANCES_H
#define SL_SI91x_LED_INSTANCES_H
#ifndef SL_SI91x_RGB_LED_INSTANCES_H
#define SL_SI91x_RGB_LED_INSTANCES_H

#include "sl_si91x_led.h"
#include "sl_si91x_rgb_led.h"

extern const sl_led_t led_ledb;
#ifdef SI917_RGB_DRIVER_OLD
extern const sl_led_t led_red;
extern const sl_led_t led_green;
extern const sl_led_t led_blue;
#else
extern const sl_rgb_led_t led_led0;
#endif

void rgb_led_init_instances(void);

void led_init_instances(void);

#endif // SL_SI91x_LED_INSTANCES_H
#endif // SL_SI91x_RGB_LED_INSTANCES_H
Loading
Loading