#[doc = "Register `BLK0_RDATA5` reader"]
pub struct R(crate::R<BLK0_RDATA5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BLK0_RDATA5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<BLK0_RDATA5_SPEC>> for R {
fn from(reader: crate::R<BLK0_RDATA5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BLK0_RDATA5` writer"]
pub struct W(crate::W<BLK0_RDATA5_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BLK0_RDATA5_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 core::convert::From<crate::W<BLK0_RDATA5_SPEC>> for W {
fn from(writer: crate::W<BLK0_RDATA5_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RD_FLASH_CRYPT_CONFIG` reader - "]
pub struct RD_FLASH_CRYPT_CONFIG_R(crate::FieldReader<u8, u8>);
impl RD_FLASH_CRYPT_CONFIG_R {
pub(crate) fn new(bits: u8) -> Self {
RD_FLASH_CRYPT_CONFIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RD_FLASH_CRYPT_CONFIG_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RD_FLASH_CRYPT_CONFIG` writer - "]
pub struct RD_FLASH_CRYPT_CONFIG_W<'a> {
w: &'a mut W,
}
impl<'a> RD_FLASH_CRYPT_CONFIG_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 28)) | (((value as u32) & 0x0f) << 28);
self.w
}
}
#[doc = "Field `RD_INST_CONFIG` reader - "]
pub struct RD_INST_CONFIG_R(crate::FieldReader<u8, u8>);
impl RD_INST_CONFIG_R {
pub(crate) fn new(bits: u8) -> Self {
RD_INST_CONFIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RD_INST_CONFIG_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RD_INST_CONFIG` writer - "]
pub struct RD_INST_CONFIG_W<'a> {
w: &'a mut W,
}
impl<'a> RD_INST_CONFIG_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 20)) | (((value as u32) & 0xff) << 20);
self.w
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_D` reader - "]
pub struct RD_SPI_PAD_CONFIG_D_R(crate::FieldReader<u8, u8>);
impl RD_SPI_PAD_CONFIG_D_R {
pub(crate) fn new(bits: u8) -> Self {
RD_SPI_PAD_CONFIG_D_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RD_SPI_PAD_CONFIG_D_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_D` writer - "]
pub struct RD_SPI_PAD_CONFIG_D_W<'a> {
w: &'a mut W,
}
impl<'a> RD_SPI_PAD_CONFIG_D_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10);
self.w
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_Q` reader - "]
pub struct RD_SPI_PAD_CONFIG_Q_R(crate::FieldReader<u8, u8>);
impl RD_SPI_PAD_CONFIG_Q_R {
pub(crate) fn new(bits: u8) -> Self {
RD_SPI_PAD_CONFIG_Q_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RD_SPI_PAD_CONFIG_Q_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_Q` writer - "]
pub struct RD_SPI_PAD_CONFIG_Q_W<'a> {
w: &'a mut W,
}
impl<'a> RD_SPI_PAD_CONFIG_Q_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5);
self.w
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_CLK` reader - "]
pub struct RD_SPI_PAD_CONFIG_CLK_R(crate::FieldReader<u8, u8>);
impl RD_SPI_PAD_CONFIG_CLK_R {
pub(crate) fn new(bits: u8) -> Self {
RD_SPI_PAD_CONFIG_CLK_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RD_SPI_PAD_CONFIG_CLK_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RD_SPI_PAD_CONFIG_CLK` writer - "]
pub struct RD_SPI_PAD_CONFIG_CLK_W<'a> {
w: &'a mut W,
}
impl<'a> RD_SPI_PAD_CONFIG_CLK_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f);
self.w
}
}
impl R {
#[doc = "Bits 28:31"]
#[inline(always)]
pub fn rd_flash_crypt_config(&self) -> RD_FLASH_CRYPT_CONFIG_R {
RD_FLASH_CRYPT_CONFIG_R::new(((self.bits >> 28) & 0x0f) as u8)
}
#[doc = "Bits 20:27"]
#[inline(always)]
pub fn rd_inst_config(&self) -> RD_INST_CONFIG_R {
RD_INST_CONFIG_R::new(((self.bits >> 20) & 0xff) as u8)
}
#[doc = "Bits 10:14"]
#[inline(always)]
pub fn rd_spi_pad_config_d(&self) -> RD_SPI_PAD_CONFIG_D_R {
RD_SPI_PAD_CONFIG_D_R::new(((self.bits >> 10) & 0x1f) as u8)
}
#[doc = "Bits 5:9"]
#[inline(always)]
pub fn rd_spi_pad_config_q(&self) -> RD_SPI_PAD_CONFIG_Q_R {
RD_SPI_PAD_CONFIG_Q_R::new(((self.bits >> 5) & 0x1f) as u8)
}
#[doc = "Bits 0:4"]
#[inline(always)]
pub fn rd_spi_pad_config_clk(&self) -> RD_SPI_PAD_CONFIG_CLK_R {
RD_SPI_PAD_CONFIG_CLK_R::new((self.bits & 0x1f) as u8)
}
}
impl W {
#[doc = "Bits 28:31"]
#[inline(always)]
pub fn rd_flash_crypt_config(&mut self) -> RD_FLASH_CRYPT_CONFIG_W {
RD_FLASH_CRYPT_CONFIG_W { w: self }
}
#[doc = "Bits 20:27"]
#[inline(always)]
pub fn rd_inst_config(&mut self) -> RD_INST_CONFIG_W {
RD_INST_CONFIG_W { w: self }
}
#[doc = "Bits 10:14"]
#[inline(always)]
pub fn rd_spi_pad_config_d(&mut self) -> RD_SPI_PAD_CONFIG_D_W {
RD_SPI_PAD_CONFIG_D_W { w: self }
}
#[doc = "Bits 5:9"]
#[inline(always)]
pub fn rd_spi_pad_config_q(&mut self) -> RD_SPI_PAD_CONFIG_Q_W {
RD_SPI_PAD_CONFIG_Q_W { w: self }
}
#[doc = "Bits 0:4"]
#[inline(always)]
pub fn rd_spi_pad_config_clk(&mut self) -> RD_SPI_PAD_CONFIG_CLK_W {
RD_SPI_PAD_CONFIG_CLK_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "EFUSE_BLK0_RDATA5\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 [blk0_rdata5](index.html) module"]
pub struct BLK0_RDATA5_SPEC;
impl crate::RegisterSpec for BLK0_RDATA5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [blk0_rdata5::R](R) reader structure"]
impl crate::Readable for BLK0_RDATA5_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [blk0_rdata5::W](W) writer structure"]
impl crate::Writable for BLK0_RDATA5_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BLK0_RDATA5 to value 0"]
impl crate::Resettable for BLK0_RDATA5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}