mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-31 02:29:38 -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
|
@ -27,19 +27,11 @@
|
|||
|
||||
#include "message_queue.hpp"
|
||||
|
||||
struct TouchADCFrame {
|
||||
uint32_t dr[8];
|
||||
};
|
||||
|
||||
/* NOTE: These structures must be located in the same location in both M4 and M0 binaries */
|
||||
struct SharedMemory {
|
||||
static constexpr size_t application_queue_k = 11;
|
||||
static constexpr size_t app_local_queue_k = 11;
|
||||
|
||||
|
||||
// TODO: M0 should directly configure and control DMA channel that is
|
||||
// acquiring ADC samples.
|
||||
TouchADCFrame touch_adc_frame;
|
||||
uint8_t application_queue_data[1 << application_queue_k] { 0 };
|
||||
uint8_t app_local_queue_data[1 << app_local_queue_k] { 0 };
|
||||
const Message* volatile baseband_message { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue