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

@ -28,8 +28,6 @@
#include "gpdma.hpp"
#include "touch_dma.hpp"
#include "message_queue.hpp"
#include "utility.hpp"
@ -73,10 +71,6 @@ static void init() {
LPC_CREG->DMAMUX = portapack::gpdma_mux;
gpdma::controller.enable();
nvicEnableVector(DMA_IRQn, CORTEX_PRIORITY_MASK(LPC_DMA_IRQ_PRIORITY));
touch::dma::init();
touch::dma::allocate();
touch::dma::enable();
}
extern void run();