diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-12-09 11:29:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-12-09 11:29:07 +0000 |
commit | db6fea6a28e94cf3beeb720e97c25014535e9f71 (patch) | |
tree | aa547d17a8fb2aad04928428ac28cd64401ca4fa /os/hal/include/adc.h | |
parent | 41e76064d6b940f5adb5be8a73a450f450c3e9fd (diff) | |
download | ChibiOS-db6fea6a28e94cf3beeb720e97c25014535e9f71.tar.gz ChibiOS-db6fea6a28e94cf3beeb720e97c25014535e9f71.tar.bz2 ChibiOS-db6fea6a28e94cf3beeb720e97c25014535e9f71.zip |
Fixed bugs #445 and #446.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6560 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/adc.h')
-rw-r--r-- | os/hal/include/adc.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/os/hal/include/adc.h b/os/hal/include/adc.h index c41435452..32b4c65a2 100644 --- a/os/hal/include/adc.h +++ b/os/hal/include/adc.h @@ -224,16 +224,8 @@ typedef enum { adc_lld_stop_conversion(adcp); \
if ((adcp)->grpp->end_cb != NULL) { \
(adcp)->state = ADC_COMPLETE; \
- if ((adcp)->depth > 1) { \
- /* Invokes the callback passing the 2nd half of the buffer.*/ \
- size_t half = (adcp)->depth / 2; \
- size_t half_index = half * (adcp)->grpp->num_channels; \
- (adcp)->grpp->end_cb(adcp, (adcp)->samples + half_index, half); \
- } \
- else { \
- /* Invokes the callback passing the whole buffer.*/ \
- (adcp)->grpp->end_cb(adcp, (adcp)->samples, (adcp)->depth); \
- } \
+ /* Invoke the callback passing the whole buffer.*/ \
+ (adcp)->grpp->end_cb(adcp, (adcp)->samples, (adcp)->depth); \
if ((adcp)->state == ADC_COMPLETE) { \
(adcp)->state = ADC_READY; \
(adcp)->grpp = NULL; \
|