feat: initial lora-dongle firmware scaffold
Transparent LoRa-over-USB dongle firmware supporting Heltec V3 (ESP32-S3) and RAK 4631 (nRF52840) boards. Actor-model architecture with typed channels between USB, radio, and display tasks. - Protocol: Command/Response enums with COBS+postcard framing design - Board abstraction: auto-discovered via build.rs Jinja2 codegen - Radio task: SX1262 state machine (Idle → Receiving ↔ Transmitting) - Display task: optional SSD1306 dashboard via StatusWatch - RAK 4631: fully wired SPI/USB/I2C peripherals, clippy-clean - Heltec V3: structure in place, awaits espup Xtensa toolchain
This commit is contained in:
20 files changed
+2599
No files matched your search
@@ -0,0 +1,26 @@
|
||||
use embassy_executor::task;
|
||||
|
||||
use crate::board::UsbParts;
|
||||
use crate::channel::{CommandChannel, ResponseChannel};
|
||||
|
||||
#[task]
|
||||
pub async fn usb_task(
|
||||
parts: UsbParts,
|
||||
commands: &'static CommandChannel,
|
||||
responses: &'static ResponseChannel,
|
||||
) {
|
||||
let _driver = parts.driver;
|
||||
let _ = commands;
|
||||
let _ = responses;
|
||||
|
||||
// TODO: build embassy_usb CDC-ACM class from driver
|
||||
// TODO: COBS-framed postcard ser/de loop:
|
||||
// select! {
|
||||
// bytes = cdc_read() => deserialize Command → commands.send()
|
||||
// resp = responses.receive() => serialize Response → cdc_write()
|
||||
// }
|
||||
|
||||
loop {
|
||||
embassy_time::Timer::after_secs(1).await;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user