mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 10:09:25 -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
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue