feat: add display UI with splash screen, dashboard, and RSSI sparkline
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>
This commit is contained in:
17624 files changed
+4564928
-38
No files matched your search
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `DCDCEN` reader"]
|
||||
pub struct R(crate::R<DCDCEN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DCDCEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DCDCEN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DCDCEN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DCDCEN` writer"]
|
||||
pub struct W(crate::W<DCDCEN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DCDCEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<DCDCEN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DCDCEN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DCDCEN` reader - Enable DC/DC converter"]
|
||||
pub type DCDCEN_R = crate::BitReader<DCDCEN_A>;
|
||||
#[doc = "Enable DC/DC converter\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCDCEN_A {
|
||||
#[doc = "0: DC/DC mode is disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: DC/DC mode is enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<DCDCEN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DCDCEN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DCDCEN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DCDCEN_A {
|
||||
match self.bits {
|
||||
false => DCDCEN_A::DISABLED,
|
||||
true => DCDCEN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == DCDCEN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == DCDCEN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DCDCEN` writer - Enable DC/DC converter"]
|
||||
pub type DCDCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DCDCEN_SPEC, DCDCEN_A, O>;
|
||||
impl<'a, const O: u8> DCDCEN_W<'a, O> {
|
||||
#[doc = "DC/DC mode is disabled"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(DCDCEN_A::DISABLED)
|
||||
}
|
||||
#[doc = "DC/DC mode is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(DCDCEN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable DC/DC converter"]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&self) -> DCDCEN_R {
|
||||
DCDCEN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable DC/DC converter"]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&mut self) -> DCDCEN_W<0> {
|
||||
DCDCEN_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Enable DC/DC mode of the main voltage regulator.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dcdcen](index.html) module"]
|
||||
pub struct DCDCEN_SPEC;
|
||||
impl crate::RegisterSpec for DCDCEN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [dcdcen::R](R) reader structure"]
|
||||
impl crate::Readable for DCDCEN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [dcdcen::W](W) writer structure"]
|
||||
impl crate::Writable for DCDCEN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DCDCEN to value 0"]
|
||||
impl crate::Resettable for DCDCEN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `EXTPOFCON` reader"]
|
||||
pub struct R(crate::R<EXTPOFCON_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EXTPOFCON_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EXTPOFCON_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EXTPOFCON_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EXTPOFCON` writer"]
|
||||
pub struct W(crate::W<EXTPOFCON_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EXTPOFCON_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EXTPOFCON_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EXTPOFCON_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `POF` reader - Enable or disable external power failure warning"]
|
||||
pub type POF_R = crate::BitReader<POF_A>;
|
||||
#[doc = "Enable or disable external power failure warning\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum POF_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<POF_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: POF_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl POF_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> POF_A {
|
||||
match self.bits {
|
||||
false => POF_A::DISABLED,
|
||||
true => POF_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == POF_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == POF_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `POF` writer - Enable or disable external power failure warning"]
|
||||
pub type POF_W<'a, const O: u8> = crate::BitWriter<'a, u32, EXTPOFCON_SPEC, POF_A, O>;
|
||||
impl<'a, const O: u8> POF_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(POF_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(POF_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable or disable external power failure warning"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&self) -> POF_R {
|
||||
POF_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable or disable external power failure warning"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&mut self) -> POF_W<0> {
|
||||
POF_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "External power failure warning configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [extpofcon](index.html) module"]
|
||||
pub struct EXTPOFCON_SPEC;
|
||||
impl crate::RegisterSpec for EXTPOFCON_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [extpofcon::R](R) reader structure"]
|
||||
impl crate::Readable for EXTPOFCON_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [extpofcon::W](W) writer structure"]
|
||||
impl crate::Writable for EXTPOFCON_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EXTPOFCON to value 0"]
|
||||
impl crate::Resettable for EXTPOFCON_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
#[doc = "Register `SYSTEMOFF` writer"]
|
||||
pub struct W(crate::W<SYSTEMOFF_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SYSTEMOFF_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<SYSTEMOFF_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SYSTEMOFF_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Enable System OFF mode\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SYSTEMOFF_AW {
|
||||
#[doc = "1: Enable System OFF mode"]
|
||||
ENABLE = 1,
|
||||
}
|
||||
impl From<SYSTEMOFF_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: SYSTEMOFF_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SYSTEMOFF` writer - Enable System OFF mode"]
|
||||
pub type SYSTEMOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SYSTEMOFF_SPEC, SYSTEMOFF_AW, O>;
|
||||
impl<'a, const O: u8> SYSTEMOFF_W<'a, O> {
|
||||
#[doc = "Enable System OFF mode"]
|
||||
#[inline(always)]
|
||||
pub fn enable(self) -> &'a mut W {
|
||||
self.variant(SYSTEMOFF_AW::ENABLE)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable System OFF mode"]
|
||||
#[inline(always)]
|
||||
pub fn systemoff(&mut self) -> SYSTEMOFF_W<0> {
|
||||
SYSTEMOFF_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "System OFF register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [systemoff](index.html) module"]
|
||||
pub struct SYSTEMOFF_SPEC;
|
||||
impl crate::RegisterSpec for SYSTEMOFF_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [systemoff::W](W) writer structure"]
|
||||
impl crate::Writable for SYSTEMOFF_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SYSTEMOFF to value 0"]
|
||||
impl crate::Resettable for SYSTEMOFF_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user