#[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::CR {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = r"Value of the field"]
pub struct COER {
bits: bool,
}
impl COER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _COEW<'a> {
w: &'a mut W,
}
impl<'a> _COEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 23);
self.w.bits |= ((value as u32) & 0x01) << 23;
self.w
}
}
#[doc = r"Value of the field"]
pub struct OSELR {
bits: u8,
}
impl OSELR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r"Proxy"]
pub struct _OSELW<'a> {
w: &'a mut W,
}
impl<'a> _OSELW<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 21);
self.w.bits |= ((value as u32) & 0x03) << 21;
self.w
}
}
#[doc = r"Value of the field"]
pub struct POLR {
bits: bool,
}
impl POLR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _POLW<'a> {
w: &'a mut W,
}
impl<'a> _POLW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 20);
self.w.bits |= ((value as u32) & 0x01) << 20;
self.w
}
}
#[doc = r"Value of the field"]
pub struct COSELR {
bits: bool,
}
impl COSELR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _COSELW<'a> {
w: &'a mut W,
}
impl<'a> _COSELW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 19);
self.w.bits |= ((value as u32) & 0x01) << 19;
self.w
}
}
#[doc = r"Value of the field"]
pub struct BKPR {
bits: bool,
}
impl BKPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _BKPW<'a> {
w: &'a mut W,
}
impl<'a> _BKPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 18);
self.w.bits |= ((value as u32) & 0x01) << 18;
self.w
}
}
#[doc = r"Value of the field"]
pub struct SUB1HR {
bits: bool,
}
impl SUB1HR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _SUB1HW<'a> {
w: &'a mut W,
}
impl<'a> _SUB1HW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 17);
self.w.bits |= ((value as u32) & 0x01) << 17;
self.w
}
}
#[doc = r"Value of the field"]
pub struct ADD1HR {
bits: bool,
}
impl ADD1HR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _ADD1HW<'a> {
w: &'a mut W,
}
impl<'a> _ADD1HW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 16);
self.w.bits |= ((value as u32) & 0x01) << 16;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TSIER {
bits: bool,
}
impl TSIER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TSIEW<'a> {
w: &'a mut W,
}
impl<'a> _TSIEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 15);
self.w.bits |= ((value as u32) & 0x01) << 15;
self.w
}
}
#[doc = r"Value of the field"]
pub struct WUTIER {
bits: bool,
}
impl WUTIER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _WUTIEW<'a> {
w: &'a mut W,
}
impl<'a> _WUTIEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 14);
self.w.bits |= ((value as u32) & 0x01) << 14;
self.w
}
}
#[doc = r"Value of the field"]
pub struct ALRBIER {
bits: bool,
}
impl ALRBIER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _ALRBIEW<'a> {
w: &'a mut W,
}
impl<'a> _ALRBIEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 13);
self.w.bits |= ((value as u32) & 0x01) << 13;
self.w
}
}
#[doc = r"Value of the field"]
pub struct ALRAIER {
bits: bool,
}
impl ALRAIER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _ALRAIEW<'a> {
w: &'a mut W,
}
impl<'a> _ALRAIEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TSER {
bits: bool,
}
impl TSER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TSEW<'a> {
w: &'a mut W,
}
impl<'a> _TSEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 11);
self.w.bits |= ((value as u32) & 0x01) << 11;
self.w
}
}
#[doc = r"Value of the field"]
pub struct WUTER {
bits: bool,
}
impl WUTER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _WUTEW<'a> {
w: &'a mut W,
}
impl<'a> _WUTEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 10);
self.w.bits |= ((value as u32) & 0x01) << 10;
self.w
}
}
#[doc = r"Value of the field"]
pub struct ALRBER {
bits: bool,
}
impl ALRBER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _ALRBEW<'a> {
w: &'a mut W,
}
impl<'a> _ALRBEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = r"Value of the field"]
pub struct ALRAER {
bits: bool,
}
impl ALRAER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _ALRAEW<'a> {
w: &'a mut W,
}
impl<'a> _ALRAEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = r"Value of the field"]
pub struct DCER {
bits: bool,
}
impl DCER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _DCEW<'a> {
w: &'a mut W,
}
impl<'a> _DCEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 7);
self.w.bits |= ((value as u32) & 0x01) << 7;
self.w
}
}
#[doc = r"Value of the field"]
pub struct FMTR {
bits: bool,
}
impl FMTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _FMTW<'a> {
w: &'a mut W,
}
impl<'a> _FMTW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 6);
self.w.bits |= ((value as u32) & 0x01) << 6;
self.w
}
}
#[doc = r"Value of the field"]
pub struct BYPSHADR {
bits: bool,
}
impl BYPSHADR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _BYPSHADW<'a> {
w: &'a mut W,
}
impl<'a> _BYPSHADW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 5);
self.w.bits |= ((value as u32) & 0x01) << 5;
self.w
}
}
#[doc = r"Value of the field"]
pub struct REFCKONR {
bits: bool,
}
impl REFCKONR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _REFCKONW<'a> {
w: &'a mut W,
}
impl<'a> _REFCKONW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TSEDGER {
bits: bool,
}
impl TSEDGER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TSEDGEW<'a> {
w: &'a mut W,
}
impl<'a> _TSEDGEW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = r"Value of the field"]
pub struct WCKSELR {
bits: u8,
}
impl WCKSELR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r"Proxy"]
pub struct _WCKSELW<'a> {
w: &'a mut W,
}
impl<'a> _WCKSELW<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x07 << 0);
self.w.bits |= ((value as u32) & 0x07) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 23 - Calibration output enable"]
#[inline(always)]
pub fn coe(&self) -> COER {
let bits = ((self.bits >> 23) & 0x01) != 0;
COER { bits }
}
#[doc = "Bits 21:22 - Output selection"]
#[inline(always)]
pub fn osel(&self) -> OSELR {
let bits = ((self.bits >> 21) & 0x03) as u8;
OSELR { bits }
}
#[doc = "Bit 20 - Output polarity"]
#[inline(always)]
pub fn pol(&self) -> POLR {
let bits = ((self.bits >> 20) & 0x01) != 0;
POLR { bits }
}
#[doc = "Bit 19 - Calibration output selection"]
#[inline(always)]
pub fn cosel(&self) -> COSELR {
let bits = ((self.bits >> 19) & 0x01) != 0;
COSELR { bits }
}
#[doc = "Bit 18 - Backup"]
#[inline(always)]
pub fn bkp(&self) -> BKPR {
let bits = ((self.bits >> 18) & 0x01) != 0;
BKPR { bits }
}
#[doc = "Bit 17 - Subtract 1 hour"]
#[inline(always)]
pub fn sub1h(&self) -> SUB1HR {
let bits = ((self.bits >> 17) & 0x01) != 0;
SUB1HR { bits }
}
#[doc = "Bit 16 - Add 1 hour"]
#[inline(always)]
pub fn add1h(&self) -> ADD1HR {
let bits = ((self.bits >> 16) & 0x01) != 0;
ADD1HR { bits }
}
#[doc = "Bit 15 - Time-stamp interrupt enable"]
#[inline(always)]
pub fn tsie(&self) -> TSIER {
let bits = ((self.bits >> 15) & 0x01) != 0;
TSIER { bits }
}
#[doc = "Bit 14 - Wakeup timer interrupt enable"]
#[inline(always)]
pub fn wutie(&self) -> WUTIER {
let bits = ((self.bits >> 14) & 0x01) != 0;
WUTIER { bits }
}
#[doc = "Bit 13 - Alarm B interrupt enable"]
#[inline(always)]
pub fn alrbie(&self) -> ALRBIER {
let bits = ((self.bits >> 13) & 0x01) != 0;
ALRBIER { bits }
}
#[doc = "Bit 12 - Alarm A interrupt enable"]
#[inline(always)]
pub fn alraie(&self) -> ALRAIER {
let bits = ((self.bits >> 12) & 0x01) != 0;
ALRAIER { bits }
}
#[doc = "Bit 11 - Time stamp enable"]
#[inline(always)]
pub fn tse(&self) -> TSER {
let bits = ((self.bits >> 11) & 0x01) != 0;
TSER { bits }
}
#[doc = "Bit 10 - Wakeup timer enable"]
#[inline(always)]
pub fn wute(&self) -> WUTER {
let bits = ((self.bits >> 10) & 0x01) != 0;
WUTER { bits }
}
#[doc = "Bit 9 - Alarm B enable"]
#[inline(always)]
pub fn alrbe(&self) -> ALRBER {
let bits = ((self.bits >> 9) & 0x01) != 0;
ALRBER { bits }
}
#[doc = "Bit 8 - Alarm A enable"]
#[inline(always)]
pub fn alrae(&self) -> ALRAER {
let bits = ((self.bits >> 8) & 0x01) != 0;
ALRAER { bits }
}
#[doc = "Bit 7 - Coarse digital calibration enable"]
#[inline(always)]
pub fn dce(&self) -> DCER {
let bits = ((self.bits >> 7) & 0x01) != 0;
DCER { bits }
}
#[doc = "Bit 6 - Hour format"]
#[inline(always)]
pub fn fmt(&self) -> FMTR {
let bits = ((self.bits >> 6) & 0x01) != 0;
FMTR { bits }
}
#[doc = "Bit 5 - Bypass the shadow registers"]
#[inline(always)]
pub fn bypshad(&self) -> BYPSHADR {
let bits = ((self.bits >> 5) & 0x01) != 0;
BYPSHADR { bits }
}
#[doc = "Bit 4 - Reference clock detection enable"]
#[inline(always)]
pub fn refckon(&self) -> REFCKONR {
let bits = ((self.bits >> 4) & 0x01) != 0;
REFCKONR { bits }
}
#[doc = "Bit 3 - Time-stamp event active edge"]
#[inline(always)]
pub fn tsedge(&self) -> TSEDGER {
let bits = ((self.bits >> 3) & 0x01) != 0;
TSEDGER { bits }
}
#[doc = "Bits 0:2 - WCKSEL"]
#[inline(always)]
pub fn wcksel(&self) -> WCKSELR {
let bits = ((self.bits >> 0) & 0x07) as u8;
WCKSELR { bits }
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 23 - Calibration output enable"]
#[inline(always)]
pub fn coe(&mut self) -> _COEW {
_COEW { w: self }
}
#[doc = "Bits 21:22 - Output selection"]
#[inline(always)]
pub fn osel(&mut self) -> _OSELW {
_OSELW { w: self }
}
#[doc = "Bit 20 - Output polarity"]
#[inline(always)]
pub fn pol(&mut self) -> _POLW {
_POLW { w: self }
}
#[doc = "Bit 19 - Calibration output selection"]
#[inline(always)]
pub fn cosel(&mut self) -> _COSELW {
_COSELW { w: self }
}
#[doc = "Bit 18 - Backup"]
#[inline(always)]
pub fn bkp(&mut self) -> _BKPW {
_BKPW { w: self }
}
#[doc = "Bit 17 - Subtract 1 hour"]
#[inline(always)]
pub fn sub1h(&mut self) -> _SUB1HW {
_SUB1HW { w: self }
}
#[doc = "Bit 16 - Add 1 hour"]
#[inline(always)]
pub fn add1h(&mut self) -> _ADD1HW {
_ADD1HW { w: self }
}
#[doc = "Bit 15 - Time-stamp interrupt enable"]
#[inline(always)]
pub fn tsie(&mut self) -> _TSIEW {
_TSIEW { w: self }
}
#[doc = "Bit 14 - Wakeup timer interrupt enable"]
#[inline(always)]
pub fn wutie(&mut self) -> _WUTIEW {
_WUTIEW { w: self }
}
#[doc = "Bit 13 - Alarm B interrupt enable"]
#[inline(always)]
pub fn alrbie(&mut self) -> _ALRBIEW {
_ALRBIEW { w: self }
}
#[doc = "Bit 12 - Alarm A interrupt enable"]
#[inline(always)]
pub fn alraie(&mut self) -> _ALRAIEW {
_ALRAIEW { w: self }
}
#[doc = "Bit 11 - Time stamp enable"]
#[inline(always)]
pub fn tse(&mut self) -> _TSEW {
_TSEW { w: self }
}
#[doc = "Bit 10 - Wakeup timer enable"]
#[inline(always)]
pub fn wute(&mut self) -> _WUTEW {
_WUTEW { w: self }
}
#[doc = "Bit 9 - Alarm B enable"]
#[inline(always)]
pub fn alrbe(&mut self) -> _ALRBEW {
_ALRBEW { w: self }
}
#[doc = "Bit 8 - Alarm A enable"]
#[inline(always)]
pub fn alrae(&mut self) -> _ALRAEW {
_ALRAEW { w: self }
}
#[doc = "Bit 7 - Coarse digital calibration enable"]
#[inline(always)]
pub fn dce(&mut self) -> _DCEW {
_DCEW { w: self }
}
#[doc = "Bit 6 - Hour format"]
#[inline(always)]
pub fn fmt(&mut self) -> _FMTW {
_FMTW { w: self }
}
#[doc = "Bit 5 - Bypass the shadow registers"]
#[inline(always)]
pub fn bypshad(&mut self) -> _BYPSHADW {
_BYPSHADW { w: self }
}
#[doc = "Bit 4 - Reference clock detection enable"]
#[inline(always)]
pub fn refckon(&mut self) -> _REFCKONW {
_REFCKONW { w: self }
}
#[doc = "Bit 3 - Time-stamp event active edge"]
#[inline(always)]
pub fn tsedge(&mut self) -> _TSEDGEW {
_TSEDGEW { w: self }
}
#[doc = "Bits 0:2 - WCKSEL"]
#[inline(always)]
pub fn wcksel(&mut self) -> _WCKSELW {
_WCKSELW { w: self }
}
}