diff options
Diffstat (limited to 'os/hal/ports')
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.c | 34 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h | 13 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c | 30 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h | 11 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.c | 30 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.h | 11 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F0xx/stm32_isr.c | 10 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F1xx/stm32_isr.c | 2 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F37x/stm32_isr.c | 2 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F3xx/stm32_isr.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_isr.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F7xx/stm32_isr.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L0xx/stm32_isr.c | 10 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L1xx/stm32_isr.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx/stm32_isr.c | 4 |
15 files changed, 92 insertions, 81 deletions
diff --git a/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.c b/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.c index be8f7e829..84f0be664 100644 --- a/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.c +++ b/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.c @@ -80,6 +80,14 @@ palevent_t _pal_events[16]; */
void _pal_lld_init(const PALConfig *config) {
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
+ unsigned i;
+
+ for (i = 0; i < 16; i++) {
+ _pal_init_event(i);
+ }
+#endif
+
/*
* Enables the GPIO related clocks.
*/
@@ -183,24 +191,20 @@ void _pal_lld_setgroupmode(ioportid_t port, port->CRL = (port->CRL & ml) | crl;
}
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
/**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg) {
+ ioeventmode_t mode) {
uint32_t padmask, cridx, crmask, portidx;
@@ -218,7 +222,7 @@ void _pal_lld_enablepadevent(ioportid_t port, crmask = ~(0xFU << (((uint32_t)pad & 3U) * 4U));
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
/* Port selection in SYSCFG.*/
@@ -237,14 +241,11 @@ void _pal_lld_enablepadevent(ioportid_t port, /* Programming interrupt and event registers.*/
EXTI->IMR |= padmask;
EXTI->EMR &= ~padmask;
-
- /* Setting up callback and argument for this event.*/
- _pal_set_event(pad, callback, arg);
}
/**
* @brief Pad event disable.
- * @details This function disables previously programmed event callbacks.
+ * @details This function also disables previously programmed event callbacks.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
@@ -269,7 +270,7 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { croff = ((uint32_t)pad & 3U) * 4U;
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
crport = (AFIO->EXTICR[cridx] >> croff) & 0xFU;
@@ -282,11 +283,14 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { EXTI->RTSR = rtsr1 & ~padmask;
EXTI->FTSR = ftsr1 & ~padmask;
EXTI->PR = padmask;
-
- /* Clearing callback and argument for this event.*/
- _pal_clear_event(pad);
}
+
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT
+ /* Callback cleared and/or thread reset.*/
+ _pal_clear_event(pad);
+#endif
}
+#endif /* PAL_USE_CALLBACKS || PAL_USE_WAIT */
#endif /* HAL_USE_PAL */
diff --git a/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h b/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h index a20cea930..f7f1c2e81 100644 --- a/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h +++ b/os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h @@ -368,19 +368,16 @@ typedef uint32_t iopadid_t; /**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
-#define pal_lld_enablepadevent(port, pad, mode, callback, arg) \
- _pal_lld_enablepadevent(port, pad, mode, callback, arg)
+#define pal_lld_enablepadevent(port, pad, mode) \
+ _pal_lld_enablepadevent(port, pad, mode)
/**
* @brief Pad event disable.
@@ -427,12 +424,12 @@ extern "C" { void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
iomode_t mode);
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg);
+ ioeventmode_t mode);
void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad);
+#endif
#ifdef __cplusplus
}
#endif
diff --git a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c index 70f769f02..ab6864474 100644 --- a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c +++ b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c @@ -92,6 +92,14 @@ static void initgpio(stm32_gpio_t *gpiop, const stm32_gpio_setup_t *config) { */
void _pal_lld_init(const PALConfig *config) {
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
+ unsigned i;
+
+ for (i = 0; i < 16; i++) {
+ _pal_init_event(i);
+ }
+#endif
+
/*
* Enables the GPIO related clocks.
*/
@@ -212,24 +220,20 @@ void _pal_lld_setgroupmode(ioportid_t port, }
}
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
/**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg) {
+ ioeventmode_t mode) {
uint32_t padmask, cridx, crmask, portidx;
@@ -247,7 +251,7 @@ void _pal_lld_enablepadevent(ioportid_t port, crmask = ~(0xFU << (((uint32_t)pad & 3U) * 4U));
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
/* Port selection in SYSCFG.*/
@@ -266,9 +270,6 @@ void _pal_lld_enablepadevent(ioportid_t port, /* Programming interrupt and event registers.*/
EXTI->IMR |= padmask;
EXTI->EMR &= ~padmask;
-
- /* Setting up callback and argument for this event.*/
- _pal_set_event(pad, callback, arg);
}
/**
@@ -298,7 +299,7 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { croff = ((uint32_t)pad & 3U) * 4U;
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
crport = (SYSCFG->EXTICR[cridx] >> croff) & 0xFU;
@@ -312,10 +313,13 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { EXTI->FTSR = ftsr1 & ~padmask;
EXTI->PR = padmask;
- /* Clearing callback and argument for this event.*/
- _pal_clear_event(pad);
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT
+ /* Callback cleared and/or thread reset.*/
+ _pal_clear_event(pad);
+#endif
}
}
+#endif /* PAL_USE_CALLBACKS || PAL_USE_WAIT */
#endif /* HAL_USE_PAL */
diff --git a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h index 4a30a61a5..546c45045 100644 --- a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h +++ b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h @@ -551,19 +551,16 @@ typedef uint32_t iopadid_t; /**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
-#define pal_lld_enablepadevent(port, pad, mode, callback, arg) \
- _pal_lld_enablepadevent(port, pad, mode, callback, arg)
+#define pal_lld_enablepadevent(port, pad, mode) \
+ _pal_lld_enablepadevent(port, pad, mode)
/**
* @brief Pad event disable.
@@ -612,9 +609,7 @@ extern "C" { iomode_t mode);
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg);
+ ioeventmode_t mode);
void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad);
#ifdef __cplusplus
}
diff --git a/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.c b/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.c index 6c8a1ec2e..65f76a609 100644 --- a/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.c +++ b/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.c @@ -95,6 +95,14 @@ static void initgpio(stm32_gpio_t *gpiop, const stm32_gpio_setup_t *config) { */
void _pal_lld_init(const PALConfig *config) {
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
+ unsigned i;
+
+ for (i = 0; i < 16; i++) {
+ _pal_init_event(i);
+ }
+#endif
+
/*
* Enables the GPIO related clocks.
*/
@@ -208,24 +216,20 @@ void _pal_lld_setgroupmode(ioportid_t port, }
}
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT || defined(__DOXYGEN__)
/**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg) {
+ ioeventmode_t mode) {
uint32_t padmask, cridx, crmask, portidx;
@@ -243,7 +247,7 @@ void _pal_lld_enablepadevent(ioportid_t port, crmask = ~(0xFU << (((uint32_t)pad & 3U) * 4U));
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
/* Port selection in SYSCFG.*/
@@ -262,9 +266,6 @@ void _pal_lld_enablepadevent(ioportid_t port, /* Programming interrupt and event registers.*/
EXTI->IMR |= padmask;
EXTI->EMR &= ~padmask;
-
- /* Setting up callback and argument for this event.*/
- _pal_set_event(pad, callback, arg);
}
/**
@@ -294,7 +295,7 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { croff = ((uint32_t)pad & 3U) * 4U;
/* Port index is obtained assuming that GPIO ports are placed at regular
- 0x400 intervalis in memory space. So far this is true for all devices.*/
+ 0x400 intervals in memory space. So far this is true for all devices.*/
portidx = (uint32_t)port >> 10U;
crport = (SYSCFG->EXTICR[cridx] >> croff) & 0xFU;
@@ -308,10 +309,13 @@ void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad) { EXTI->FTSR = ftsr1 & ~padmask;
EXTI->PR = padmask;
- /* Clearing callback and argument for this event.*/
- _pal_clear_event(pad);
+#if PAL_USE_CALLBACKS || PAL_USE_WAIT
+ /* Callback cleared and/or thread reset.*/
+ _pal_clear_event(pad);
+#endif
}
}
+#endif /* PAL_USE_CALLBACKS || PAL_USE_WAIT */
#endif /* HAL_USE_PAL */
diff --git a/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.h b/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.h index 7b423807e..c76fda1b0 100644 --- a/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.h +++ b/os/hal/ports/STM32/LLD/GPIOv3/hal_pal_lld.h @@ -563,19 +563,16 @@ typedef uint32_t iopadid_t; /**
* @brief Pad event enable.
- * @details This function programs an event callback in the specified mode.
* @note Programming an unknown or unsupported mode is silently ignored.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad event mode
- * @param[in] callback event callback function
- * @param[in] arg callback argument
*
* @notapi
*/
-#define pal_lld_enablepadevent(port, pad, mode, callback, arg) \
- _pal_lld_enablepadevent(port, pad, mode, callback, arg)
+#define pal_lld_enablepadevent(port, pad, mode) \
+ _pal_lld_enablepadevent(port, pad, mode)
/**
* @brief Pad event disable.
@@ -624,9 +621,7 @@ extern "C" { iomode_t mode);
void _pal_lld_enablepadevent(ioportid_t port,
iopadid_t pad,
- ioeventmode_t mode,
- palcallback_t callback,
- void *arg);
+ ioeventmode_t mode);
void _pal_lld_disablepadevent(ioportid_t port, iopadid_t pad);
#ifdef __cplusplus
}
diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_isr.c b/os/hal/ports/STM32/STM32F0xx/stm32_isr.c index 8397b7e51..12d931c44 100644 --- a/os/hal/ports/STM32/STM32F0xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F0xx/stm32_isr.c @@ -51,7 +51,8 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
+#if !defined(STM32_DISABLE_EXTI0_1_HANDLER)
/**
* @brief EXTI[0]...EXTI[1] interrupt handler.
*
@@ -71,7 +72,9 @@ OSAL_IRQ_HANDLER(Vector54) { OSAL_IRQ_EPILOGUE();
}
+#endif
+#if !defined(STM32_DISABLE_EXTI2_3_HANDLER)
/**
* @brief EXTI[2]...EXTI[3] interrupt handler.
*
@@ -91,7 +94,9 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_EPILOGUE();
}
+#endif
+#if !defined(STM32_DISABLE_EXTI4_15_HANDLER)
/**
* @brief EXTI[4]...EXTI[15] interrupt handler.
*
@@ -123,8 +128,9 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_EPILOGUE();
}
+#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_isr.c b/os/hal/ports/STM32/STM32F1xx/stm32_isr.c index 4442a8456..813468553 100644 --- a/os/hal/ports/STM32/STM32F1xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F1xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS))|| defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
diff --git a/os/hal/ports/STM32/STM32F37x/stm32_isr.c b/os/hal/ports/STM32/STM32F37x/stm32_isr.c index bfb969ce0..222bee1f7 100644 --- a/os/hal/ports/STM32/STM32F37x/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F37x/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS))|| defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
diff --git a/os/hal/ports/STM32/STM32F3xx/stm32_isr.c b/os/hal/ports/STM32/STM32F3xx/stm32_isr.c index bfb969ce0..d9c27b8d2 100644 --- a/os/hal/ports/STM32/STM32F3xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F3xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
@@ -210,7 +210,7 @@ OSAL_IRQ_HANDLER(VectorE0) { }
#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_isr.c b/os/hal/ports/STM32/STM32F4xx/stm32_isr.c index 9ee6ea16e..1b2126be3 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F4xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
@@ -210,7 +210,7 @@ OSAL_IRQ_HANDLER(VectorE0) { }
#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32F7xx/stm32_isr.c b/os/hal/ports/STM32/STM32F7xx/stm32_isr.c index 447d389db..a51705a11 100644 --- a/os/hal/ports/STM32/STM32F7xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32F7xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
@@ -210,7 +210,7 @@ OSAL_IRQ_HANDLER(VectorE0) { }
#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32L0xx/stm32_isr.c b/os/hal/ports/STM32/STM32L0xx/stm32_isr.c index 04c73d850..a471834cb 100644 --- a/os/hal/ports/STM32/STM32L0xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32L0xx/stm32_isr.c @@ -51,7 +51,8 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
+#if !defined(STM32_DISABLE_EXTI0_1_HANDLER)
/**
* @brief EXTI[0]...EXTI[1] interrupt handler.
*
@@ -71,12 +72,14 @@ OSAL_IRQ_HANDLER(Vector54) { OSAL_IRQ_EPILOGUE();
}
+#endif
/**
* @brief EXTI[2]...EXTI[3] interrupt handler.
*
* @isr
*/
+#if !defined(STM32_DISABLE_EXTI2_3_HANDLER)
OSAL_IRQ_HANDLER(Vector58) {
uint32_t pr;
@@ -91,7 +94,9 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_EPILOGUE();
}
+#endif
+#if !defined(STM32_DISABLE_EXTI4_15_HANDLER)
/**
* @brief EXTI[4]...EXTI[15] interrupt handler.
*
@@ -123,8 +128,9 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_EPILOGUE();
}
+#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32L1xx/stm32_isr.c b/os/hal/ports/STM32/STM32L1xx/stm32_isr.c index 3682c5a8a..6d1a49d0b 100644 --- a/os/hal/ports/STM32/STM32L1xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32L1xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
@@ -210,7 +210,7 @@ OSAL_IRQ_HANDLER(VectorE0) { }
#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_isr.c b/os/hal/ports/STM32/STM32L4xx/stm32_isr.c index f10a7dd9d..f134dc9b3 100644 --- a/os/hal/ports/STM32/STM32L4xx/stm32_isr.c +++ b/os/hal/ports/STM32/STM32L4xx/stm32_isr.c @@ -51,7 +51,7 @@ /* Driver interrupt handlers. */
/*===========================================================================*/
-#if HAL_USE_PAL || defined(__DOXYGEN__)
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
#if !defined(STM32_DISABLE_EXTI0_HANDLER)
/**
* @brief EXTI[0] interrupt handler.
@@ -210,7 +210,7 @@ OSAL_IRQ_HANDLER(VectorE0) { }
#endif
-#endif /* HAL_USE_PAL */
+#endif /* HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS) */
/*===========================================================================*/
/* Driver exported functions. */
|