diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-13 09:41:55 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-13 09:41:55 +0000 |
commit | 11c89928eac9e2a9916940b8f634f3d96b60f17e (patch) | |
tree | 3af58998e293808620f1253aeaca169ce50d5347 /boards/ST_STM8L_DISCOVERY/board.h | |
parent | be60d348aa1f67e1c9a4667aa996318c1a43067f (diff) | |
download | ChibiOS-11c89928eac9e2a9916940b8f634f3d96b60f17e.tar.gz ChibiOS-11c89928eac9e2a9916940b8f634f3d96b60f17e.tar.bz2 ChibiOS-11c89928eac9e2a9916940b8f634f3d96b60f17e.zip |
STM8L Demo and PAL driver working now.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2357 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'boards/ST_STM8L_DISCOVERY/board.h')
-rw-r--r-- | boards/ST_STM8L_DISCOVERY/board.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/boards/ST_STM8L_DISCOVERY/board.h b/boards/ST_STM8L_DISCOVERY/board.h index a349aa9e4..3355c28c9 100644 --- a/boards/ST_STM8L_DISCOVERY/board.h +++ b/boards/ST_STM8L_DISCOVERY/board.h @@ -116,7 +116,7 @@ * Port C initial setup.
*/
#define VAL_GPIOCODR 0
-#define VAL_GPIOCDDR (1 < PC_LED4)
+#define VAL_GPIOCDDR (1 << PC_LED4)
#define VAL_GPIOCCR1 0xFF /* All pull-up/push-pull. */
#define VAL_GPIOCCR2 0
@@ -132,7 +132,7 @@ * Port E initial setup.
*/
#define VAL_GPIOEODR 0
-#define VAL_GPIOEDDR (1 < PE_LED3)
+#define VAL_GPIOEDDR (1 << PE_LED3)
#define VAL_GPIOECR1 0xFF /* All pull-up/push-pull. */
#define VAL_GPIOECR2 0
@@ -144,6 +144,19 @@ #define VAL_GPIOFCR1 0xFF /* All pull-up/push-pull. */
#define VAL_GPIOFCR2 0
+/*
+ * TIM2-update ISR segment code. This code is injected into the appropriate
+ * ISR by the HAL.
+ */
+#define _TIM2_UPDATE_ISR() { \
+ if (TIM2->SR1 & TIM_SR1_UIF) { \
+ chSysLockFromIsr(); \
+ chSysTimerHandlerI(); \
+ chSysUnlockFromIsr(); \
+ TIM2->SR1 = 0; \
+ } \
+}
+
#ifdef __cplusplus
extern "C" {
#endif
|