From 8642a9cd6c5ad30cf1fb09f9e0234b18da460e50 Mon Sep 17 00:00:00 2001 From: Erin Abicht Date: Fri, 14 Jul 2023 10:39:10 -0400 Subject: [PATCH] Placeholder data processing --- src/main.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1b37329..88d9c5a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,6 @@ use embassy_rp::multicore::{spawn_core1, Stack}; use embassy_rp::peripherals::PIN_25; use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; use embassy_sync::channel::Channel; -use embassy_time::{Duration, Timer}; use static_cell::StaticCell; use {defmt_rtt as _, panic_probe as _}; @@ -70,6 +69,15 @@ async fn core1_task(mut led: Output<'static, PIN_25>) { info!("Hello from core 1"); loop { - queue.push(CHANNEL.recv().await) + queue.push(CHANNEL.recv().await); + + process_data(&queue[0]).await; + queue.remove(1); } } + +async fn process_data(buf: &Buffer) { + // Low-pass filter + // FFT (w/ hanning window) + info!("todo"); +}