refactor: unified host/ communication module, cfg-free run()
- Created host/ module with internal cfg dispatch (USB vs UART) - Moved usb/task.rs → host/usb.rs, uart/task.rs → host/uart.rs - Moved protocol_io.rs → host/framing.rs - Renamed usb_task/uart_task to host_task (uniform name) - Removed all host-comm cfg from main.rs - The run() function now has ZERO board-specific conditional compilation - Deleted old usb/, uart/, protocol_io.rs modules
This commit is contained in:
1 parent
fb334118fd
commit
2c852b9f45
7 files changed
+44
-79
No files matched your search
@@ -0,0 +1,16 @@
|
||||
//! Host communication: unified USB/UART transport.
|
||||
//!
|
||||
//! Exports a single `host_task` regardless of transport.
|
||||
//! The cfg dispatch is contained entirely within this module.
|
||||
|
||||
pub mod framing;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "heltec_v3")] {
|
||||
mod uart;
|
||||
pub use uart::host_task;
|
||||
} else {
|
||||
mod usb;
|
||||
pub use usb::host_task;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user