#[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::IER {
#[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 = "Possible values of the field `TSERFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSERFIER {
#[doc = "TSER loaded interrupt masked"]
MASKED,
#[doc = "TSER loaded interrupt not masked"]
NOTMASKED,
}
impl TSERFIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
TSERFIER::MASKED => false,
TSERFIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TSERFIER {
match value {
false => TSERFIER::MASKED,
true => TSERFIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == TSERFIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == TSERFIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `TSERFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSERFIEW {
#[doc = "TSER loaded interrupt masked"]
MASKED,
#[doc = "TSER loaded interrupt not masked"]
NOTMASKED,
}
impl TSERFIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TSERFIEW::MASKED => false,
TSERFIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TSERFIEW<'a> {
w: &'a mut W,
}
impl<'a> _TSERFIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TSERFIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TSER loaded interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(TSERFIEW::MASKED)
}
#[doc = "TSER loaded interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(TSERFIEW::NOTMASKED)
}
#[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 = "Possible values of the field `MODFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MODFIER {
#[doc = "Mode fault interrupt masked"]
MASKED,
#[doc = "Mode fault interrupt not masked"]
NOTMASKED,
}
impl MODFIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
MODFIER::MASKED => false,
MODFIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> MODFIER {
match value {
false => MODFIER::MASKED,
true => MODFIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == MODFIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == MODFIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `MODFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MODFIEW {
#[doc = "Mode fault interrupt masked"]
MASKED,
#[doc = "Mode fault interrupt not masked"]
NOTMASKED,
}
impl MODFIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
MODFIEW::MASKED => false,
MODFIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _MODFIEW<'a> {
w: &'a mut W,
}
impl<'a> _MODFIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: MODFIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Mode fault interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(MODFIEW::MASKED)
}
#[doc = "Mode fault interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(MODFIEW::NOTMASKED)
}
#[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 = "Possible values of the field `TIFREIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIFREIER {
#[doc = "TI frame format error interrupt masked"]
MASKED,
#[doc = "TI frame format error interrupt not masked"]
NOTMASKED,
}
impl TIFREIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
TIFREIER::MASKED => false,
TIFREIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIFREIER {
match value {
false => TIFREIER::MASKED,
true => TIFREIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == TIFREIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == TIFREIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `TIFREIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIFREIEW {
#[doc = "TI frame format error interrupt masked"]
MASKED,
#[doc = "TI frame format error interrupt not masked"]
NOTMASKED,
}
impl TIFREIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIFREIEW::MASKED => false,
TIFREIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIFREIEW<'a> {
w: &'a mut W,
}
impl<'a> _TIFREIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIFREIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TI frame format error interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(TIFREIEW::MASKED)
}
#[doc = "TI frame format error interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(TIFREIEW::NOTMASKED)
}
#[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 = "Possible values of the field `CRCEIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCEIER {
#[doc = "CRC error interrupt masked"]
MASKED,
#[doc = "CRC error interrupt not masked"]
NOTMASKED,
}
impl CRCEIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
CRCEIER::MASKED => false,
CRCEIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> CRCEIER {
match value {
false => CRCEIER::MASKED,
true => CRCEIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == CRCEIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == CRCEIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `CRCEIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCEIEW {
#[doc = "CRC error interrupt masked"]
MASKED,
#[doc = "CRC error interrupt not masked"]
NOTMASKED,
}
impl CRCEIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
CRCEIEW::MASKED => false,
CRCEIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _CRCEIEW<'a> {
w: &'a mut W,
}
impl<'a> _CRCEIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CRCEIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "CRC error interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(CRCEIEW::MASKED)
}
#[doc = "CRC error interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(CRCEIEW::NOTMASKED)
}
#[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 = "Possible values of the field `OVRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRIER {
#[doc = "Overrun interrupt masked"]
MASKED,
#[doc = "Overrun interrupt not masked"]
NOTMASKED,
}
impl OVRIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
OVRIER::MASKED => false,
OVRIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> OVRIER {
match value {
false => OVRIER::MASKED,
true => OVRIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == OVRIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == OVRIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `OVRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRIEW {
#[doc = "Overrun interrupt masked"]
MASKED,
#[doc = "Overrun interrupt not masked"]
NOTMASKED,
}
impl OVRIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
OVRIEW::MASKED => false,
OVRIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _OVRIEW<'a> {
w: &'a mut W,
}
impl<'a> _OVRIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OVRIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Overrun interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(OVRIEW::MASKED)
}
#[doc = "Overrun interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(OVRIEW::NOTMASKED)
}
#[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 = "Possible values of the field `UDRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UDRIER {
#[doc = "Underrun interrupt masked"]
MASKED,
#[doc = "Underrun interrupt not masked"]
NOTMASKED,
}
impl UDRIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
UDRIER::MASKED => false,
UDRIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> UDRIER {
match value {
false => UDRIER::MASKED,
true => UDRIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == UDRIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == UDRIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `UDRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UDRIEW {
#[doc = "Underrun interrupt masked"]
MASKED,
#[doc = "Underrun interrupt not masked"]
NOTMASKED,
}
impl UDRIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
UDRIEW::MASKED => false,
UDRIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _UDRIEW<'a> {
w: &'a mut W,
}
impl<'a> _UDRIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: UDRIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Underrun interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(UDRIEW::MASKED)
}
#[doc = "Underrun interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(UDRIEW::NOTMASKED)
}
#[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 = "Possible values of the field `TXTFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXTFIER {
#[doc = "Transmission transfer filled interrupt masked"]
MASKED,
#[doc = "Transmission transfer filled interrupt not masked"]
NOTMASKED,
}
impl TXTFIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
TXTFIER::MASKED => false,
TXTFIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TXTFIER {
match value {
false => TXTFIER::MASKED,
true => TXTFIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == TXTFIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == TXTFIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `TXTFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXTFIEW {
#[doc = "Transmission transfer filled interrupt masked"]
MASKED,
#[doc = "Transmission transfer filled interrupt not masked"]
NOTMASKED,
}
impl TXTFIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TXTFIEW::MASKED => false,
TXTFIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TXTFIEW<'a> {
w: &'a mut W,
}
impl<'a> _TXTFIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TXTFIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Transmission transfer filled interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(TXTFIEW::MASKED)
}
#[doc = "Transmission transfer filled interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(TXTFIEW::NOTMASKED)
}
#[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 = "Possible values of the field `EOTIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOTIER {
#[doc = "End-of-transfer interrupt masked"]
MASKED,
#[doc = "End-of-transfer interrupt not masked"]
NOTMASKED,
}
impl EOTIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
EOTIER::MASKED => false,
EOTIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOTIER {
match value {
false => EOTIER::MASKED,
true => EOTIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == EOTIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == EOTIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `EOTIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOTIEW {
#[doc = "End-of-transfer interrupt masked"]
MASKED,
#[doc = "End-of-transfer interrupt not masked"]
NOTMASKED,
}
impl EOTIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOTIEW::MASKED => false,
EOTIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOTIEW<'a> {
w: &'a mut W,
}
impl<'a> _EOTIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOTIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End-of-transfer interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(EOTIEW::MASKED)
}
#[doc = "End-of-transfer interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(EOTIEW::NOTMASKED)
}
#[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 = "Possible values of the field `DXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DXPIER {
#[doc = "Duplex transfer complete interrupt masked"]
MASKED,
#[doc = "Duplex transfer complete interrupt not masked"]
NOTMASKED,
}
impl DXPIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
DXPIER::MASKED => false,
DXPIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> DXPIER {
match value {
false => DXPIER::MASKED,
true => DXPIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == DXPIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == DXPIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `DXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DXPIEW {
#[doc = "Duplex transfer complete interrupt masked"]
MASKED,
#[doc = "Duplex transfer complete interrupt not masked"]
NOTMASKED,
}
impl DXPIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
DXPIEW::MASKED => false,
DXPIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _DXPIEW<'a> {
w: &'a mut W,
}
impl<'a> _DXPIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: DXPIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Duplex transfer complete interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(DXPIEW::MASKED)
}
#[doc = "Duplex transfer complete interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(DXPIEW::NOTMASKED)
}
#[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 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = "Possible values of the field `TXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXPIER {
#[doc = "TX space available interrupt masked"]
MASKED,
#[doc = "TX space available interrupt not masked"]
NOTMASKED,
}
impl TXPIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
TXPIER::MASKED => false,
TXPIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TXPIER {
match value {
false => TXPIER::MASKED,
true => TXPIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == TXPIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == TXPIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `TXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXPIEW {
#[doc = "TX space available interrupt masked"]
MASKED,
#[doc = "TX space available interrupt not masked"]
NOTMASKED,
}
impl TXPIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TXPIEW::MASKED => false,
TXPIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TXPIEW<'a> {
w: &'a mut W,
}
impl<'a> _TXPIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TXPIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TX space available interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(TXPIEW::MASKED)
}
#[doc = "TX space available interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(TXPIEW::NOTMASKED)
}
#[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 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = "Possible values of the field `RXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXPIER {
#[doc = "RX data available interrupt masked"]
MASKED,
#[doc = "RX data available interrupt not masked"]
NOTMASKED,
}
impl RXPIER {
#[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"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
RXPIER::MASKED => false,
RXPIER::NOTMASKED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> RXPIER {
match value {
false => RXPIER::MASKED,
true => RXPIER::NOTMASKED,
}
}
#[doc = "Checks if the value of the field is `MASKED`"]
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == RXPIER::MASKED
}
#[doc = "Checks if the value of the field is `NOTMASKED`"]
#[inline(always)]
pub fn is_not_masked(&self) -> bool {
*self == RXPIER::NOTMASKED
}
}
#[doc = "Values that can be written to the field `RXPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXPIEW {
#[doc = "RX data available interrupt masked"]
MASKED,
#[doc = "RX data available interrupt not masked"]
NOTMASKED,
}
impl RXPIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
RXPIEW::MASKED => false,
RXPIEW::NOTMASKED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _RXPIEW<'a> {
w: &'a mut W,
}
impl<'a> _RXPIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RXPIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "RX data available interrupt masked"]
#[inline(always)]
pub fn masked(self) -> &'a mut W {
self.variant(RXPIEW::MASKED)
}
#[doc = "RX data available interrupt not masked"]
#[inline(always)]
pub fn not_masked(self) -> &'a mut W {
self.variant(RXPIEW::NOTMASKED)
}
#[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 << 0);
self.w.bits |= ((value as u32) & 0x01) << 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 10 - Additional number of transactions reload interrupt enable"]
#[inline(always)]
pub fn tserfie(&self) -> TSERFIER {
TSERFIER::_from(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Mode Fault interrupt enable"]
#[inline(always)]
pub fn modfie(&self) -> MODFIER {
MODFIER::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - TIFRE interrupt enable"]
#[inline(always)]
pub fn tifreie(&self) -> TIFREIER {
TIFREIER::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - CRC Interrupt enable"]
#[inline(always)]
pub fn crceie(&self) -> CRCEIER {
CRCEIER::_from(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - OVR interrupt enable"]
#[inline(always)]
pub fn ovrie(&self) -> OVRIER {
OVRIER::_from(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - UDR interrupt enable"]
#[inline(always)]
pub fn udrie(&self) -> UDRIER {
UDRIER::_from(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - TXTFIE interrupt enable"]
#[inline(always)]
pub fn txtfie(&self) -> TXTFIER {
TXTFIER::_from(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - EOT, SUSP and TXC interrupt enable"]
#[inline(always)]
pub fn eotie(&self) -> EOTIER {
EOTIER::_from(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - DXP interrupt enabled"]
#[inline(always)]
pub fn dxpie(&self) -> DXPIER {
DXPIER::_from(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - TXP interrupt enable"]
#[inline(always)]
pub fn txpie(&self) -> TXPIER {
TXPIER::_from(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - RXP Interrupt Enable"]
#[inline(always)]
pub fn rxpie(&self) -> RXPIER {
RXPIER::_from(((self.bits >> 0) & 0x01) != 0)
}
}
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 10 - Additional number of transactions reload interrupt enable"]
#[inline(always)]
pub fn tserfie(&mut self) -> _TSERFIEW {
_TSERFIEW { w: self }
}
#[doc = "Bit 9 - Mode Fault interrupt enable"]
#[inline(always)]
pub fn modfie(&mut self) -> _MODFIEW {
_MODFIEW { w: self }
}
#[doc = "Bit 8 - TIFRE interrupt enable"]
#[inline(always)]
pub fn tifreie(&mut self) -> _TIFREIEW {
_TIFREIEW { w: self }
}
#[doc = "Bit 7 - CRC Interrupt enable"]
#[inline(always)]
pub fn crceie(&mut self) -> _CRCEIEW {
_CRCEIEW { w: self }
}
#[doc = "Bit 6 - OVR interrupt enable"]
#[inline(always)]
pub fn ovrie(&mut self) -> _OVRIEW {
_OVRIEW { w: self }
}
#[doc = "Bit 5 - UDR interrupt enable"]
#[inline(always)]
pub fn udrie(&mut self) -> _UDRIEW {
_UDRIEW { w: self }
}
#[doc = "Bit 4 - TXTFIE interrupt enable"]
#[inline(always)]
pub fn txtfie(&mut self) -> _TXTFIEW {
_TXTFIEW { w: self }
}
#[doc = "Bit 3 - EOT, SUSP and TXC interrupt enable"]
#[inline(always)]
pub fn eotie(&mut self) -> _EOTIEW {
_EOTIEW { w: self }
}
#[doc = "Bit 2 - DXP interrupt enabled"]
#[inline(always)]
pub fn dxpie(&mut self) -> _DXPIEW {
_DXPIEW { w: self }
}
#[doc = "Bit 1 - TXP interrupt enable"]
#[inline(always)]
pub fn txpie(&mut self) -> _TXPIEW {
_TXPIEW { w: self }
}
#[doc = "Bit 0 - RXP Interrupt Enable"]
#[inline(always)]
pub fn rxpie(&mut self) -> _RXPIEW {
_RXPIEW { w: self }
}
}