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>
116 lines
3.7 KiB
Rust
116 lines
3.7 KiB
Rust
#[doc = "Register `INTPEND` reader"]
|
|
pub struct R(crate::R<INTPEND_SPEC>);
|
|
impl core::ops::Deref for R {
|
|
type Target = crate::R<INTPEND_SPEC>;
|
|
#[inline(always)]
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
impl From<crate::R<INTPEND_SPEC>> for R {
|
|
#[inline(always)]
|
|
fn from(reader: crate::R<INTPEND_SPEC>) -> Self {
|
|
R(reader)
|
|
}
|
|
}
|
|
#[doc = "Field `HFCLKSTARTED` reader - Read pending status of interrupt for event HFCLKSTARTED"]
|
|
pub type HFCLKSTARTED_R = crate::BitReader<HFCLKSTARTED_A>;
|
|
#[doc = "Read pending status of interrupt for event HFCLKSTARTED\n\nValue on reset: 0"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum HFCLKSTARTED_A {
|
|
#[doc = "0: Read: Not pending"]
|
|
NOT_PENDING = 0,
|
|
#[doc = "1: Read: Pending"]
|
|
PENDING = 1,
|
|
}
|
|
impl From<HFCLKSTARTED_A> for bool {
|
|
#[inline(always)]
|
|
fn from(variant: HFCLKSTARTED_A) -> Self {
|
|
variant as u8 != 0
|
|
}
|
|
}
|
|
impl HFCLKSTARTED_R {
|
|
#[doc = "Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> HFCLKSTARTED_A {
|
|
match self.bits {
|
|
false => HFCLKSTARTED_A::NOT_PENDING,
|
|
true => HFCLKSTARTED_A::PENDING,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `NOT_PENDING`"]
|
|
#[inline(always)]
|
|
pub fn is_not_pending(&self) -> bool {
|
|
*self == HFCLKSTARTED_A::NOT_PENDING
|
|
}
|
|
#[doc = "Checks if the value of the field is `PENDING`"]
|
|
#[inline(always)]
|
|
pub fn is_pending(&self) -> bool {
|
|
*self == HFCLKSTARTED_A::PENDING
|
|
}
|
|
}
|
|
#[doc = "Field `LFCLKSTARTED` reader - Read pending status of interrupt for event LFCLKSTARTED"]
|
|
pub type LFCLKSTARTED_R = crate::BitReader<LFCLKSTARTED_A>;
|
|
#[doc = "Read pending status of interrupt for event LFCLKSTARTED\n\nValue on reset: 0"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum LFCLKSTARTED_A {
|
|
#[doc = "0: Read: Not pending"]
|
|
NOT_PENDING = 0,
|
|
#[doc = "1: Read: Pending"]
|
|
PENDING = 1,
|
|
}
|
|
impl From<LFCLKSTARTED_A> for bool {
|
|
#[inline(always)]
|
|
fn from(variant: LFCLKSTARTED_A) -> Self {
|
|
variant as u8 != 0
|
|
}
|
|
}
|
|
impl LFCLKSTARTED_R {
|
|
#[doc = "Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> LFCLKSTARTED_A {
|
|
match self.bits {
|
|
false => LFCLKSTARTED_A::NOT_PENDING,
|
|
true => LFCLKSTARTED_A::PENDING,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `NOT_PENDING`"]
|
|
#[inline(always)]
|
|
pub fn is_not_pending(&self) -> bool {
|
|
*self == LFCLKSTARTED_A::NOT_PENDING
|
|
}
|
|
#[doc = "Checks if the value of the field is `PENDING`"]
|
|
#[inline(always)]
|
|
pub fn is_pending(&self) -> bool {
|
|
*self == LFCLKSTARTED_A::PENDING
|
|
}
|
|
}
|
|
impl R {
|
|
#[doc = "Bit 0 - Read pending status of interrupt for event HFCLKSTARTED"]
|
|
#[inline(always)]
|
|
pub fn hfclkstarted(&self) -> HFCLKSTARTED_R {
|
|
HFCLKSTARTED_R::new((self.bits & 1) != 0)
|
|
}
|
|
#[doc = "Bit 1 - Read pending status of interrupt for event LFCLKSTARTED"]
|
|
#[inline(always)]
|
|
pub fn lfclkstarted(&self) -> LFCLKSTARTED_R {
|
|
LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0)
|
|
}
|
|
}
|
|
#[doc = "Pending interrupts\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 [intpend](index.html) module"]
|
|
pub struct INTPEND_SPEC;
|
|
impl crate::RegisterSpec for INTPEND_SPEC {
|
|
type Ux = u32;
|
|
}
|
|
#[doc = "`read()` method returns [intpend::R](R) reader structure"]
|
|
impl crate::Readable for INTPEND_SPEC {
|
|
type Reader = R;
|
|
}
|
|
#[doc = "`reset()` method sets INTPEND to value 0"]
|
|
impl crate::Resettable for INTPEND_SPEC {
|
|
#[inline(always)]
|
|
fn reset_value() -> Self::Ux {
|
|
0
|
|
}
|
|
}
|