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.2 KiB
Rust
77 lines
2.2 KiB
Rust
#[doc = "Register `PPFC` reader"]
|
|
pub struct R(crate::R<PPFC_SPEC>);
|
|
impl core::ops::Deref for R {
|
|
type Target = crate::R<PPFC_SPEC>;
|
|
#[inline(always)]
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
impl From<crate::R<PPFC_SPEC>> for R {
|
|
#[inline(always)]
|
|
fn from(reader: crate::R<PPFC_SPEC>) -> Self {
|
|
R(reader)
|
|
}
|
|
}
|
|
#[doc = "Field `PPFC` reader - Pre-programmed factory code present."]
|
|
pub type PPFC_R = crate::FieldReader<u8, PPFC_A>;
|
|
#[doc = "Pre-programmed factory code present.\n\nValue on reset: 255"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
#[repr(u8)]
|
|
pub enum PPFC_A {
|
|
#[doc = "255: Not present."]
|
|
NOT_PRESENT = 255,
|
|
#[doc = "0: Present."]
|
|
PRESENT = 0,
|
|
}
|
|
impl From<PPFC_A> for u8 {
|
|
#[inline(always)]
|
|
fn from(variant: PPFC_A) -> Self {
|
|
variant as _
|
|
}
|
|
}
|
|
impl PPFC_R {
|
|
#[doc = "Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> Option<PPFC_A> {
|
|
match self.bits {
|
|
255 => Some(PPFC_A::NOT_PRESENT),
|
|
0 => Some(PPFC_A::PRESENT),
|
|
_ => None,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `NOT_PRESENT`"]
|
|
#[inline(always)]
|
|
pub fn is_not_present(&self) -> bool {
|
|
*self == PPFC_A::NOT_PRESENT
|
|
}
|
|
#[doc = "Checks if the value of the field is `PRESENT`"]
|
|
#[inline(always)]
|
|
pub fn is_present(&self) -> bool {
|
|
*self == PPFC_A::PRESENT
|
|
}
|
|
}
|
|
impl R {
|
|
#[doc = "Bits 0:7 - Pre-programmed factory code present."]
|
|
#[inline(always)]
|
|
pub fn ppfc(&self) -> PPFC_R {
|
|
PPFC_R::new((self.bits & 0xff) as u8)
|
|
}
|
|
}
|
|
#[doc = "Pre-programmed factory code present.\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 [ppfc](index.html) module"]
|
|
pub struct PPFC_SPEC;
|
|
impl crate::RegisterSpec for PPFC_SPEC {
|
|
type Ux = u32;
|
|
}
|
|
#[doc = "`read()` method returns [ppfc::R](R) reader structure"]
|
|
impl crate::Readable for PPFC_SPEC {
|
|
type Reader = R;
|
|
}
|
|
#[doc = "`reset()` method sets PPFC to value 0xffff_ffff"]
|
|
impl crate::Resettable for PPFC_SPEC {
|
|
#[inline(always)]
|
|
fn reset_value() -> Self::Ux {
|
|
0xffff_ffff
|
|
}
|
|
}
|