-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the autogen and config updated file for the 917 soc (#207)
* autogen and config update for power manager addition * adding only sleeptimer defines for icd
- Loading branch information
1 parent
42b2803
commit 256bb77
Showing
9 changed files
with
705 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_handler.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/***************************************************************************//** | ||
* @file sl_si91x_power_manager_handler.c.jinja | ||
* @brief Power Manager Service Handler | ||
******************************************************************************* | ||
* # 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_power_manager.h" | ||
|
||
/***************************************************************************//** | ||
* Check if the MCU can sleep at that time. This function is called when the system | ||
* is about to go sleeping, with the interrupts disabled. It allows the software to | ||
* cancel going to sleep in case of a last-minute event occurred (window between the | ||
* function call and interrupt disable). | ||
* | ||
* @return True, if the system can go to sleep. | ||
* False, otherwise. | ||
* | ||
* @note This function is called with the interrupt disabled and it MUST NOT be | ||
* re-enabled. | ||
******************************************************************************/ | ||
__WEAK boolean_t app_is_ok_to_sleep(void) | ||
{ | ||
return true; | ||
} | ||
|
||
/***************************************************************************//** | ||
* Check if the MCU can sleep after an interrupt. This function is called after an | ||
* interrupt occured and was processed. It allows the power manger to know if it must | ||
* go back to sleep or wakeup. | ||
* | ||
* @return SL_SI91X_POWER_MANAGER_IGNORE, if the module did not trigger an ISR and it | ||
* won't to contribute to the decision. | ||
* | ||
* SL_SI91X_POWER_MANAGER_SLEEP, The module was the one that caused the system | ||
* wakeup and the system SHOULD go back to sleep. | ||
* | ||
* SL_SI91X_POWER_MANAGER_WAKEUP, The module was the one that caused the system | ||
* wakeup and the system MUST NOT go back to sleep. | ||
* | ||
* @note This function must not have any side effects. It is not guaranteed to be | ||
* called for every ISR. If a prior hook function requires to wakeup, such | ||
* as a wireless stack, the application hook function won't be called. | ||
******************************************************************************/ | ||
__WEAK sl_si91x_power_manager_on_isr_exit_t app_sleep_on_isr_exit(void) | ||
{ | ||
return SL_SI91X_POWER_MANAGER_ISR_IGNORE; | ||
} | ||
/***************************************************************************//** | ||
* Mandatory callback that must validate if the MCU can sleep after having | ||
* processed an interrupt when the system was sleeping. | ||
******************************************************************************/ | ||
boolean_t sl_si91x_power_manager_sleep_on_isr_exit(void) | ||
{ | ||
sl_si91x_power_manager_on_isr_exit_t answer; | ||
boolean_t sleep = false; | ||
boolean_t force_wakeup = false; | ||
|
||
|
||
// Application hook | ||
answer = app_sleep_on_isr_exit(); | ||
if (answer == SL_SI91X_POWER_MANAGER_ISR_WAKEUP) { | ||
force_wakeup = true; | ||
} else if (answer == SL_SI91X_POWER_MANAGER_ISR_SLEEP) { | ||
sleep = true; | ||
} | ||
|
||
if (force_wakeup) { | ||
sleep = false; | ||
} | ||
|
||
return sleep; | ||
} |
51 changes: 51 additions & 0 deletions
51
matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_init.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/***************************************************************************//** | ||
* @file sl_si91x_power_manager_init.h.jinja | ||
* @brief Power Manager Service Initialization | ||
******************************************************************************* | ||
* # 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_POWER_MANAGER_INIT_H | ||
#define SL_SI91X_POWER_MANAGER_INIT_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include "sl_si91x_power_manager_config_3.h" | ||
|
||
|
||
__STATIC_INLINE void sli_si91x_power_manager_configure_ram_and_peripheral(void) | ||
{ | ||
sl_si91x_power_manager_remove_peripheral_requirement(&peripheral_config); | ||
sl_si91x_power_manager_configure_ram_retention(&ram_configuration); | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // SL_SI91X_POWER_MANAGER_INIT_H |
37 changes: 37 additions & 0 deletions
37
matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/***************************************************************************//** | ||
* @file sl_si91x_power_manager_wakeup_handler.c.jinja | ||
* @brief Power Manager Service Wakeup Handler APIs | ||
******************************************************************************* | ||
* # 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_power_manager_wakeup_handler.h" | ||
|
||
sl_status_t sl_si91x_power_manager_wakeup_init(void) | ||
{ | ||
sl_status_t status=SL_STATUS_OK; | ||
|
||
return status; | ||
} |
44 changes: 44 additions & 0 deletions
44
matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/***************************************************************************//** | ||
* @file sl_si91x_power_manager_wakeup_handler.h.jinja | ||
* @brief Power Manager Service Wakeup Handler APIs | ||
******************************************************************************* | ||
* # 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_POWER_MANAGER_WAKEUP_HANDLER_H | ||
#define SL_SI91X_POWER_MANAGER_WAKEUP_HANDLER_H | ||
|
||
#include "sl_status.h" | ||
|
||
|
||
|
||
#include "sl_si91x_power_manager_wakeup_source_config.h" | ||
|
||
|
||
sl_status_t sl_si91x_power_manager_wakeup_init(void); | ||
|
||
|
||
|
||
#endif // SL_SI91X_POWER_MANAGER_WAKEUP_HANDLER_H |
Oops, something went wrong.