bxcan/pac/can/
ffa1r.rs
#[doc = "Reader of register FFA1R"]
pub type R = crate::R<u32, super::FFA1R>;
#[doc = "Writer for register FFA1R"]
pub type W = crate::W<u32, super::FFA1R>;
#[doc = "Register FFA1R `reset()`'s with value 0"]
impl crate::ResetValue for super::FFA1R {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FFA0`"]
pub type FFA0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA0`"]
pub struct FFA0_W<'a> {
w: &'a mut W,
}
impl<'a> FFA0_W<'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 = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Reader of field `FFA1`"]
pub type FFA1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA1`"]
pub struct FFA1_W<'a> {
w: &'a mut W,
}
impl<'a> FFA1_W<'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 = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Reader of field `FFA2`"]
pub type FFA2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA2`"]
pub struct FFA2_W<'a> {
w: &'a mut W,
}
impl<'a> FFA2_W<'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 = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Reader of field `FFA3`"]
pub type FFA3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA3`"]
pub struct FFA3_W<'a> {
w: &'a mut W,
}
impl<'a> FFA3_W<'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 = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Reader of field `FFA4`"]
pub type FFA4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA4`"]
pub struct FFA4_W<'a> {
w: &'a mut W,
}
impl<'a> FFA4_W<'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 = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Reader of field `FFA5`"]
pub type FFA5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA5`"]
pub struct FFA5_W<'a> {
w: &'a mut W,
}
impl<'a> FFA5_W<'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 = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Reader of field `FFA6`"]
pub type FFA6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA6`"]
pub struct FFA6_W<'a> {
w: &'a mut W,
}
impl<'a> FFA6_W<'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 = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Reader of field `FFA7`"]
pub type FFA7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA7`"]
pub struct FFA7_W<'a> {
w: &'a mut W,
}
impl<'a> FFA7_W<'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 = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
#[doc = "Reader of field `FFA8`"]
pub type FFA8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA8`"]
pub struct FFA8_W<'a> {
w: &'a mut W,
}
impl<'a> FFA8_W<'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 = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Reader of field `FFA9`"]
pub type FFA9_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA9`"]
pub struct FFA9_W<'a> {
w: &'a mut W,
}
impl<'a> FFA9_W<'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 = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
self.w
}
}
#[doc = "Reader of field `FFA10`"]
pub type FFA10_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA10`"]
pub struct FFA10_W<'a> {
w: &'a mut W,
}
impl<'a> FFA10_W<'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 = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Reader of field `FFA11`"]
pub type FFA11_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA11`"]
pub struct FFA11_W<'a> {
w: &'a mut W,
}
impl<'a> FFA11_W<'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 = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
self.w
}
}
#[doc = "Reader of field `FFA12`"]
pub type FFA12_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA12`"]
pub struct FFA12_W<'a> {
w: &'a mut W,
}
impl<'a> FFA12_W<'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 = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of field `FFA13`"]
pub type FFA13_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `FFA13`"]
pub struct FFA13_W<'a> {
w: &'a mut W,
}
impl<'a> FFA13_W<'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 = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
self.w
}
}
impl R {
#[doc = "Bit 0 - Filter FIFO assignment for filter 0"]
#[inline(always)]
pub fn ffa0(&self) -> FFA0_R {
FFA0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Filter FIFO assignment for filter 1"]
#[inline(always)]
pub fn ffa1(&self) -> FFA1_R {
FFA1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Filter FIFO assignment for filter 2"]
#[inline(always)]
pub fn ffa2(&self) -> FFA2_R {
FFA2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Filter FIFO assignment for filter 3"]
#[inline(always)]
pub fn ffa3(&self) -> FFA3_R {
FFA3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Filter FIFO assignment for filter 4"]
#[inline(always)]
pub fn ffa4(&self) -> FFA4_R {
FFA4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Filter FIFO assignment for filter 5"]
#[inline(always)]
pub fn ffa5(&self) -> FFA5_R {
FFA5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Filter FIFO assignment for filter 6"]
#[inline(always)]
pub fn ffa6(&self) -> FFA6_R {
FFA6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Filter FIFO assignment for filter 7"]
#[inline(always)]
pub fn ffa7(&self) -> FFA7_R {
FFA7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Filter FIFO assignment for filter 8"]
#[inline(always)]
pub fn ffa8(&self) -> FFA8_R {
FFA8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Filter FIFO assignment for filter 9"]
#[inline(always)]
pub fn ffa9(&self) -> FFA9_R {
FFA9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Filter FIFO assignment for filter 10"]
#[inline(always)]
pub fn ffa10(&self) -> FFA10_R {
FFA10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Filter FIFO assignment for filter 11"]
#[inline(always)]
pub fn ffa11(&self) -> FFA11_R {
FFA11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Filter FIFO assignment for filter 12"]
#[inline(always)]
pub fn ffa12(&self) -> FFA12_R {
FFA12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Filter FIFO assignment for filter 13"]
#[inline(always)]
pub fn ffa13(&self) -> FFA13_R {
FFA13_R::new(((self.bits >> 13) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Filter FIFO assignment for filter 0"]
#[inline(always)]
pub fn ffa0(&mut self) -> FFA0_W {
FFA0_W { w: self }
}
#[doc = "Bit 1 - Filter FIFO assignment for filter 1"]
#[inline(always)]
pub fn ffa1(&mut self) -> FFA1_W {
FFA1_W { w: self }
}
#[doc = "Bit 2 - Filter FIFO assignment for filter 2"]
#[inline(always)]
pub fn ffa2(&mut self) -> FFA2_W {
FFA2_W { w: self }
}
#[doc = "Bit 3 - Filter FIFO assignment for filter 3"]
#[inline(always)]
pub fn ffa3(&mut self) -> FFA3_W {
FFA3_W { w: self }
}
#[doc = "Bit 4 - Filter FIFO assignment for filter 4"]
#[inline(always)]
pub fn ffa4(&mut self) -> FFA4_W {
FFA4_W { w: self }
}
#[doc = "Bit 5 - Filter FIFO assignment for filter 5"]
#[inline(always)]
pub fn ffa5(&mut self) -> FFA5_W {
FFA5_W { w: self }
}
#[doc = "Bit 6 - Filter FIFO assignment for filter 6"]
#[inline(always)]
pub fn ffa6(&mut self) -> FFA6_W {
FFA6_W { w: self }
}
#[doc = "Bit 7 - Filter FIFO assignment for filter 7"]
#[inline(always)]
pub fn ffa7(&mut self) -> FFA7_W {
FFA7_W { w: self }
}
#[doc = "Bit 8 - Filter FIFO assignment for filter 8"]
#[inline(always)]
pub fn ffa8(&mut self) -> FFA8_W {
FFA8_W { w: self }
}
#[doc = "Bit 9 - Filter FIFO assignment for filter 9"]
#[inline(always)]
pub fn ffa9(&mut self) -> FFA9_W {
FFA9_W { w: self }
}
#[doc = "Bit 10 - Filter FIFO assignment for filter 10"]
#[inline(always)]
pub fn ffa10(&mut self) -> FFA10_W {
FFA10_W { w: self }
}
#[doc = "Bit 11 - Filter FIFO assignment for filter 11"]
#[inline(always)]
pub fn ffa11(&mut self) -> FFA11_W {
FFA11_W { w: self }
}
#[doc = "Bit 12 - Filter FIFO assignment for filter 12"]
#[inline(always)]
pub fn ffa12(&mut self) -> FFA12_W {
FFA12_W { w: self }
}
#[doc = "Bit 13 - Filter FIFO assignment for filter 13"]
#[inline(always)]
pub fn ffa13(&mut self) -> FFA13_W {
FFA13_W { w: self }
}
}