-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modules: hal_silabs: Update HAL version
Update HAL to Simplicity SDK 2024.12. Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
- Loading branch information
Showing
6 changed files
with
174 additions
and
13 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
9 changes: 9 additions & 0 deletions
9
modules/hal_silabs/simplicity_sdk/linker/code_classification_ramfunc.ld
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,9 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Place data annotated as ramfunc into the Zephyr .ramfunc section. | ||
*/ | ||
|
||
*(text_application_ram) |
15 changes: 15 additions & 0 deletions
15
modules/hal_silabs/simplicity_sdk/linker/code_classification_text.ld
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,15 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Place text sections tagged with Silicon Labs code classification annotations into flash. | ||
*/ | ||
|
||
SECTION_PROLOGUE(.cc_text,,) | ||
{ | ||
_cc_text_start = .; | ||
*(SORT_BY_ALIGNMENT(text_*[0-9])) | ||
_cc_text_end = .; | ||
} GROUP_LINK_IN(ROMABLE_REGION) | ||
_cc_text_size = _cc_text_end - _cc_text_start; |
26 changes: 26 additions & 0 deletions
26
modules/hal_silabs/simplicity_sdk/src/sl_btctrl_hci_reset_shim.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,26 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Shim for sl_btctrl_hci_reset API | ||
*/ | ||
|
||
#include <stdbool.h> | ||
|
||
bool sl_btctrl_hci_reset_reason_is_sys_reset(void) | ||
{ | ||
/* If this function returns true, the LL will emit command complete for HCI Reset during | ||
* init. This only makes sense when the LL runs on a separate device from the host stack. | ||
* Always return false. | ||
*/ | ||
return false; | ||
} | ||
|
||
void sl_btctrl_hci_reset(void) | ||
{ | ||
/* This function works as a callback during processing of the HCI Reset command, and allows | ||
* for custom processing (such as fully resetting the device). This only makes sense when | ||
* the LL runs on a separate device from the host stack. Do nothing. | ||
*/ | ||
} |
72 changes: 72 additions & 0 deletions
72
modules/hal_silabs/simplicity_sdk/src/sl_interrupt_manager_shim.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,72 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Shim for sl_interrupt_manager API using Zephyr API | ||
*/ | ||
|
||
#include <zephyr/kernel.h> | ||
|
||
#include "sl_interrupt_manager.h" | ||
|
||
#define LOCK_KEY_DEFAULT 0xFFFFFFFFU | ||
|
||
static unsigned int lock_key = LOCK_KEY_DEFAULT; | ||
|
||
void sl_interrupt_manager_disable_interrupts(void) | ||
{ | ||
__ASSERT(lock_key == LOCK_KEY_DEFAULT, "Interrupt manager doesn't support nested disable"); | ||
lock_key = irq_lock(); | ||
} | ||
|
||
void sl_interrupt_manager_enable_interrupts(void) | ||
{ | ||
irq_unlock(lock_key); | ||
lock_key = LOCK_KEY_DEFAULT; | ||
} | ||
|
||
void sl_interrupt_manager_disable_irq(int32_t irqn) | ||
{ | ||
irq_disable(irqn); | ||
} | ||
|
||
void sl_interrupt_manager_enable_irq(int32_t irqn) | ||
{ | ||
irq_enable(irqn); | ||
} | ||
|
||
bool sl_interrupt_manager_is_irq_disabled(int32_t irqn) | ||
{ | ||
return !irq_is_enabled(irqn); | ||
} | ||
|
||
bool sl_interrupt_manager_is_irq_pending(int32_t irqn) | ||
{ | ||
return NVIC_GetPendingIRQ(irqn); | ||
} | ||
|
||
void sl_interrupt_manager_set_irq_pending(int32_t irqn) | ||
{ | ||
NVIC_SetPendingIRQ(irqn); | ||
} | ||
|
||
void sl_interrupt_manager_clear_irq_pending(int32_t irqn) | ||
{ | ||
NVIC_ClearPendingIRQ(irqn); | ||
} | ||
|
||
uint32_t sl_interrupt_manager_get_irq_priority(int32_t irqn) | ||
{ | ||
return NVIC_GetPriority(irqn); | ||
} | ||
|
||
void sl_interrupt_manager_set_irq_priority(int32_t irqn, uint32_t priority) | ||
{ | ||
NVIC_SetPriority(irqn, priority); | ||
} | ||
|
||
uint32_t sl_interrupt_manager_get_active_irq(int32_t irqn) | ||
{ | ||
return NVIC_GetActive(irqn); | ||
} |
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