pub type R = crate::R<INI3_FN_MODrs>;
pub type W = crate::W<INI3_FN_MODrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum READ_ISS_OVERRIDE {
Normal = 0,
Force1 = 1,
}
impl From<READ_ISS_OVERRIDE> for bool {
#[inline(always)]
fn from(variant: READ_ISS_OVERRIDE) -> Self {
variant as u8 != 0
}
}
pub type READ_ISS_OVERRIDE_R = crate::BitReader<READ_ISS_OVERRIDE>;
impl READ_ISS_OVERRIDE_R {
#[inline(always)]
pub const fn variant(&self) -> READ_ISS_OVERRIDE {
match self.bits {
false => READ_ISS_OVERRIDE::Normal,
true => READ_ISS_OVERRIDE::Force1,
}
}
#[inline(always)]
pub fn is_normal(&self) -> bool {
*self == READ_ISS_OVERRIDE::Normal
}
#[inline(always)]
pub fn is_force1(&self) -> bool {
*self == READ_ISS_OVERRIDE::Force1
}
}
pub type READ_ISS_OVERRIDE_W<'a, REG> = crate::BitWriter<'a, REG, READ_ISS_OVERRIDE>;
impl<'a, REG> READ_ISS_OVERRIDE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn normal(self) -> &'a mut crate::W<REG> {
self.variant(READ_ISS_OVERRIDE::Normal)
}
#[inline(always)]
pub fn force1(self) -> &'a mut crate::W<REG> {
self.variant(READ_ISS_OVERRIDE::Force1)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WRITE_ISS_OVERRIDE {
Normal = 0,
Force1 = 1,
}
impl From<WRITE_ISS_OVERRIDE> for bool {
#[inline(always)]
fn from(variant: WRITE_ISS_OVERRIDE) -> Self {
variant as u8 != 0
}
}
pub type WRITE_ISS_OVERRIDE_R = crate::BitReader<WRITE_ISS_OVERRIDE>;
impl WRITE_ISS_OVERRIDE_R {
#[inline(always)]
pub const fn variant(&self) -> WRITE_ISS_OVERRIDE {
match self.bits {
false => WRITE_ISS_OVERRIDE::Normal,
true => WRITE_ISS_OVERRIDE::Force1,
}
}
#[inline(always)]
pub fn is_normal(&self) -> bool {
*self == WRITE_ISS_OVERRIDE::Normal
}
#[inline(always)]
pub fn is_force1(&self) -> bool {
*self == WRITE_ISS_OVERRIDE::Force1
}
}
pub type WRITE_ISS_OVERRIDE_W<'a, REG> = crate::BitWriter<'a, REG, WRITE_ISS_OVERRIDE>;
impl<'a, REG> WRITE_ISS_OVERRIDE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn normal(self) -> &'a mut crate::W<REG> {
self.variant(WRITE_ISS_OVERRIDE::Normal)
}
#[inline(always)]
pub fn force1(self) -> &'a mut crate::W<REG> {
self.variant(WRITE_ISS_OVERRIDE::Force1)
}
}
impl R {
#[inline(always)]
pub fn read_iss_override(&self) -> READ_ISS_OVERRIDE_R {
READ_ISS_OVERRIDE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn write_iss_override(&self) -> WRITE_ISS_OVERRIDE_R {
WRITE_ISS_OVERRIDE_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("INI3_FN_MOD")
.field("read_iss_override", &self.read_iss_override())
.field("write_iss_override", &self.write_iss_override())
.finish()
}
}
impl W {
#[inline(always)]
pub fn read_iss_override(&mut self) -> READ_ISS_OVERRIDE_W<INI3_FN_MODrs> {
READ_ISS_OVERRIDE_W::new(self, 0)
}
#[inline(always)]
pub fn write_iss_override(&mut self) -> WRITE_ISS_OVERRIDE_W<INI3_FN_MODrs> {
WRITE_ISS_OVERRIDE_W::new(self, 1)
}
}
pub struct INI3_FN_MODrs;
impl crate::RegisterSpec for INI3_FN_MODrs {
type Ux = u32;
}
impl crate::Readable for INI3_FN_MODrs {}
impl crate::Writable for INI3_FN_MODrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for INI3_FN_MODrs {
const RESET_VALUE: u32 = 0x04;
}