Move touch ADC data collection to M0.

...so it continues when M4 is shut down.

It's not as pretty as using DMA, but it's far simpler, even if it involves letting the ADC run continuously and taking the last samples even if not synchronizing to the phase of the sampling of the channels.
This commit is contained in:
Jared Boone 2016-07-24 15:31:53 -07:00
parent b3f4ea8978
commit 8b02e40602
5 changed files with 10 additions and 36 deletions

View file

@ -168,8 +168,6 @@ void timer0_callback(GPTDriver* const) {
EventDispatcher::events_flag_isr(event_mask);
chSysUnlockFromIsr();
}
touch::adc::start();
}
/* TODO: Refactor some/all of this to appropriate shared headers? */
@ -187,6 +185,8 @@ static GPTConfig timer0_config {
};
void controls_init() {
touch::adc::start();
/* GPT timer 0 is used to scan user interface controls -- touch screen,
* navigation switches.
*/