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

master
gdisirio 2010-11-12 23:07:49 +00:00
parent 9e53be4d3c
commit 688c495b28
2 changed files with 3 additions and 19 deletions

View File

@ -26,22 +26,6 @@
#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(20) {
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
chSysTimerHandlerI();
chSysUnlockFromIsr();
TIM2->SR1 = 0;
CH_IRQ_EPILOGUE();
}
/* /*
* Board initialization code. * Board initialization code.
*/ */

View File

@ -59,7 +59,7 @@ void main(void) {
/* /*
* Activates the serial driver 1 using the driver default configuration. * Activates the serial driver 1 using the driver default configuration.
*/ */
sdStart(&SD1, NULL); // sdStart(&SD1, NULL);
/* /*
* Creates the blinker thread. * Creates the blinker thread.
@ -70,8 +70,8 @@ void main(void) {
* Normal main() thread activity. * Normal main() thread activity.
*/ */
while (TRUE) { while (TRUE) {
if (palReadPad(GPIOC, PC_BUTTON) == PAL_LOW) // if (palReadPad(GPIOC, PC_BUTTON) == PAL_LOW)
TestThread(&SD1); // TestThread(&SD1);
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }