Skip to content

Commit 4b76c98

Browse files
committed
chore(wl3): exti support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent a815b9e commit 4b76c98

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libraries/SrcWrapper/src/stm32/interrupt.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#if !defined(HAL_EXTI_MODULE_DISABLED)
4444

4545
/* Private Types */
46-
#if defined(STM32WB0x)
46+
#if defined(STM32WB0x) || defined(STM32WL3x)
4747
static std::function<void(void)> gpio_callback[2][16] = {
4848
{
4949
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -129,7 +129,7 @@ static const uint32_t ll_exti_lines[NB_EXTI] = {
129129
LL_EXTI_LINE_8, LL_EXTI_LINE_9, LL_EXTI_LINE_10, LL_EXTI_LINE_11,
130130
LL_EXTI_LINE_12, LL_EXTI_LINE_13, LL_EXTI_LINE_14, LL_EXTI_LINE_15
131131
};
132-
#endif /* STM32WB0x */
132+
#endif /* STM32WB0x || STM32WL3x */
133133
/* Private Functions */
134134
/**
135135
* @brief This function returns the pin ID function of the HAL PIN definition
@@ -165,7 +165,7 @@ void stm32_interrupt_enable(PinName pn, callback_function_t callback, uint32_t m
165165
hsem_unlock(CFG_HW_GPIO_SEMID);
166166
}
167167
IRQn_Type irqnb;
168-
#ifdef STM32WB0x
168+
#if defined(STM32WB0x) || defined(STM32WL3x)
169169
if (port == GPIOA) {
170170
irqnb = GPIOA_IRQn;
171171
gpio_callback[0][id] = callback;
@@ -176,7 +176,7 @@ void stm32_interrupt_enable(PinName pn, callback_function_t callback, uint32_t m
176176
#else
177177
gpio_irq_conf[id].callback = callback;
178178
irqnb = gpio_irq_conf[id].irqnb;
179-
#endif /* STM32WB0x */
179+
#endif /* STM32WB0x || */
180180
// Enable and set EXTI Interrupt
181181
HAL_NVIC_SetPriority(irqnb, EXTI_IRQ_PRIO, EXTI_IRQ_SUBPRIO);
182182
HAL_NVIC_EnableIRQ(irqnb);
@@ -208,7 +208,7 @@ void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin)
208208
{
209209
UNUSED(port);
210210
uint8_t id = get_pin_id(pin);
211-
#ifdef STM32WB0x
211+
#if defined(STM32WB0x) || defined(STM32WL3x)
212212
uint8_t pid = 0;
213213
IRQn_Type irqnb;
214214
if (port == GPIOA) {
@@ -236,11 +236,11 @@ void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin)
236236
}
237237
LL_EXTI_DisableIT_0_31(ll_exti_lines[id]);
238238
HAL_NVIC_DisableIRQ(gpio_irq_conf[id].irqnb);
239-
#endif /* STM32WB0x */
239+
#endif /* STM32WB0x || STM32WL3x */
240240
}
241241

242242

243-
#if defined(STM32WB0x)
243+
#if defined(STM32WB0x) || defined(STM32WL3x)
244244
#ifdef __cplusplus
245245
extern "C" {
246246
#endif
@@ -560,7 +560,7 @@ void EXTI15_IRQHandler(void)
560560
#ifdef __cplusplus
561561
}
562562
#endif
563-
#endif /* !STM32WB0x */
563+
#endif /* STM32WB0x || STM32WL3x */
564564

565565
#endif /* !HAL_EXTI_MODULE_DISABLED */
566566
#endif

0 commit comments

Comments
 (0)