pub type R = crate::R<D3AMRrs>;
pub type W = crate::W<D3AMRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BDMAAMEN {
Disabled = 0,
Enabled = 1,
}
impl From<BDMAAMEN> for bool {
#[inline(always)]
fn from(variant: BDMAAMEN) -> Self {
variant as u8 != 0
}
}
pub type BDMAAMEN_R = crate::BitReader<BDMAAMEN>;
impl BDMAAMEN_R {
#[inline(always)]
pub const fn variant(&self) -> BDMAAMEN {
match self.bits {
false => BDMAAMEN::Disabled,
true => BDMAAMEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BDMAAMEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BDMAAMEN::Enabled
}
}
pub type BDMAAMEN_W<'a, REG> = crate::BitWriter<'a, REG, BDMAAMEN>;
impl<'a, REG> BDMAAMEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(BDMAAMEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(BDMAAMEN::Enabled)
}
}
pub use BDMAAMEN_R as LPUART1AMEN_R;
pub use BDMAAMEN_R as SPI6AMEN_R;
pub use BDMAAMEN_R as I2C4AMEN_R;
pub use BDMAAMEN_R as LPTIM2AMEN_R;
pub use BDMAAMEN_R as LPTIM3AMEN_R;
pub use BDMAAMEN_R as LPTIM4AMEN_R;
pub use BDMAAMEN_R as LPTIM5AMEN_R;
pub use BDMAAMEN_R as COMP12AMEN_R;
pub use BDMAAMEN_R as VREFAMEN_R;
pub use BDMAAMEN_R as RTCAMEN_R;
pub use BDMAAMEN_R as CRCAMEN_R;
pub use BDMAAMEN_R as SAI4AMEN_R;
pub use BDMAAMEN_R as ADC3AMEN_R;
pub use BDMAAMEN_R as BKPRAMAMEN_R;
pub use BDMAAMEN_R as SRAM4AMEN_R;
pub use BDMAAMEN_W as LPUART1AMEN_W;
pub use BDMAAMEN_W as SPI6AMEN_W;
pub use BDMAAMEN_W as I2C4AMEN_W;
pub use BDMAAMEN_W as LPTIM2AMEN_W;
pub use BDMAAMEN_W as LPTIM3AMEN_W;
pub use BDMAAMEN_W as LPTIM4AMEN_W;
pub use BDMAAMEN_W as LPTIM5AMEN_W;
pub use BDMAAMEN_W as COMP12AMEN_W;
pub use BDMAAMEN_W as VREFAMEN_W;
pub use BDMAAMEN_W as RTCAMEN_W;
pub use BDMAAMEN_W as CRCAMEN_W;
pub use BDMAAMEN_W as SAI4AMEN_W;
pub use BDMAAMEN_W as ADC3AMEN_W;
pub use BDMAAMEN_W as BKPRAMAMEN_W;
pub use BDMAAMEN_W as SRAM4AMEN_W;
impl R {
#[inline(always)]
pub fn bdmaamen(&self) -> BDMAAMEN_R {
BDMAAMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lpuart1amen(&self) -> LPUART1AMEN_R {
LPUART1AMEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn spi6amen(&self) -> SPI6AMEN_R {
SPI6AMEN_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn i2c4amen(&self) -> I2C4AMEN_R {
I2C4AMEN_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn lptim2amen(&self) -> LPTIM2AMEN_R {
LPTIM2AMEN_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn lptim3amen(&self) -> LPTIM3AMEN_R {
LPTIM3AMEN_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn lptim4amen(&self) -> LPTIM4AMEN_R {
LPTIM4AMEN_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn lptim5amen(&self) -> LPTIM5AMEN_R {
LPTIM5AMEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn comp12amen(&self) -> COMP12AMEN_R {
COMP12AMEN_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn vrefamen(&self) -> VREFAMEN_R {
VREFAMEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn rtcamen(&self) -> RTCAMEN_R {
RTCAMEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn crcamen(&self) -> CRCAMEN_R {
CRCAMEN_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn sai4amen(&self) -> SAI4AMEN_R {
SAI4AMEN_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn adc3amen(&self) -> ADC3AMEN_R {
ADC3AMEN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn bkpramamen(&self) -> BKPRAMAMEN_R {
BKPRAMAMEN_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn sram4amen(&self) -> SRAM4AMEN_R {
SRAM4AMEN_R::new(((self.bits >> 29) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("D3AMR")
.field("bdmaamen", &self.bdmaamen())
.field("lpuart1amen", &self.lpuart1amen())
.field("spi6amen", &self.spi6amen())
.field("i2c4amen", &self.i2c4amen())
.field("lptim2amen", &self.lptim2amen())
.field("lptim3amen", &self.lptim3amen())
.field("lptim4amen", &self.lptim4amen())
.field("lptim5amen", &self.lptim5amen())
.field("comp12amen", &self.comp12amen())
.field("vrefamen", &self.vrefamen())
.field("rtcamen", &self.rtcamen())
.field("crcamen", &self.crcamen())
.field("sai4amen", &self.sai4amen())
.field("adc3amen", &self.adc3amen())
.field("bkpramamen", &self.bkpramamen())
.field("sram4amen", &self.sram4amen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bdmaamen(&mut self) -> BDMAAMEN_W<D3AMRrs> {
BDMAAMEN_W::new(self, 0)
}
#[inline(always)]
pub fn lpuart1amen(&mut self) -> LPUART1AMEN_W<D3AMRrs> {
LPUART1AMEN_W::new(self, 3)
}
#[inline(always)]
pub fn spi6amen(&mut self) -> SPI6AMEN_W<D3AMRrs> {
SPI6AMEN_W::new(self, 5)
}
#[inline(always)]
pub fn i2c4amen(&mut self) -> I2C4AMEN_W<D3AMRrs> {
I2C4AMEN_W::new(self, 7)
}
#[inline(always)]
pub fn lptim2amen(&mut self) -> LPTIM2AMEN_W<D3AMRrs> {
LPTIM2AMEN_W::new(self, 9)
}
#[inline(always)]
pub fn lptim3amen(&mut self) -> LPTIM3AMEN_W<D3AMRrs> {
LPTIM3AMEN_W::new(self, 10)
}
#[inline(always)]
pub fn lptim4amen(&mut self) -> LPTIM4AMEN_W<D3AMRrs> {
LPTIM4AMEN_W::new(self, 11)
}
#[inline(always)]
pub fn lptim5amen(&mut self) -> LPTIM5AMEN_W<D3AMRrs> {
LPTIM5AMEN_W::new(self, 12)
}
#[inline(always)]
pub fn comp12amen(&mut self) -> COMP12AMEN_W<D3AMRrs> {
COMP12AMEN_W::new(self, 14)
}
#[inline(always)]
pub fn vrefamen(&mut self) -> VREFAMEN_W<D3AMRrs> {
VREFAMEN_W::new(self, 15)
}
#[inline(always)]
pub fn rtcamen(&mut self) -> RTCAMEN_W<D3AMRrs> {
RTCAMEN_W::new(self, 16)
}
#[inline(always)]
pub fn crcamen(&mut self) -> CRCAMEN_W<D3AMRrs> {
CRCAMEN_W::new(self, 19)
}
#[inline(always)]
pub fn sai4amen(&mut self) -> SAI4AMEN_W<D3AMRrs> {
SAI4AMEN_W::new(self, 21)
}
#[inline(always)]
pub fn adc3amen(&mut self) -> ADC3AMEN_W<D3AMRrs> {
ADC3AMEN_W::new(self, 24)
}
#[inline(always)]
pub fn bkpramamen(&mut self) -> BKPRAMAMEN_W<D3AMRrs> {
BKPRAMAMEN_W::new(self, 28)
}
#[inline(always)]
pub fn sram4amen(&mut self) -> SRAM4AMEN_W<D3AMRrs> {
SRAM4AMEN_W::new(self, 29)
}
}
pub struct D3AMRrs;
impl crate::RegisterSpec for D3AMRrs {
type Ux = u32;
}
impl crate::Readable for D3AMRrs {}
impl crate::Writable for D3AMRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for D3AMRrs {}