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>
77 lines
2.1 KiB
Rust
77 lines
2.1 KiB
Rust
#[doc = "Register `PART` reader"]
|
|
pub struct R(crate::R<PART_SPEC>);
|
|
impl core::ops::Deref for R {
|
|
type Target = crate::R<PART_SPEC>;
|
|
#[inline(always)]
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
impl From<crate::R<PART_SPEC>> for R {
|
|
#[inline(always)]
|
|
fn from(reader: crate::R<PART_SPEC>) -> Self {
|
|
R(reader)
|
|
}
|
|
}
|
|
#[doc = "Field `PART` reader - Part code"]
|
|
pub type PART_R = crate::FieldReader<u32, PART_A>;
|
|
#[doc = "Part code\n\nValue on reset: 337970"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
#[repr(u32)]
|
|
pub enum PART_A {
|
|
#[doc = "337970: nRF52832"]
|
|
N52832 = 337970,
|
|
#[doc = "4294967295: Unspecified"]
|
|
UNSPECIFIED = 4294967295,
|
|
}
|
|
impl From<PART_A> for u32 {
|
|
#[inline(always)]
|
|
fn from(variant: PART_A) -> Self {
|
|
variant as _
|
|
}
|
|
}
|
|
impl PART_R {
|
|
#[doc = "Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> Option<PART_A> {
|
|
match self.bits {
|
|
337970 => Some(PART_A::N52832),
|
|
4294967295 => Some(PART_A::UNSPECIFIED),
|
|
_ => None,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `N52832`"]
|
|
#[inline(always)]
|
|
pub fn is_n52832(&self) -> bool {
|
|
*self == PART_A::N52832
|
|
}
|
|
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
|
#[inline(always)]
|
|
pub fn is_unspecified(&self) -> bool {
|
|
*self == PART_A::UNSPECIFIED
|
|
}
|
|
}
|
|
impl R {
|
|
#[doc = "Bits 0:31 - Part code"]
|
|
#[inline(always)]
|
|
pub fn part(&self) -> PART_R {
|
|
PART_R::new(self.bits)
|
|
}
|
|
}
|
|
#[doc = "Part code\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [part](index.html) module"]
|
|
pub struct PART_SPEC;
|
|
impl crate::RegisterSpec for PART_SPEC {
|
|
type Ux = u32;
|
|
}
|
|
#[doc = "`read()` method returns [part::R](R) reader structure"]
|
|
impl crate::Readable for PART_SPEC {
|
|
type Reader = R;
|
|
}
|
|
#[doc = "`reset()` method sets PART to value 0x0005_2832"]
|
|
impl crate::Resettable for PART_SPEC {
|
|
#[inline(always)]
|
|
fn reset_value() -> Self::Ux {
|
|
0x0005_2832
|
|
}
|
|
}
|