diff options
author | Theodore Ateba <tf.ateba@gmail.com> | 2017-10-13 19:32:54 +0000 |
---|---|---|
committer | Theodore Ateba <tf.ateba@gmail.com> | 2017-10-13 19:32:54 +0000 |
commit | f96e9403804b05df7509503c2f12404a93e29fa8 (patch) | |
tree | 548210262f0250baff7508baf853c1768373c42c /testhal/AVR/MEGA/ICU/main.c | |
parent | 41641dc844bcfb3b6bec122b0bce552be1c26b46 (diff) | |
download | ChibiOS-f96e9403804b05df7509503c2f12404a93e29fa8.tar.gz ChibiOS-f96e9403804b05df7509503c2f12404a93e29fa8.tar.bz2 ChibiOS-f96e9403804b05df7509503c2f12404a93e29fa8.zip |
AVR: Fix compilation errors for ICU testhal program.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10821 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/AVR/MEGA/ICU/main.c')
-rw-r--r-- | testhal/AVR/MEGA/ICU/main.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/testhal/AVR/MEGA/ICU/main.c b/testhal/AVR/MEGA/ICU/main.c index 6a2ec1d5d..3e8786067 100644 --- a/testhal/AVR/MEGA/ICU/main.c +++ b/testhal/AVR/MEGA/ICU/main.c @@ -57,7 +57,7 @@ void output_single_cycle(const uint16_t low, const uint16_t high) { palClearPad(IOPORT4, 4);
}
-static WORKING_AREA(waThread1, 64);
+static THD_WORKING_AREA(waThread1, 64);
static THD_FUNCTION(Thread1, arg) {
BaseSequentialStream *serp = (BaseSequentialStream *) &SD1;
@@ -73,7 +73,7 @@ static THD_FUNCTION(Thread1, arg) { }
}
-static WORKING_AREA(waThread2, 64);
+static THD_WORKING_AREA(waThread2, 64);
static THD_FUNCTION(Thread2, arg) {
BaseSequentialStream *serp = (BaseSequentialStream *) &SD1;
@@ -115,26 +115,26 @@ int main(void) { BaseSequentialStream *serp = (BaseSequentialStream *) &SD1;
chprintf(serp, "Testing 50 duty cycle\r\n");
- icuEnable(&ICUD3);
+ icuStartCapture(&ICUD3);
output_single_cycle(500, 500);
- icuDisable(&ICUD3);
+ icuStopCapture(&ICUD3);
chEvtWaitAny((eventmask_t) 3);
chprintf(serp, "Testing 25 duty cycle\r\n");
- icuEnable(&ICUD3);
+ icuStartCapture(&ICUD3);
output_single_cycle(250, 750);
- icuDisable(&ICUD3);
+ icuStopCapture(&ICUD3);
chEvtWaitAny((eventmask_t) 3);
chprintf(serp, "Testing 75 duty cycle\r\n");
- icuEnable(&ICUD3);
+ icuStartCapture(&ICUD3);
output_single_cycle(750, 250);
- icuDisable(&ICUD3);
+ icuStopCapture(&ICUD3);
chEvtWaitAny((eventmask_t) 3);
chprintf(serp, "Testing overflow\r\n");
- icuEnable(&ICUD3);
+ icuStartCapture(&ICUD3);
chEvtWaitAny((eventmask_t) 3);
- icuDisable(&ICUD3);
+ icuStopCapture(&ICUD3);
}
}
|