summaryrefslogtreecommitdiff
path: root/software/mpu/main.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2013-08-04 22:09:52 +0000
committerChristian Pointner <equinox@mur.at>2013-08-04 22:09:52 +0000
commit0c3f04f34e81a0c13c093e8fa2cc5720d58e78b6 (patch)
tree92b4acbd61e7512186f8ef6a774e08a801734909 /software/mpu/main.c
parentimproved serial level shifter (diff)
improved board config for MPU chibios
git-svn-id: https://svn.spreadspace.org/mur.sat@822 7de4ea59-55d0-425e-a1af-a3118ea81d4c
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);
}
}