summaryrefslogtreecommitdiff
path: root/software/mpu/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/mpu/main.c')
-rw-r--r--software/mpu/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/software/mpu/main.c b/software/mpu/main.c
index dd34960..e4c6a5b 100644
--- a/software/mpu/main.c
+++ b/software/mpu/main.c
@@ -38,9 +38,9 @@ static msg_t Thread1(void *arg) {
(void)arg;
chRegSetThreadName("blinker");
while (TRUE) {
- palClearPad(GPIOC, GPIOC_LED);
+ palClearPad(GPIOA, GPIOA_LED);
chThdSleepMilliseconds(500);
- palSetPad(GPIOC, GPIOC_LED);
+ palSetPad(GPIOA, GPIOA_LED);
chThdSleepMilliseconds(500);
}
}
@@ -71,12 +71,15 @@ int main(void) {
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
/*
+ * run tests after initialization is complete
+ */
+ TestThread(&SD2);
+
+ /*
* Normal main() thread activity, in this demo it does nothing except
- * sleeping in a loop and check the button state.
+ * sleeping in a loop.
*/
while (TRUE) {
- if (palReadPad(GPIOA, GPIOA_BUTTON))
- TestThread(&SD2);
chThdSleepMilliseconds(500);
}
}