projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosuilib: Show state.product if state.device_type isn't set
[fw/altos]
/
src
/
stmf0
/
ao_adc_fast.c
diff --git
a/src/stmf0/ao_adc_fast.c
b/src/stmf0/ao_adc_fast.c
index 7d2a4fd7e005df9f684de464d3ef431d6326238e..26e6691c914c87169d72905dbcdfe06ea393cca1 100644
(file)
--- a/
src/stmf0/ao_adc_fast.c
+++ b/
src/stmf0/ao_adc_fast.c
@@
-23,7
+23,7
@@
uint16_t ao_adc_ring[AO_ADC_RING_SIZE] __attribute__((aligned(4)));
/* Maximum number of samples fetched per _ao_adc_start call */
#define AO_ADC_RING_CHUNK (AO_ADC_RING_SIZE >> 1)
/* Maximum number of samples fetched per _ao_adc_start call */
#define AO_ADC_RING_CHUNK (AO_ADC_RING_SIZE >> 1)
-uint16_t ao_adc_ring_head, ao_adc_ring_
tail
;
+uint16_t ao_adc_ring_head, ao_adc_ring_
remain
;
uint16_t ao_adc_running;
/*
uint16_t ao_adc_running;
/*
@@
-36,6
+36,7
@@
static void ao_adc_dma_done(int index)
{
(void) index;
ao_adc_ring_head += ao_adc_running;
{
(void) index;
ao_adc_ring_head += ao_adc_running;
+ ao_adc_ring_remain += ao_adc_running;
if (ao_adc_ring_head == AO_ADC_RING_SIZE)
ao_adc_ring_head = 0;
ao_adc_running = 0;
if (ao_adc_ring_head == AO_ADC_RING_SIZE)
ao_adc_ring_head = 0;
ao_adc_running = 0;