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 AWDR {
NoEvent = 0,
Event = 1,
}
impl From<AWDR> for bool {
#[inline(always)]
fn from(variant: AWDR) -> Self {
variant as u8 != 0
}
}
pub type AWD_R = crate::BitReader<AWDR>;
impl AWD_R {
#[inline(always)]
pub const fn variant(&self) -> AWDR {
match self.bits {
false => AWDR::NoEvent,
true => AWDR::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == AWDR::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == AWDR::Event
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AWDW {
Clear = 0,
}
impl From<AWDW> for bool {
#[inline(always)]
fn from(variant: AWDW) -> Self {
variant as u8 != 0
}
}
pub type AWD_W<'a, REG> = crate::BitWriter0C<'a, REG, AWDW>;
impl<'a, REG> AWD_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(AWDW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCR {
NotComplete = 0,
Complete = 1,
}
impl From<EOCR> for bool {
#[inline(always)]
fn from(variant: EOCR) -> Self {
variant as u8 != 0
}
}
pub type EOC_R = crate::BitReader<EOCR>;
impl EOC_R {
#[inline(always)]
pub const fn variant(&self) -> EOCR {
match self.bits {
false => EOCR::NotComplete,
true => EOCR::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOCR::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOCR::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCW {
Clear = 0,
}
impl From<EOCW> for bool {
#[inline(always)]
fn from(variant: EOCW) -> Self {
variant as u8 != 0
}
}
pub type EOC_W<'a, REG> = crate::BitWriter0C<'a, REG, EOCW>;
impl<'a, REG> EOC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOCW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JEOCR {
NotComplete = 0,
Complete = 1,
}
impl From<JEOCR> for bool {
#[inline(always)]
fn from(variant: JEOCR) -> Self {
variant as u8 != 0
}
}
pub type JEOC_R = crate::BitReader<JEOCR>;
impl JEOC_R {
#[inline(always)]
pub const fn variant(&self) -> JEOCR {
match self.bits {
false => JEOCR::NotComplete,
true => JEOCR::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == JEOCR::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == JEOCR::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JEOCW {
Clear = 0,
}
impl From<JEOCW> for bool {
#[inline(always)]
fn from(variant: JEOCW) -> Self {
variant as u8 != 0
}
}
pub type JEOC_W<'a, REG> = crate::BitWriter0C<'a, REG, JEOCW>;
impl<'a, REG> JEOC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(JEOCW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JSTRTR {
NotStarted = 0,
Started = 1,
}
impl From<JSTRTR> for bool {
#[inline(always)]
fn from(variant: JSTRTR) -> Self {
variant as u8 != 0
}
}
pub type JSTRT_R = crate::BitReader<JSTRTR>;
impl JSTRT_R {
#[inline(always)]
pub const fn variant(&self) -> JSTRTR {
match self.bits {
false => JSTRTR::NotStarted,
true => JSTRTR::Started,
}
}
#[inline(always)]
pub fn is_not_started(&self) -> bool {
*self == JSTRTR::NotStarted
}
#[inline(always)]
pub fn is_started(&self) -> bool {
*self == JSTRTR::Started
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JSTRTW {
Clear = 0,
}
impl From<JSTRTW> for bool {
#[inline(always)]
fn from(variant: JSTRTW) -> Self {
variant as u8 != 0
}
}
pub type JSTRT_W<'a, REG> = crate::BitWriter0C<'a, REG, JSTRTW>;
impl<'a, REG> JSTRT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(JSTRTW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum STRTR {
NotStarted = 0,
Started = 1,
}
impl From<STRTR> for bool {
#[inline(always)]
fn from(variant: STRTR) -> Self {
variant as u8 != 0
}
}
pub type STRT_R = crate::BitReader<STRTR>;
impl STRT_R {
#[inline(always)]
pub const fn variant(&self) -> STRTR {
match self.bits {
false => STRTR::NotStarted,
true => STRTR::Started,
}
}
#[inline(always)]
pub fn is_not_started(&self) -> bool {
*self == STRTR::NotStarted
}
#[inline(always)]
pub fn is_started(&self) -> bool {
*self == STRTR::Started
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum STRTW {
Clear = 0,
}
impl From<STRTW> for bool {
#[inline(always)]
fn from(variant: STRTW) -> Self {
variant as u8 != 0
}
}
pub type STRT_W<'a, REG> = crate::BitWriter0C<'a, REG, STRTW>;
impl<'a, REG> STRT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(STRTW::Clear)
}
}
impl R {
#[inline(always)]
pub fn awd(&self) -> AWD_R {
AWD_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn eoc(&self) -> EOC_R {
EOC_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn jeoc(&self) -> JEOC_R {
JEOC_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn jstrt(&self) -> JSTRT_R {
JSTRT_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn strt(&self) -> STRT_R {
STRT_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("strt", &self.strt())
.field("jstrt", &self.jstrt())
.field("jeoc", &self.jeoc())
.field("eoc", &self.eoc())
.field("awd", &self.awd())
.finish()
}
}
impl W {
#[inline(always)]
pub fn awd(&mut self) -> AWD_W<SRrs> {
AWD_W::new(self, 0)
}
#[inline(always)]
pub fn eoc(&mut self) -> EOC_W<SRrs> {
EOC_W::new(self, 1)
}
#[inline(always)]
pub fn jeoc(&mut self) -> JEOC_W<SRrs> {
JEOC_W::new(self, 2)
}
#[inline(always)]
pub fn jstrt(&mut self) -> JSTRT_W<SRrs> {
JSTRT_W::new(self, 3)
}
#[inline(always)]
pub fn strt(&mut self) -> STRT_W<SRrs> {
STRT_W::new(self, 4)
}
}
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 ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0x1f;
}
impl crate::Resettable for SRrs {}