feat: Heltec V3 native USB, remove all dead_code suppressions
- heltec_v3 now uses USB OTG (requires hardware mod: solder R29/R3) - heltec_v3_uart added as fallback for stock boards - Removed every #[allow(dead_code)] — fixed root causes instead: - Comm types (UsbParts/UartParts) moved to individual board files - USB/UART init removed from hal (boards call esp-hal directly) - SH1106 driver gated on boards that use it - UART task sends DisplayCommand::Reset at startup (variant now used) - ErrorCode::CrcError removed (SX1262 drops bad-CRC silently) - check/clippy now use --release (no more Xtensa dev-mode warnings) - Updated README with hardware mod docs and board table
This commit is contained in:
1 parent
6db287c241
commit
2b9e236f32
10 files changed
+61
-79
No files matched your search
+3
-13
@@ -1,7 +1,8 @@
|
||||
//! Shared types and peripheral wiring for ESP32-S3 boards.
|
||||
//!
|
||||
//! Delegates MCU-level init to `hal::esp32s3` and defines peripheral-level
|
||||
//! types (RadioDriver, Parts structs) used by ESP32-S3 board files.
|
||||
//! types (RadioDriver, display) used by ESP32-S3 board files.
|
||||
//! Each board defines its own comm types (UsbParts/UartParts) directly.
|
||||
|
||||
use embassy_embedded_hal::shared_bus::asynch::spi::SpiDevice;
|
||||
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
@@ -15,8 +16,7 @@ use crate::hal::esp32s3 as mcu;
|
||||
|
||||
// ── Re-export MCU types ─────────────────────────────────────────────
|
||||
|
||||
#[allow(unused_imports)] // Each board uses one of USB/UART, not both
|
||||
pub use mcu::{I2cBus as DisplayI2c, SpiBus, UartDriver, UsbOtgDriver as UsbDriver};
|
||||
pub use mcu::{I2cBus as DisplayI2c, SpiBus};
|
||||
|
||||
// ── Concrete peripheral types ───────────────────────────────────────
|
||||
|
||||
@@ -32,16 +32,6 @@ pub struct RadioParts {
|
||||
pub delay: Delay,
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // Not used by heltec_v3_uart
|
||||
pub struct UsbParts {
|
||||
pub driver: UsbDriver,
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // Only used by heltec_v3_uart
|
||||
pub struct UartParts {
|
||||
pub driver: UartDriver,
|
||||
}
|
||||
|
||||
pub struct DisplayParts {
|
||||
pub i2c: DisplayI2c,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user