diff options
-rw-r--r-- | ports/ARMCM3-STM32F103/stm32_serial.c | 6 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.c | 2 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 7 |
3 files changed, 11 insertions, 4 deletions
diff --git a/ports/ARMCM3-STM32F103/stm32_serial.c b/ports/ARMCM3-STM32F103/stm32_serial.c index de8cedf98..015084488 100644 --- a/ports/ARMCM3-STM32F103/stm32_serial.c +++ b/ports/ARMCM3-STM32F103/stm32_serial.c @@ -85,7 +85,7 @@ static void ServeInterrupt(USART_TypeDef *u, FullDuplexDriver *com) { /* * USART1 IRQ service routine. */ -void VectorD4(void) { +SYS_IRQ_HANDLER void VectorD4(void) { chSysIRQEnterI(); ServeInterrupt(USART1, &COM1); @@ -106,7 +106,7 @@ static void OutNotify1(void) { /* * USART2 IRQ service routine. */ -void VectorD8(void) { +SYS_IRQ_HANDLER void VectorD8(void) { chSysIRQEnterI(); ServeInterrupt(USART2, &COM2); @@ -127,7 +127,7 @@ static void OutNotify2(void) { /* * USART3 IRQ service routine. */ -void VectorDC(void) { +SYS_IRQ_HANDLER void VectorDC(void) { chSysIRQEnterI(); ServeInterrupt(USART3, &COM3); diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c index 68087b1b4..7110035f1 100644 --- a/ports/ARMCM3/chcore.c +++ b/ports/ARMCM3/chcore.c @@ -62,7 +62,7 @@ void threadstart(void) { * This interrupt is used as system tick.
* @note The timer is initialized in the board setup code.
*/
-void SysTickVector(void) {
+SYS_IRQ_HANDLER void SysTickVector(void) {
chSysIRQEnterI();
chSysLockI();
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index 36ee1f93b..c213b9ffd 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -186,9 +186,16 @@ typedef struct { */
#define sys_enable_from_isr() sys_enable()
+#if ENABLE_WFI_IDLE != 0
+/**
+ * This port function is implemented as inlined code for performance reasons.
+ */
#define sys_wait_for_interrupt() { \
asm volatile ("wfi"); \
}
+#else
+#define sys_wait_for_interrupt()
+#endif
/**
* This port function is implemented as inlined code for performance reasons.
|