#[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::CCR1 {
#[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_EOP1R {
bits: bool,
}
impl CLR_EOP1R {
#[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_WRPERR1R {
bits: bool,
}
impl CLR_WRPERR1R {
#[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_PGSERR1R {
bits: bool,
}
impl CLR_PGSERR1R {
#[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_STRBERR1R {
bits: bool,
}
impl CLR_STRBERR1R {
#[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_INCERR1R {
bits: bool,
}
impl CLR_INCERR1R {
#[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_OPERR1R {
bits: bool,
}
impl CLR_OPERR1R {
#[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_RDPERR1R {
bits: bool,
}
impl CLR_RDPERR1R {
#[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_SNECCERR1R {
bits: bool,
}
impl CLR_SNECCERR1R {
#[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_CRCEND1R {
bits: bool,
}
impl CLR_CRCEND1R {
#[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_EOP1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_EOP1W<'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_WRPERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_WRPERR1W<'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_PGSERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_PGSERR1W<'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_STRBERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_STRBERR1W<'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_INCERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_INCERR1W<'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_OPERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_OPERR1W<'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_RDPERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_RDPERR1W<'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_SNECCERR1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_SNECCERR1W<'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_CRCEND1W<'a> {
w: &'a mut W,
}
impl<'a> _CLR_CRCEND1W<'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_eop1(&self) -> CLR_EOP1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_EOP1R { bits }
}
#[doc = "Bit 17 - Bank 1 WRPERR1 flag clear bit"]
#[inline]
pub fn clr_wrperr1(&self) -> CLR_WRPERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_WRPERR1R { bits }
}
#[doc = "Bit 18 - Bank 1 PGSERR1 flag clear bi"]
#[inline]
pub fn clr_pgserr1(&self) -> CLR_PGSERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_PGSERR1R { bits }
}
#[doc = "Bit 19 - Bank 1 STRBERR1 flag clear bit"]
#[inline]
pub fn clr_strberr1(&self) -> CLR_STRBERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_STRBERR1R { bits }
}
#[doc = "Bit 21 - Bank 1 INCERR1 flag clear bit"]
#[inline]
pub fn clr_incerr1(&self) -> CLR_INCERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_INCERR1R { bits }
}
#[doc = "Bit 22 - Bank 1 OPERR1 flag clear bit"]
#[inline]
pub fn clr_operr1(&self) -> CLR_OPERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_OPERR1R { bits }
}
#[doc = "Bit 23 - Bank 1 RDPERR1 flag clear bit"]
#[inline]
pub fn clr_rdperr1(&self) -> CLR_RDPERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 23;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_RDPERR1R { 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 1 SNECCERR1 flag clear bit"]
#[inline]
pub fn clr_sneccerr1(&self) -> CLR_SNECCERR1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_SNECCERR1R { 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 1 CRCEND1 flag clear bit"]
#[inline]
pub fn clr_crcend1(&self) -> CLR_CRCEND1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 27;
((self.bits >> OFFSET) & MASK as u32) != 0
};
CLR_CRCEND1R { 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_eop1(&mut self) -> _CLR_EOP1W {
_CLR_EOP1W { w: self }
}
#[doc = "Bit 17 - Bank 1 WRPERR1 flag clear bit"]
#[inline]
pub fn clr_wrperr1(&mut self) -> _CLR_WRPERR1W {
_CLR_WRPERR1W { w: self }
}
#[doc = "Bit 18 - Bank 1 PGSERR1 flag clear bi"]
#[inline]
pub fn clr_pgserr1(&mut self) -> _CLR_PGSERR1W {
_CLR_PGSERR1W { w: self }
}
#[doc = "Bit 19 - Bank 1 STRBERR1 flag clear bit"]
#[inline]
pub fn clr_strberr1(&mut self) -> _CLR_STRBERR1W {
_CLR_STRBERR1W { w: self }
}
#[doc = "Bit 21 - Bank 1 INCERR1 flag clear bit"]
#[inline]
pub fn clr_incerr1(&mut self) -> _CLR_INCERR1W {
_CLR_INCERR1W { w: self }
}
#[doc = "Bit 22 - Bank 1 OPERR1 flag clear bit"]
#[inline]
pub fn clr_operr1(&mut self) -> _CLR_OPERR1W {
_CLR_OPERR1W { w: self }
}
#[doc = "Bit 23 - Bank 1 RDPERR1 flag clear bit"]
#[inline]
pub fn clr_rdperr1(&mut self) -> _CLR_RDPERR1W {
_CLR_RDPERR1W { 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 1 SNECCERR1 flag clear bit"]
#[inline]
pub fn clr_sneccerr1(&mut self) -> _CLR_SNECCERR1W {
_CLR_SNECCERR1W { 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 1 CRCEND1 flag clear bit"]
#[inline]
pub fn clr_crcend1(&mut self) -> _CLR_CRCEND1W {
_CLR_CRCEND1W { w: self }
}
}