git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2353 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-11-12 23:03:32 +00:00
parent 7e5398c9b8
commit 12f76b93f2
1 changed files with 16 additions and 0 deletions

View File

@ -26,6 +26,22 @@
#define TIM2_CLOCK (SYSCLK / 16)
#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.
*/