pub type R = crate::R<CCMR2_OUTPUTrs>;
pub type W = crate::W<CCMR2_OUTPUTrs>;
pub use super::ccmr1_output::CC1S;
pub use super::ccmr1_output::CCS_R;
pub use super::ccmr1_output::CCS_W;
pub use super::ccmr1_output::OC1CE;
pub use super::ccmr1_output::OC1FE;
pub use super::ccmr1_output::OC1M;
pub use super::ccmr1_output::OC1M_3;
pub use super::ccmr1_output::OC1PE;
pub use super::ccmr1_output::OCCE_R;
pub use super::ccmr1_output::OCCE_W;
pub use super::ccmr1_output::OCFE_R;
pub use super::ccmr1_output::OCFE_W;
pub use super::ccmr1_output::OCM_3_R;
pub use super::ccmr1_output::OCM_3_W;
pub use super::ccmr1_output::OCM_R;
pub use super::ccmr1_output::OCM_W;
pub use super::ccmr1_output::OCPE_R;
pub use super::ccmr1_output::OCPE_W;
impl R {
#[inline(always)]
pub fn ccs(&self, n: u8) -> CCS_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
CCS_R::new(((self.bits >> (n * 8)) & 3) as u8)
}
#[inline(always)]
pub fn ccs_iter(&self) -> impl Iterator<Item = CCS_R> + '_ {
(0..2).map(move |n| CCS_R::new(((self.bits >> (n * 8)) & 3) as u8))
}
#[inline(always)]
pub fn cc3s(&self) -> CCS_R {
CCS_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn cc4s(&self) -> CCS_R {
CCS_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn ocfe(&self, n: u8) -> OCFE_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCFE_R::new(((self.bits >> (n * 8 + 2)) & 1) != 0)
}
#[inline(always)]
pub fn ocfe_iter(&self) -> impl Iterator<Item = OCFE_R> + '_ {
(0..2).map(move |n| OCFE_R::new(((self.bits >> (n * 8 + 2)) & 1) != 0))
}
#[inline(always)]
pub fn oc3fe(&self) -> OCFE_R {
OCFE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn oc4fe(&self) -> OCFE_R {
OCFE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn ocpe(&self, n: u8) -> OCPE_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCPE_R::new(((self.bits >> (n * 8 + 3)) & 1) != 0)
}
#[inline(always)]
pub fn ocpe_iter(&self) -> impl Iterator<Item = OCPE_R> + '_ {
(0..2).map(move |n| OCPE_R::new(((self.bits >> (n * 8 + 3)) & 1) != 0))
}
#[inline(always)]
pub fn oc3pe(&self) -> OCPE_R {
OCPE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn oc4pe(&self) -> OCPE_R {
OCPE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn ocm(&self, n: u8) -> OCM_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCM_R::new(((self.bits >> (n * 8 + 4)) & 7) as u8)
}
#[inline(always)]
pub fn ocm_iter(&self) -> impl Iterator<Item = OCM_R> + '_ {
(0..2).map(move |n| OCM_R::new(((self.bits >> (n * 8 + 4)) & 7) as u8))
}
#[inline(always)]
pub fn oc3m(&self) -> OCM_R {
OCM_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn oc4m(&self) -> OCM_R {
OCM_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn occe(&self, n: u8) -> OCCE_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCCE_R::new(((self.bits >> (n * 8 + 7)) & 1) != 0)
}
#[inline(always)]
pub fn occe_iter(&self) -> impl Iterator<Item = OCCE_R> + '_ {
(0..2).map(move |n| OCCE_R::new(((self.bits >> (n * 8 + 7)) & 1) != 0))
}
#[inline(always)]
pub fn oc3ce(&self) -> OCCE_R {
OCCE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn oc4ce(&self) -> OCCE_R {
OCCE_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn ocm_3(&self, n: u8) -> OCM_3_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCM_3_R::new(((self.bits >> (n * 8 + 16)) & 1) != 0)
}
#[inline(always)]
pub fn ocm_3_iter(&self) -> impl Iterator<Item = OCM_3_R> + '_ {
(0..2).map(move |n| OCM_3_R::new(((self.bits >> (n * 8 + 16)) & 1) != 0))
}
#[inline(always)]
pub fn oc3m_3(&self) -> OCM_3_R {
OCM_3_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn oc4m_3(&self) -> OCM_3_R {
OCM_3_R::new(((self.bits >> 24) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CCMR2_Output")
.field("oc3ce", &self.oc3ce())
.field("oc4ce", &self.oc4ce())
.field("oc3m", &self.oc3m())
.field("oc4m", &self.oc4m())
.field("oc3pe", &self.oc3pe())
.field("oc4pe", &self.oc4pe())
.field("oc3fe", &self.oc3fe())
.field("oc4fe", &self.oc4fe())
.field("cc3s", &self.cc3s())
.field("cc4s", &self.cc4s())
.field("oc3m_3", &self.oc3m_3())
.field("oc4m_3", &self.oc4m_3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ccs(&mut self, n: u8) -> CCS_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
CCS_W::new(self, n * 8)
}
#[inline(always)]
pub fn cc3s(&mut self) -> CCS_W<CCMR2_OUTPUTrs> {
CCS_W::new(self, 0)
}
#[inline(always)]
pub fn cc4s(&mut self) -> CCS_W<CCMR2_OUTPUTrs> {
CCS_W::new(self, 8)
}
#[inline(always)]
pub fn ocfe(&mut self, n: u8) -> OCFE_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCFE_W::new(self, n * 8 + 2)
}
#[inline(always)]
pub fn oc3fe(&mut self) -> OCFE_W<CCMR2_OUTPUTrs> {
OCFE_W::new(self, 2)
}
#[inline(always)]
pub fn oc4fe(&mut self) -> OCFE_W<CCMR2_OUTPUTrs> {
OCFE_W::new(self, 10)
}
#[inline(always)]
pub fn ocpe(&mut self, n: u8) -> OCPE_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCPE_W::new(self, n * 8 + 3)
}
#[inline(always)]
pub fn oc3pe(&mut self) -> OCPE_W<CCMR2_OUTPUTrs> {
OCPE_W::new(self, 3)
}
#[inline(always)]
pub fn oc4pe(&mut self) -> OCPE_W<CCMR2_OUTPUTrs> {
OCPE_W::new(self, 11)
}
#[inline(always)]
pub fn ocm(&mut self, n: u8) -> OCM_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCM_W::new(self, n * 8 + 4)
}
#[inline(always)]
pub fn oc3m(&mut self) -> OCM_W<CCMR2_OUTPUTrs> {
OCM_W::new(self, 4)
}
#[inline(always)]
pub fn oc4m(&mut self) -> OCM_W<CCMR2_OUTPUTrs> {
OCM_W::new(self, 12)
}
#[inline(always)]
pub fn occe(&mut self, n: u8) -> OCCE_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCCE_W::new(self, n * 8 + 7)
}
#[inline(always)]
pub fn oc3ce(&mut self) -> OCCE_W<CCMR2_OUTPUTrs> {
OCCE_W::new(self, 7)
}
#[inline(always)]
pub fn oc4ce(&mut self) -> OCCE_W<CCMR2_OUTPUTrs> {
OCCE_W::new(self, 15)
}
#[inline(always)]
pub fn ocm_3(&mut self, n: u8) -> OCM_3_W<CCMR2_OUTPUTrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
OCM_3_W::new(self, n * 8 + 16)
}
#[inline(always)]
pub fn oc3m_3(&mut self) -> OCM_3_W<CCMR2_OUTPUTrs> {
OCM_3_W::new(self, 16)
}
#[inline(always)]
pub fn oc4m_3(&mut self) -> OCM_3_W<CCMR2_OUTPUTrs> {
OCM_3_W::new(self, 24)
}
}
pub struct CCMR2_OUTPUTrs;
impl crate::RegisterSpec for CCMR2_OUTPUTrs {
type Ux = u32;
}
impl crate::Readable for CCMR2_OUTPUTrs {}
impl crate::Writable for CCMR2_OUTPUTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCMR2_OUTPUTrs {}