diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-12-29 17:18:43 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-12-29 17:18:43 +0000 |
commit | d9a9844f8e43b725f3bbe53f1d97e6435065adcc (patch) | |
tree | 02b59fffce87ea2ab4a2fb7c4fce1526daddc0bb /testhal/STM32/STM32L4xx | |
parent | e3aa427548a678db8b359e24aade7227792b43ad (diff) | |
download | ChibiOS-d9a9844f8e43b725f3bbe53f1d97e6435065adcc.tar.gz ChibiOS-d9a9844f8e43b725f3bbe53f1d97e6435065adcc.tar.bz2 ChibiOS-d9a9844f8e43b725f3bbe53f1d97e6435065adcc.zip |
Template fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12491 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/STM32/STM32L4xx')
-rw-r--r-- | testhal/STM32/STM32L4xx/GPT-ADC/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testhal/STM32/STM32L4xx/GPT-ADC/main.c b/testhal/STM32/STM32L4xx/GPT-ADC/main.c index b7212a962..b7d0875f8 100644 --- a/testhal/STM32/STM32L4xx/GPT-ADC/main.c +++ b/testhal/STM32/STM32L4xx/GPT-ADC/main.c @@ -44,16 +44,16 @@ adcsample_t samples1[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH]; * ADC streaming callback.
*/
size_t nx = 0, ny = 0;
-static void adccallback(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
+static void adccallback(ADCDriver *adcp) {
(void)adcp;
/* Updating counters.*/
- if (samples1 == buffer) {
- nx += n;
+ if (adcIsBufferComplete(adcp)) {
+ nx += 1;
}
else {
- ny += n;
+ ny += 1;
}
}
|