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.c | |
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.c')
-rw-r--r-- | boards/ST_STM8L_DISCOVERY/board.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/boards/ST_STM8L_DISCOVERY/board.c b/boards/ST_STM8L_DISCOVERY/board.c index dd4a27472..8a013fa26 100644 --- a/boards/ST_STM8L_DISCOVERY/board.c +++ b/boards/ST_STM8L_DISCOVERY/board.c @@ -39,13 +39,13 @@ void hwinit(void) { /*
* TIM2 initialization as system tick.
*/
- CLK->PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/
+ CLK->PCKENR1 |= CLK_PCKENR1_TIM2;
TIM2->PSCR = 4; /* Prescaler divide by 2^4=16.*/
TIM2->ARRH = (uint8_t)(TIM2_ARR >> 8);
TIM2->ARRL = (uint8_t)(TIM2_ARR);
TIM2->CNTRH = 0;
TIM2->CNTRL = 0;
TIM2->SR1 = 0;
- TIM2->IER = 1; /* UIE */
- TIM2->CR1 = 1; /* CEN */
+ TIM2->IER = TIM_IER_UIE;
+ TIM2->CR1 = TIM_CR1_CEN;
}
|