aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-03-10 11:56:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-03-10 11:56:43 +0000
commit1f05b803edfb45940c544aa01ae3af3693b1a4cd (patch)
tree76823dd701e8e8609ae4f83f7ea9bdc9e5609a6a /testhal
parent696e7202dca8e59cb3a38bfdb190a1e095da70cd (diff)
downloadChibiOS-1f05b803edfb45940c544aa01ae3af3693b1a4cd.tar.gz
ChibiOS-1f05b803edfb45940c544aa01ae3af3693b1a4cd.tar.bz2
ChibiOS-1f05b803edfb45940c544aa01ae3af3693b1a4cd.zip
Overflow handling in ICU driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4033 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32F1xx/PWM-ICU/main.c1
-rw-r--r--testhal/STM32F4xx/PWM-ICU/main.c8
-rw-r--r--testhal/STM32L1xx/PWM-ICU/main.c8
3 files changed, 11 insertions, 6 deletions
diff --git a/testhal/STM32F1xx/PWM-ICU/main.c b/testhal/STM32F1xx/PWM-ICU/main.c
index ab9cd8be2..78bcbf063 100644
--- a/testhal/STM32F1xx/PWM-ICU/main.c
+++ b/testhal/STM32F1xx/PWM-ICU/main.c
@@ -66,6 +66,7 @@ static ICUConfig icucfg = {
10000, /* 10KHz ICU clock frequency. */
icuwidthcb,
icuperiodcb,
+ NULL,
ICU_CHANNEL_1
};
diff --git a/testhal/STM32F4xx/PWM-ICU/main.c b/testhal/STM32F4xx/PWM-ICU/main.c
index af3caa109..5221123e2 100644
--- a/testhal/STM32F4xx/PWM-ICU/main.c
+++ b/testhal/STM32F4xx/PWM-ICU/main.c
@@ -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. */
icuwidthcb,
- icuperiodcb
+ icuperiodcb,
+ NULL,
+ ICU_CHANNEL_1
};
/*
diff --git a/testhal/STM32L1xx/PWM-ICU/main.c b/testhal/STM32L1xx/PWM-ICU/main.c
index 22d31a379..35044663c 100644
--- a/testhal/STM32L1xx/PWM-ICU/main.c
+++ b/testhal/STM32L1xx/PWM-ICU/main.c
@@ -51,20 +51,22 @@ icucnt_t last_width, last_period;
static void icuwidthcb(ICUDriver *icup) {
palSetPad(GPIOB, GPIOB_LED3);
- last_width = icuGetWidthI(icup);
+ last_width = icuGetWidth(icup);
}
static void icuperiodcb(ICUDriver *icup) {
palClearPad(GPIOB, GPIOB_LED3);
- last_period = icuGetPeriodI(icup);
+ last_period = icuGetPeriod(icup);
}
static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
10000, /* 10KHz ICU clock frequency. */
icuwidthcb,
- icuperiodcb
+ icuperiodcb,
+ NULL,
+ ICU_CHANNEL_1
};
/*