diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-06 09:32:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-06 09:32:35 +0000 |
commit | 9f6887fdd7c0abe03144f29d9585ee71c645c8dc (patch) | |
tree | ce31ae2127becc36ddd64b6577e8e83a06f49405 /ports | |
parent | fee14cb4ce565ed6c47c675a14cfb9480cb52886 (diff) | |
download | ChibiOS-9f6887fdd7c0abe03144f29d9585ee71c645c8dc.tar.gz ChibiOS-9f6887fdd7c0abe03144f29d9585ee71c645c8dc.tar.bz2 ChibiOS-9f6887fdd7c0abe03144f29d9585ee71c645c8dc.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@588 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARMCM3-STM32F103/stm32_serial.c | 12 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 9 |
2 files changed, 11 insertions, 10 deletions
diff --git a/ports/ARMCM3-STM32F103/stm32_serial.c b/ports/ARMCM3-STM32F103/stm32_serial.c index fbb1775c9..de8cedf98 100644 --- a/ports/ARMCM3-STM32F103/stm32_serial.c +++ b/ports/ARMCM3-STM32F103/stm32_serial.c @@ -55,9 +55,9 @@ static void SetError(uint16_t sr, FullDuplexDriver *com) { sts |= SD_FRAMING_ERROR; if (sr & SR_LBD) sts |= SD_BREAK_DETECTED; - chSysLock(); + chSysLockI(); chFDDAddFlagsI(com, sts); - chSysUnlock(); + chSysUnlockI(); } static void ServeInterrupt(USART_TypeDef *u, FullDuplexDriver *com) { @@ -66,14 +66,14 @@ static void ServeInterrupt(USART_TypeDef *u, FullDuplexDriver *com) { if (sr & (SR_ORE | SR_FE | SR_PE | SR_LBD)) SetError(sr, com); if (sr & SR_RXNE) { - chSysLock(); + chSysLockI(); chFDDIncomingDataI(com, u->DR); - chSysUnlock(); + chSysUnlockI(); } if (sr & SR_TXE) { - chSysLock(); + chSysLockI(); msg_t b = chFDDRequestDataI(com); - chSysUnlock(); + chSysUnlockI(); if (b < Q_OK) u->CR1 &= ~CR1_TXEIE; else diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index cdd4a0625..36ee1f93b 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -135,10 +135,10 @@ typedef struct { /**
* Computes the thread working area global size.
*/
-#define THD_WA_SIZE(n) StackAlign(sizeof(Thread) + \
- sizeof(struct intctx) + \
- sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
+ sizeof(struct intctx) + \
+ sizeof(struct extctx) + \
+ (n) + (INT_REQUIRED_STACK))
/**
* Macro used to allocate a thread working area aligned as both position and
@@ -209,6 +209,7 @@ extern "C" { #endif
void sys_puts(char *msg);
void sys_halt(void);
+ void threadstart(void);
#ifdef __cplusplus
}
#endif
|