#[doc = "Reader of register CTRL1"]
pub type R = crate::R<u32, super::CTRL1>;
#[doc = "Writer for register CTRL1"]
pub type W = crate::W<u32, super::CTRL1>;
#[doc = "Register CTRL1 `reset()`'s with value 0"]
impl crate::ResetValue for super::CTRL1 {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
#[doc = "Reader of field `CS_HOLD_DELAY`"]
pub type CS_HOLD_DELAY_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `CS_HOLD_DELAY`"]
pub struct CS_HOLD_DELAY_W<'a> {
w: &'a mut W,
}
impl<'a> CS_HOLD_DELAY_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 = "Reader of field `CS_HOLD_DELAY_RES`"]
pub type CS_HOLD_DELAY_RES_R = crate::R<u16, u16>;
#[doc = "Write proxy for field `CS_HOLD_DELAY_RES`"]
pub struct CS_HOLD_DELAY_RES_W<'a> {
w: &'a mut W,
}
impl<'a> CS_HOLD_DELAY_RES_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0fff << 16)) | (((value as u32) & 0x0fff) << 16);
self.w
}
}
impl R {
#[doc = "Bits 28:31"]
#[inline(always)]
pub fn cs_hold_delay(&self) -> CS_HOLD_DELAY_R {
CS_HOLD_DELAY_R::new(((self.bits >> 28) & 0x0f) as u8)
}
#[doc = "Bits 16:27"]
#[inline(always)]
pub fn cs_hold_delay_res(&self) -> CS_HOLD_DELAY_RES_R {
CS_HOLD_DELAY_RES_R::new(((self.bits >> 16) & 0x0fff) as u16)
}
}
impl W {
#[doc = "Bits 28:31"]
#[inline(always)]
pub fn cs_hold_delay(&mut self) -> CS_HOLD_DELAY_W {
CS_HOLD_DELAY_W { w: self }
}
#[doc = "Bits 16:27"]
#[inline(always)]
pub fn cs_hold_delay_res(&mut self) -> CS_HOLD_DELAY_RES_W {
CS_HOLD_DELAY_RES_W { w: self }
}
}