pub type R = crate::R<SRrs>;
pub type W = crate::W<SRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOPR {
Inactive = 0,
Active = 1,
}
impl From<EOPR> for bool {
#[inline(always)]
fn from(variant: EOPR) -> Self {
variant as u8 != 0
}
}
pub type EOP_R = crate::BitReader<EOPR>;
impl EOP_R {
#[inline(always)]
pub const fn variant(&self) -> EOPR {
match self.bits {
false => EOPR::Inactive,
true => EOPR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == EOPR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == EOPR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOPW {
Clear = 1,
}
impl From<EOPW> for bool {
#[inline(always)]
fn from(variant: EOPW) -> Self {
variant as u8 != 0
}
}
pub type EOP_W<'a, REG> = crate::BitWriter1C<'a, REG, EOPW>;
impl<'a, REG> EOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOPW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OPERRR {
Inactive = 0,
Active = 1,
}
impl From<OPERRR> for bool {
#[inline(always)]
fn from(variant: OPERRR) -> Self {
variant as u8 != 0
}
}
pub type OPERR_R = crate::BitReader<OPERRR>;
impl OPERR_R {
#[inline(always)]
pub const fn variant(&self) -> OPERRR {
match self.bits {
false => OPERRR::Inactive,
true => OPERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == OPERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == OPERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OPERRW {
Clear = 1,
}
impl From<OPERRW> for bool {
#[inline(always)]
fn from(variant: OPERRW) -> Self {
variant as u8 != 0
}
}
pub type OPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, OPERRW>;
impl<'a, REG> OPERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(OPERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WRPERRR {
Inactive = 0,
Active = 1,
}
impl From<WRPERRR> for bool {
#[inline(always)]
fn from(variant: WRPERRR) -> Self {
variant as u8 != 0
}
}
pub type WRPERR_R = crate::BitReader<WRPERRR>;
impl WRPERR_R {
#[inline(always)]
pub const fn variant(&self) -> WRPERRR {
match self.bits {
false => WRPERRR::Inactive,
true => WRPERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == WRPERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == WRPERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WRPERRW {
Clear = 1,
}
impl From<WRPERRW> for bool {
#[inline(always)]
fn from(variant: WRPERRW) -> Self {
variant as u8 != 0
}
}
pub type WRPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, WRPERRW>;
impl<'a, REG> WRPERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(WRPERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGAERRR {
Inactive = 0,
Active = 1,
}
impl From<PGAERRR> for bool {
#[inline(always)]
fn from(variant: PGAERRR) -> Self {
variant as u8 != 0
}
}
pub type PGAERR_R = crate::BitReader<PGAERRR>;
impl PGAERR_R {
#[inline(always)]
pub const fn variant(&self) -> PGAERRR {
match self.bits {
false => PGAERRR::Inactive,
true => PGAERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == PGAERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == PGAERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGAERRW {
Clear = 1,
}
impl From<PGAERRW> for bool {
#[inline(always)]
fn from(variant: PGAERRW) -> Self {
variant as u8 != 0
}
}
pub type PGAERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGAERRW>;
impl<'a, REG> PGAERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(PGAERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGPERRR {
Inactive = 0,
Active = 1,
}
impl From<PGPERRR> for bool {
#[inline(always)]
fn from(variant: PGPERRR) -> Self {
variant as u8 != 0
}
}
pub type PGPERR_R = crate::BitReader<PGPERRR>;
impl PGPERR_R {
#[inline(always)]
pub const fn variant(&self) -> PGPERRR {
match self.bits {
false => PGPERRR::Inactive,
true => PGPERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == PGPERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == PGPERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGPERRW {
Clear = 1,
}
impl From<PGPERRW> for bool {
#[inline(always)]
fn from(variant: PGPERRW) -> Self {
variant as u8 != 0
}
}
pub type PGPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGPERRW>;
impl<'a, REG> PGPERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(PGPERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGSERRR {
Inactive = 0,
Active = 1,
}
impl From<PGSERRR> for bool {
#[inline(always)]
fn from(variant: PGSERRR) -> Self {
variant as u8 != 0
}
}
pub type PGSERR_R = crate::BitReader<PGSERRR>;
impl PGSERR_R {
#[inline(always)]
pub const fn variant(&self) -> PGSERRR {
match self.bits {
false => PGSERRR::Inactive,
true => PGSERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == PGSERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == PGSERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PGSERRW {
Clear = 1,
}
impl From<PGSERRW> for bool {
#[inline(always)]
fn from(variant: PGSERRW) -> Self {
variant as u8 != 0
}
}
pub type PGSERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGSERRW>;
impl<'a, REG> PGSERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(PGSERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RDERRR {
Inactive = 0,
Active = 1,
}
impl From<RDERRR> for bool {
#[inline(always)]
fn from(variant: RDERRR) -> Self {
variant as u8 != 0
}
}
pub type RDERR_R = crate::BitReader<RDERRR>;
impl RDERR_R {
#[inline(always)]
pub const fn variant(&self) -> RDERRR {
match self.bits {
false => RDERRR::Inactive,
true => RDERRR::Active,
}
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == RDERRR::Inactive
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == RDERRR::Active
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RDERRW {
Clear = 1,
}
impl From<RDERRW> for bool {
#[inline(always)]
fn from(variant: RDERRW) -> Self {
variant as u8 != 0
}
}
pub type RDERR_W<'a, REG> = crate::BitWriter1C<'a, REG, RDERRW>;
impl<'a, REG> RDERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(RDERRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BSYR {
NotBusy = 0,
Busy = 1,
}
impl From<BSYR> for bool {
#[inline(always)]
fn from(variant: BSYR) -> Self {
variant as u8 != 0
}
}
pub type BSY_R = crate::BitReader<BSYR>;
impl BSY_R {
#[inline(always)]
pub const fn variant(&self) -> BSYR {
match self.bits {
false => BSYR::NotBusy,
true => BSYR::Busy,
}
}
#[inline(always)]
pub fn is_not_busy(&self) -> bool {
*self == BSYR::NotBusy
}
#[inline(always)]
pub fn is_busy(&self) -> bool {
*self == BSYR::Busy
}
}
impl R {
#[inline(always)]
pub fn eop(&self) -> EOP_R {
EOP_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn operr(&self) -> OPERR_R {
OPERR_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn wrperr(&self) -> WRPERR_R {
WRPERR_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn pgaerr(&self) -> PGAERR_R {
PGAERR_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn pgperr(&self) -> PGPERR_R {
PGPERR_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn pgserr(&self) -> PGSERR_R {
PGSERR_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn rderr(&self) -> RDERR_R {
RDERR_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn bsy(&self) -> BSY_R {
BSY_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("eop", &self.eop())
.field("operr", &self.operr())
.field("wrperr", &self.wrperr())
.field("pgaerr", &self.pgaerr())
.field("pgperr", &self.pgperr())
.field("pgserr", &self.pgserr())
.field("bsy", &self.bsy())
.field("rderr", &self.rderr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn eop(&mut self) -> EOP_W<SRrs> {
EOP_W::new(self, 0)
}
#[inline(always)]
pub fn operr(&mut self) -> OPERR_W<SRrs> {
OPERR_W::new(self, 1)
}
#[inline(always)]
pub fn wrperr(&mut self) -> WRPERR_W<SRrs> {
WRPERR_W::new(self, 4)
}
#[inline(always)]
pub fn pgaerr(&mut self) -> PGAERR_W<SRrs> {
PGAERR_W::new(self, 5)
}
#[inline(always)]
pub fn pgperr(&mut self) -> PGPERR_W<SRrs> {
PGPERR_W::new(self, 6)
}
#[inline(always)]
pub fn pgserr(&mut self) -> PGSERR_W<SRrs> {
PGSERR_W::new(self, 7)
}
#[inline(always)]
pub fn rderr(&mut self) -> RDERR_W<SRrs> {
RDERR_W::new(self, 8)
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u32;
}
impl crate::Readable for SRrs {}
impl crate::Writable for SRrs {
type Safety = crate::Unsafe;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x01f3;
}
impl crate::Resettable for SRrs {}