Rev 1967 | Rev 2026 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1967 | Rev 2015 | ||
---|---|---|---|
Line 211... | Line 211... | ||
211 | while (!checkDelay(t_stop)) |
211 | while (!checkDelay(t_stop)) |
212 | ; |
212 | ; |
213 | } |
213 | } |
Line 214... | Line 214... | ||
214 | 214 | ||
215 | // ----------------------------------------------------------------------- |
215 | // ----------------------------------------------------------------------- |
216 | void delay_ms_with_adc_measurement(uint16_t w) { |
216 | void delay_ms_with_adc_measurement(uint16_t w, uint8_t stop) { |
217 | uint16_t t_stop; |
217 | uint16_t t_stop; |
218 | t_stop = setDelay(w); |
218 | t_stop = setDelay(w); |
219 | while (!checkDelay(t_stop)) { |
219 | while (!checkDelay(t_stop)) { |
220 | if (analogDataReady) { |
220 | if (analogDataReady) { |
221 | analog_update(); |
221 | analog_update(); |
222 | startAnalogConversionCycle(); |
222 | startAnalogConversionCycle(); |
- | 223 | } |
|
- | 224 | } |
|
- | 225 | if (stop) { |
|
- | 226 | // Wait for new samples to get prepared but do not restart AD conversion after that! |
|
- | 227 | // Caller MUST to that. |
|
223 | } |
228 | while (!analogDataReady); |
224 | } |
229 | } |