aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/PWM-ICU/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F4xx/PWM-ICU/main.c')
-rw-r--r--testhal/STM32F4xx/PWM-ICU/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/testhal/STM32F4xx/PWM-ICU/main.c b/testhal/STM32F4xx/PWM-ICU/main.c
index af3caa109..de2818a15 100644
--- a/testhal/STM32F4xx/PWM-ICU/main.c
+++ b/testhal/STM32F4xx/PWM-ICU/main.c
@@ -34,7 +34,7 @@ static void pwmc1cb(PWMDriver *pwmp) {
}
static PWMConfig pwmcfg = {
- 10000, /* 10KHz PWM clock frequency. */
+ 10000, /* 10kHz PWM clock frequency. */
10000, /* Initial PWM period 1S. */
pwmpcb,
{
@@ -51,20 +51,22 @@ icucnt_t last_width, last_period;
static void icuwidthcb(ICUDriver *icup) {
palSetPad(GPIOD, GPIOD_LED4);
- last_width = icuGetWidthI(icup);
+ last_width = icuGetWidth(icup);
}
static void icuperiodcb(ICUDriver *icup) {
palClearPad(GPIOD, GPIOD_LED4);
- last_period = icuGetPeriodI(icup);
+ last_period = icuGetPeriod(icup);
}
static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
- 10000, /* 10KHz ICU clock frequency. */
+ 10000, /* 10kHz ICU clock frequency. */
icuwidthcb,
- icuperiodcb
+ icuperiodcb,
+ NULL,
+ ICU_CHANNEL_1
};
/*