aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-31 14:24:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-31 14:24:12 +0000
commit87e4b85755680a122f690f445b8cb320ca4f05ad (patch)
tree7f214955a0eda60f7fae53af8557a683bd277ba0 /testhal/STM32
parentcb1f7893a41f24a46d0bc99198a3281dcea2148d (diff)
downloadChibiOS-87e4b85755680a122f690f445b8cb320ca4f05ad.tar.gz
ChibiOS-87e4b85755680a122f690f445b8cb320ca4f05ad.tar.bz2
ChibiOS-87e4b85755680a122f690f445b8cb320ca4f05ad.zip
Improvements to the ICU driver (not finished).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7210 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32')
-rw-r--r--testhal/STM32/STM32F30x/PWM-ICU/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/testhal/STM32/STM32F30x/PWM-ICU/main.c b/testhal/STM32/STM32F30x/PWM-ICU/main.c
index f0af2504a..df25de24d 100644
--- a/testhal/STM32/STM32F30x/PWM-ICU/main.c
+++ b/testhal/STM32/STM32F30x/PWM-ICU/main.c
@@ -48,13 +48,13 @@ icucnt_t last_width, last_period;
static void icuwidthcb(ICUDriver *icup) {
palSetPad(GPIOE, GPIOE_LED9_BLUE);
- last_width = icuGetWidth(icup);
+ last_width = icuGetWidthX(icup);
}
static void icuperiodcb(ICUDriver *icup) {
palClearPad(GPIOE, GPIOE_LED9_BLUE);
- last_period = icuGetPeriod(icup);
+ last_period = icuGetPeriodX(icup);
}
static ICUConfig icucfg = {
@@ -93,7 +93,7 @@ int main(void) {
palSetPadMode(GPIOD, 12, PAL_MODE_ALTERNATE(2));
icuStart(&ICUD3, &icucfg);
palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATE(2));
- icuEnable(&ICUD3);
+ icuStartCapture(&ICUD3);
chThdSleepMilliseconds(2000);
/*
@@ -127,7 +127,7 @@ int main(void) {
*/
pwmDisableChannel(&PWMD4, 0);
pwmStop(&PWMD4);
- icuDisable(&ICUD3);
+ icuStopCapture(&ICUD3);
icuStop(&ICUD3);
palClearPad(GPIOE, GPIOE_LED4_BLUE);
palClearPad(GPIOE, GPIOE_LED9_BLUE);