mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
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:
parent
b3f4ea8978
commit
8b02e40602
5 changed files with 10 additions and 36 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue