Implement full SSD1306 OLED display support: - Splash screen on boot (1.5s) with project name, version, board - Dashboard showing radio state, config, counters, RSSI/SNR - RSSI history sparkline (64-sample ring buffer, 2px-wide bars) - DisplayOn/DisplayOff host commands routed via dedicated channel - Pure render functions against generic DrawTarget (no hardware coupling) - Display on/off control bypasses radio task entirely Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
54 lines
3.6 KiB
Rust
54 lines
3.6 KiB
Rust
#[repr(C)]
|
|
#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
|
|
#[doc = "Register block"]
|
|
pub struct RegisterBlock {
|
|
sigmadelta: [SIGMADELTA; 8],
|
|
clock_gate: CLOCK_GATE,
|
|
sigmadelta_misc: SIGMADELTA_MISC,
|
|
version: VERSION,
|
|
}
|
|
impl RegisterBlock {
|
|
#[doc = "0x00..0x20 - Duty Cycle Configure Register of SDM%s"]
|
|
#[inline(always)]
|
|
pub const fn sigmadelta(&self, n: usize) -> &SIGMADELTA {
|
|
&self.sigmadelta[n]
|
|
}
|
|
#[doc = "Iterator for array of:"]
|
|
#[doc = "0x00..0x20 - Duty Cycle Configure Register of SDM%s"]
|
|
#[inline(always)]
|
|
pub fn sigmadelta_iter(&self) -> impl Iterator<Item = &SIGMADELTA> {
|
|
self.sigmadelta.iter()
|
|
}
|
|
#[doc = "0x20 - Clock Gating Configure Register"]
|
|
#[inline(always)]
|
|
pub const fn clock_gate(&self) -> &CLOCK_GATE {
|
|
&self.clock_gate
|
|
}
|
|
#[doc = "0x24 - MISC Register"]
|
|
#[inline(always)]
|
|
pub const fn sigmadelta_misc(&self) -> &SIGMADELTA_MISC {
|
|
&self.sigmadelta_misc
|
|
}
|
|
#[doc = "0x28 - Version Control Register"]
|
|
#[inline(always)]
|
|
pub const fn version(&self) -> &VERSION {
|
|
&self.version
|
|
}
|
|
}
|
|
#[doc = "SIGMADELTA (rw) register accessor: Duty Cycle Configure Register of SDM%s\n\nYou can [`read`](crate::Reg::read) this register and get [`sigmadelta::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sigmadelta::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sigmadelta`] module"]
|
|
pub type SIGMADELTA = crate::Reg<sigmadelta::SIGMADELTA_SPEC>;
|
|
#[doc = "Duty Cycle Configure Register of SDM%s"]
|
|
pub mod sigmadelta;
|
|
#[doc = "CLOCK_GATE (rw) register accessor: Clock Gating Configure Register\n\nYou can [`read`](crate::Reg::read) this register and get [`clock_gate::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clock_gate::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@clock_gate`] module"]
|
|
pub type CLOCK_GATE = crate::Reg<clock_gate::CLOCK_GATE_SPEC>;
|
|
#[doc = "Clock Gating Configure Register"]
|
|
pub mod clock_gate;
|
|
#[doc = "SIGMADELTA_MISC (rw) register accessor: MISC Register\n\nYou can [`read`](crate::Reg::read) this register and get [`sigmadelta_misc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sigmadelta_misc::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sigmadelta_misc`] module"]
|
|
pub type SIGMADELTA_MISC = crate::Reg<sigmadelta_misc::SIGMADELTA_MISC_SPEC>;
|
|
#[doc = "MISC Register"]
|
|
pub mod sigmadelta_misc;
|
|
#[doc = "VERSION (rw) register accessor: Version Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`version::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`version::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@version`] module"]
|
|
pub type VERSION = crate::Reg<version::VERSION_SPEC>;
|
|
#[doc = "Version Control Register"]
|
|
pub mod version;
|