git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2353 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
7e5398c9b8
commit
12f76b93f2
|
@ -26,6 +26,22 @@
|
||||||
#define TIM2_CLOCK (SYSCLK / 16)
|
#define TIM2_CLOCK (SYSCLK / 16)
|
||||||
#define TIM2_ARR ((TIM2_CLOCK / CH_FREQUENCY) - 1)
|
#define TIM2_ARR ((TIM2_CLOCK / CH_FREQUENCY) - 1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TIM2 interrupt handler.
|
||||||
|
*/
|
||||||
|
CH_IRQ_HANDLER(13) {
|
||||||
|
|
||||||
|
CH_IRQ_PROLOGUE();
|
||||||
|
|
||||||
|
chSysLockFromIsr();
|
||||||
|
chSysTimerHandlerI();
|
||||||
|
chSysUnlockFromIsr();
|
||||||
|
|
||||||
|
TIM2->SR1 = 0;
|
||||||
|
|
||||||
|
CH_IRQ_EPILOGUE();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Board initialization code.
|
* Board initialization code.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue