diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-12-09 11:29:20 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-12-09 11:29:20 +0000 |
commit | a4aff3dd04faf5857819f496753255f888655ec9 (patch) | |
tree | 5107750ffc0cac1b0781a2286962d3f098fd3938 /os/hal/include/adc.h | |
parent | 6c57849d532dc63ade01d96c1a1a32ce53d7be18 (diff) | |
download | ChibiOS-a4aff3dd04faf5857819f496753255f888655ec9.tar.gz ChibiOS-a4aff3dd04faf5857819f496753255f888655ec9.tar.bz2 ChibiOS-a4aff3dd04faf5857819f496753255f888655ec9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6563 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 23d767732..626840c5e 100644 --- a/os/hal/include/adc.h +++ b/os/hal/include/adc.h @@ -197,16 +197,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; \
|