#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::CCR2 {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = r" Value of the field"]
pub struct CLR_EOP2R {
bits: bool,
}
impl CLR_EOP2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_WRPERR2R {
bits: bool,
}
impl CLR_WRPERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_PGSERR2R {
bits: bool,
}
impl CLR_PGSERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_STRBERR2R {
bits: bool,
}
impl CLR_STRBERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_INCERR2R {
bits: bool,
}
impl CLR_INCERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_OPERR2R {
bits: bool,
}
impl CLR_OPERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_RDPERR2R {
bits: bool,
}
impl CLR_RDPERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_RDSERR1R {
bits: bool,
}
impl CLR_RDSERR1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_SNECCERR2R {
bits: bool,
}
impl CLR_SNECCERR2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_DBECCERR1R {
bits: bool,
}
impl CLR_DBECCERR1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct CLR_CRCEND2R {
bits: bool,
}
impl CLR_CRCEND2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Proxy"]
pub struct _CLR_EOP2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_EOP2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_WRPERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_WRPERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 17;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_PGSERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_PGSERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 18;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_STRBERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_STRBERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 19;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_INCERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_INCERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 21;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_OPERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_OPERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 22;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_RDPERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_RDPERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 23;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_RDSERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_RDSERR1W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_SNECCERR2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_SNECCERR2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 25;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_DBECCERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_DBECCERR1W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 26;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CLR_CRCEND2W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_CRCEND2W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 27;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 16 - Bank 1 EOP1 flag clear bit"]
#[inline]
pub fn clr_eop2(&self) -> CLR_EOP2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_EOP2R { bits }
}
#[doc = "Bit 17 - Bank 2 WRPERR1 flag clear bit"]
#[inline]
pub fn clr_wrperr2(&self) -> CLR_WRPERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_WRPERR2R { bits }
}
#[doc = "Bit 18 - Bank 2 PGSERR1 flag clear bi"]
#[inline]
pub fn clr_pgserr2(&self) -> CLR_PGSERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_PGSERR2R { bits }
}
#[doc = "Bit 19 - Bank 2 STRBERR1 flag clear bit"]
#[inline]
pub fn clr_strberr2(&self) -> CLR_STRBERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_STRBERR2R { bits }
}
#[doc = "Bit 21 - Bank 2 INCERR1 flag clear bit"]
#[inline]
pub fn clr_incerr2(&self) -> CLR_INCERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_INCERR2R { bits }
}
#[doc = "Bit 22 - Bank 2 OPERR1 flag clear bit"]
#[inline]
pub fn clr_operr2(&self) -> CLR_OPERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_OPERR2R { bits }
}
#[doc = "Bit 23 - Bank 2 RDPERR1 flag clear bit"]
#[inline]
pub fn clr_rdperr2(&self) -> CLR_RDPERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 23;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_RDPERR2R { bits }
}
#[doc = "Bit 24 - Bank 1 RDSERR1 flag clear bit"]
#[inline]
pub fn clr_rdserr1(&self) -> CLR_RDSERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_RDSERR1R { bits }
}
#[doc = "Bit 25 - Bank 2 SNECCERR1 flag clear bit"]
#[inline]
pub fn clr_sneccerr2(&self) -> CLR_SNECCERR2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_SNECCERR2R { bits }
}
#[doc = "Bit 26 - Bank 1 DBECCERR1 flag clear bit"]
#[inline]
pub fn clr_dbeccerr1(&self) -> CLR_DBECCERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 26;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_DBECCERR1R { bits }
}
#[doc = "Bit 27 - Bank 2 CRCEND1 flag clear bit"]
#[inline]
pub fn clr_crcend2(&self) -> CLR_CRCEND2R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 27;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_CRCEND2R { bits }
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 16 - Bank 1 EOP1 flag clear bit"]
#[inline]
pub fn clr_eop2(&mut self) -> _CLR_EOP2W {
_CLR_EOP2W { w: self }
}
#[doc = "Bit 17 - Bank 2 WRPERR1 flag clear bit"]
#[inline]
pub fn clr_wrperr2(&mut self) -> _CLR_WRPERR2W {
_CLR_WRPERR2W { w: self }
}
#[doc = "Bit 18 - Bank 2 PGSERR1 flag clear bi"]
#[inline]
pub fn clr_pgserr2(&mut self) -> _CLR_PGSERR2W {
_CLR_PGSERR2W { w: self }
}
#[doc = "Bit 19 - Bank 2 STRBERR1 flag clear bit"]
#[inline]
pub fn clr_strberr2(&mut self) -> _CLR_STRBERR2W {
_CLR_STRBERR2W { w: self }
}
#[doc = "Bit 21 - Bank 2 INCERR1 flag clear bit"]
#[inline]
pub fn clr_incerr2(&mut self) -> _CLR_INCERR2W {
_CLR_INCERR2W { w: self }
}
#[doc = "Bit 22 - Bank 2 OPERR1 flag clear bit"]
#[inline]
pub fn clr_operr2(&mut self) -> _CLR_OPERR2W {
_CLR_OPERR2W { w: self }
}
#[doc = "Bit 23 - Bank 2 RDPERR1 flag clear bit"]
#[inline]
pub fn clr_rdperr2(&mut self) -> _CLR_RDPERR2W {
_CLR_RDPERR2W { w: self }
}
#[doc = "Bit 24 - Bank 1 RDSERR1 flag clear bit"]
#[inline]
pub fn clr_rdserr1(&mut self) -> _CLR_RDSERR1W {
_CLR_RDSERR1W { w: self }
}
#[doc = "Bit 25 - Bank 2 SNECCERR1 flag clear bit"]
#[inline]
pub fn clr_sneccerr2(&mut self) -> _CLR_SNECCERR2W {
_CLR_SNECCERR2W { w: self }
}
#[doc = "Bit 26 - Bank 1 DBECCERR1 flag clear bit"]
#[inline]
pub fn clr_dbeccerr1(&mut self) -> _CLR_DBECCERR1W {
_CLR_DBECCERR1W { w: self }
}
#[doc = "Bit 27 - Bank 2 CRCEND1 flag clear bit"]
#[inline]
pub fn clr_crcend2(&mut self) -> _CLR_CRCEND2W {
_CLR_CRCEND2W { w: self }
}
}