This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/vendor/esp32s3/src/efuse/cmd.rs
T
swaitsandClaude Opus 4.6 3102fc747a 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>
2026-03-29 20:42:54 -06:00

78 lines
3.5 KiB
Rust

#[doc = "Register `CMD` reader"]
pub type R = crate::R<CMD_SPEC>;
#[doc = "Register `CMD` writer"]
pub type W = crate::W<CMD_SPEC>;
#[doc = "Field `READ_CMD` reader - Set this bit to send read command."]
pub type READ_CMD_R = crate::BitReader;
#[doc = "Field `READ_CMD` writer - Set this bit to send read command."]
pub type READ_CMD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PGM_CMD` reader - Set this bit to send programming command."]
pub type PGM_CMD_R = crate::BitReader;
#[doc = "Field `PGM_CMD` writer - Set this bit to send programming command."]
pub type PGM_CMD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `BLK_NUM` reader - The serial number of the block to be programmed. Value 0-10 corresponds to block number 0-10, respectively."]
pub type BLK_NUM_R = crate::FieldReader;
#[doc = "Field `BLK_NUM` writer - The serial number of the block to be programmed. Value 0-10 corresponds to block number 0-10, respectively."]
pub type BLK_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[doc = "Bit 0 - Set this bit to send read command."]
#[inline(always)]
pub fn read_cmd(&self) -> READ_CMD_R {
READ_CMD_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Set this bit to send programming command."]
#[inline(always)]
pub fn pgm_cmd(&self) -> PGM_CMD_R {
PGM_CMD_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bits 2:5 - The serial number of the block to be programmed. Value 0-10 corresponds to block number 0-10, respectively."]
#[inline(always)]
pub fn blk_num(&self) -> BLK_NUM_R {
BLK_NUM_R::new(((self.bits >> 2) & 0x0f) as u8)
}
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CMD")
.field("read_cmd", &self.read_cmd())
.field("pgm_cmd", &self.pgm_cmd())
.field("blk_num", &self.blk_num())
.finish()
}
}
impl W {
#[doc = "Bit 0 - Set this bit to send read command."]
#[inline(always)]
pub fn read_cmd(&mut self) -> READ_CMD_W<CMD_SPEC> {
READ_CMD_W::new(self, 0)
}
#[doc = "Bit 1 - Set this bit to send programming command."]
#[inline(always)]
pub fn pgm_cmd(&mut self) -> PGM_CMD_W<CMD_SPEC> {
PGM_CMD_W::new(self, 1)
}
#[doc = "Bits 2:5 - The serial number of the block to be programmed. Value 0-10 corresponds to block number 0-10, respectively."]
#[inline(always)]
pub fn blk_num(&mut self) -> BLK_NUM_W<CMD_SPEC> {
BLK_NUM_W::new(self, 2)
}
}
#[doc = "eFuse command register.\n\nYou can [`read`](crate::Reg::read) this register and get [`cmd::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CMD_SPEC;
impl crate::RegisterSpec for CMD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [`cmd::R`](R) reader structure"]
impl crate::Readable for CMD_SPEC {}
#[doc = "`write(|w| ..)` method takes [`cmd::W`](W) writer structure"]
impl crate::Writable for CMD_SPEC {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CMD to value 0"]
impl crate::Resettable for CMD_SPEC {
const RESET_VALUE: u32 = 0;
}