Remove old PAC from bscan crate.

This commit is contained in:
Corey Schuhen 2024-03-07 08:09:49 +10:00
parent 9ba379fb9e
commit 98e7a0a423
28 changed files with 0 additions and 6559 deletions

View file

@ -1,213 +0,0 @@
/// Register block of bxCAN peripherals.
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - CAN_MCR"]
pub(crate) mcr: MCR,
#[doc = "0x04 - CAN_MSR"]
pub(crate) msr: MSR,
#[doc = "0x08 - CAN_TSR"]
pub(crate) tsr: TSR,
#[doc = "0x0c - CAN_RF0R"]
pub(crate) rfr: [RFR; 2],
#[doc = "0x14 - CAN_IER"]
pub(crate) ier: IER,
#[doc = "0x18 - CAN_ESR"]
pub(crate) esr: ESR,
#[doc = "0x1c - CAN_BTR"]
pub(crate) btr: BTR,
_reserved7: [u8; 352usize],
#[doc = "0x180 - CAN Transmit cluster"]
pub(crate) tx: [TX; 3],
#[doc = "0x1b0 - CAN Receive cluster"]
pub(crate) rx: [RX; 2],
_reserved9: [u8; 48usize],
#[doc = "0x200 - CAN_FMR"]
pub(crate) fmr: FMR,
#[doc = "0x204 - CAN_FM1R"]
pub(crate) fm1r: FM1R,
_reserved11: [u8; 4usize],
#[doc = "0x20c - CAN_FS1R"]
pub(crate) fs1r: FS1R,
_reserved12: [u8; 4usize],
#[doc = "0x214 - CAN_FFA1R"]
pub(crate) ffa1r: FFA1R,
_reserved13: [u8; 4usize],
#[doc = "0x21c - CAN_FA1R"]
pub(crate) fa1r: FA1R,
_reserved14: [u8; 32usize],
#[doc = "0x240 - CAN Filter Bank cluster"]
pub(crate) fb: [FB; 28], // UP TO 28, but 14 in some devices
}
#[doc = r"Register block"]
#[repr(C)]
pub struct TX {
#[doc = "0x00 - CAN_TI0R"]
pub tir: self::tx::TIR,
#[doc = "0x04 - CAN_TDT0R"]
pub tdtr: self::tx::TDTR,
#[doc = "0x08 - CAN_TDL0R"]
pub tdlr: self::tx::TDLR,
#[doc = "0x0c - CAN_TDH0R"]
pub tdhr: self::tx::TDHR,
}
#[doc = r"Register block"]
#[doc = "CAN Transmit cluster"]
pub mod tx;
#[doc = r"Register block"]
#[repr(C)]
pub struct RX {
#[doc = "0x00 - CAN_RI0R"]
pub rir: self::rx::RIR,
#[doc = "0x04 - CAN_RDT0R"]
pub rdtr: self::rx::RDTR,
#[doc = "0x08 - CAN_RDL0R"]
pub rdlr: self::rx::RDLR,
#[doc = "0x0c - CAN_RDH0R"]
pub rdhr: self::rx::RDHR,
}
#[doc = r"Register block"]
#[doc = "CAN Receive cluster"]
pub mod rx;
#[doc = r"Register block"]
#[repr(C)]
pub struct FB {
#[doc = "0x00 - Filter bank 0 register 1"]
pub fr1: self::fb::FR1,
#[doc = "0x04 - Filter bank 0 register 2"]
pub fr2: self::fb::FR2,
}
#[doc = r"Register block"]
#[doc = "CAN Filter Bank cluster"]
pub mod fb;
#[doc = "CAN_MCR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mcr](mcr) module"]
pub type MCR = crate::can::bx::Reg<u32, _MCR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _MCR;
#[doc = "`read()` method returns [mcr::R](mcr::R) reader structure"]
impl crate::can::bx::Readable for MCR {}
#[doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure"]
impl crate::can::bx::Writable for MCR {}
#[doc = "CAN_MCR"]
pub mod mcr;
#[doc = "CAN_MSR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [msr](msr) module"]
pub type MSR = crate::can::bx::Reg<u32, _MSR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _MSR;
#[doc = "`read()` method returns [msr::R](msr::R) reader structure"]
impl crate::can::bx::Readable for MSR {}
#[doc = "`write(|w| ..)` method takes [msr::W](msr::W) writer structure"]
impl crate::can::bx::Writable for MSR {}
#[doc = "CAN_MSR"]
pub mod msr;
#[doc = "CAN_TSR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tsr](tsr) module"]
pub type TSR = crate::can::bx::Reg<u32, _TSR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TSR;
#[doc = "`read()` method returns [tsr::R](tsr::R) reader structure"]
impl crate::can::bx::Readable for TSR {}
#[doc = "`write(|w| ..)` method takes [tsr::W](tsr::W) writer structure"]
impl crate::can::bx::Writable for TSR {}
#[doc = "CAN_TSR"]
pub mod tsr;
#[doc = "CAN_RF0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rfr](rfr) module"]
pub type RFR = crate::can::bx::Reg<u32, _RFR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _RFR;
#[doc = "`read()` method returns [rfr::R](rfr::R) reader structure"]
impl crate::can::bx::Readable for RFR {}
#[doc = "`write(|w| ..)` method takes [rfr::W](rfr::W) writer structure"]
impl crate::can::bx::Writable for RFR {}
#[doc = "CAN_RF0R"]
pub mod rfr;
#[doc = "CAN_IER\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ier](ier) module"]
pub type IER = crate::can::bx::Reg<u32, _IER>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _IER;
#[doc = "`read()` method returns [ier::R](ier::R) reader structure"]
impl crate::can::bx::Readable for IER {}
#[doc = "`write(|w| ..)` method takes [ier::W](ier::W) writer structure"]
impl crate::can::bx::Writable for IER {}
#[doc = "CAN_IER"]
pub mod ier;
#[doc = "CAN_ESR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [esr](esr) module"]
pub type ESR = crate::can::bx::Reg<u32, _ESR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _ESR;
#[doc = "`read()` method returns [esr::R](esr::R) reader structure"]
impl crate::can::bx::Readable for ESR {}
#[doc = "`write(|w| ..)` method takes [esr::W](esr::W) writer structure"]
impl crate::can::bx::Writable for ESR {}
#[doc = "CAN_ESR"]
pub mod esr;
#[doc = "CAN_BTR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [btr](btr) module"]
pub type BTR = crate::can::bx::Reg<u32, _BTR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _BTR;
#[doc = "`read()` method returns [btr::R](btr::R) reader structure"]
impl crate::can::bx::Readable for BTR {}
#[doc = "`write(|w| ..)` method takes [btr::W](btr::W) writer structure"]
impl crate::can::bx::Writable for BTR {}
#[doc = "CAN_BTR"]
pub mod btr;
#[doc = "CAN_FMR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fmr](fmr) module"]
pub type FMR = crate::can::bx::Reg<u32, _FMR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FMR;
#[doc = "`read()` method returns [fmr::R](fmr::R) reader structure"]
impl crate::can::bx::Readable for FMR {}
#[doc = "`write(|w| ..)` method takes [fmr::W](fmr::W) writer structure"]
impl crate::can::bx::Writable for FMR {}
#[doc = "CAN_FMR"]
pub mod fmr;
#[doc = "CAN_FM1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fm1r](fm1r) module"]
pub type FM1R = crate::can::bx::Reg<u32, _FM1R>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FM1R;
#[doc = "`read()` method returns [fm1r::R](fm1r::R) reader structure"]
impl crate::can::bx::Readable for FM1R {}
#[doc = "`write(|w| ..)` method takes [fm1r::W](fm1r::W) writer structure"]
impl crate::can::bx::Writable for FM1R {}
#[doc = "CAN_FM1R"]
pub mod fm1r;
#[doc = "CAN_FS1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fs1r](fs1r) module"]
pub type FS1R = crate::can::bx::Reg<u32, _FS1R>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FS1R;
#[doc = "`read()` method returns [fs1r::R](fs1r::R) reader structure"]
impl crate::can::bx::Readable for FS1R {}
#[doc = "`write(|w| ..)` method takes [fs1r::W](fs1r::W) writer structure"]
impl crate::can::bx::Writable for FS1R {}
#[doc = "CAN_FS1R"]
pub mod fs1r;
#[doc = "CAN_FFA1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ffa1r](ffa1r) module"]
pub type FFA1R = crate::can::bx::Reg<u32, _FFA1R>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FFA1R;
#[doc = "`read()` method returns [ffa1r::R](ffa1r::R) reader structure"]
impl crate::can::bx::Readable for FFA1R {}
#[doc = "`write(|w| ..)` method takes [ffa1r::W](ffa1r::W) writer structure"]
impl crate::can::bx::Writable for FFA1R {}
#[doc = "CAN_FFA1R"]
pub mod ffa1r;
#[doc = "CAN_FA1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fa1r](fa1r) module"]
pub type FA1R = crate::can::bx::Reg<u32, _FA1R>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FA1R;
#[doc = "`read()` method returns [fa1r::R](fa1r::R) reader structure"]
impl crate::can::bx::Readable for FA1R {}
#[doc = "`write(|w| ..)` method takes [fa1r::W](fa1r::W) writer structure"]
impl crate::can::bx::Writable for FA1R {}
#[doc = "CAN_FA1R"]
pub mod fa1r;

View file

@ -1,282 +0,0 @@
#[doc = "Reader of register BTR"]
pub type R = crate::can::bx::R<u32, super::BTR>;
#[doc = "Writer for register BTR"]
pub type W = crate::can::bx::W<u32, super::BTR>;
#[doc = "Register BTR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::BTR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "SILM\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SILM_A {
#[doc = "0: Normal operation"]
NORMAL = 0,
#[doc = "1: Silent Mode"]
SILENT = 1,
}
impl From<SILM_A> for bool {
#[inline(always)]
fn from(variant: SILM_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `SILM`"]
pub type SILM_R = crate::can::bx::R<bool, SILM_A>;
impl SILM_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SILM_A {
match self.bits {
false => SILM_A::NORMAL,
true => SILM_A::SILENT,
}
}
#[doc = "Checks if the value of the field is `NORMAL`"]
#[inline(always)]
pub fn is_normal(&self) -> bool {
*self == SILM_A::NORMAL
}
#[doc = "Checks if the value of the field is `SILENT`"]
#[inline(always)]
pub fn is_silent(&self) -> bool {
*self == SILM_A::SILENT
}
}
#[doc = "Write proxy for field `SILM`"]
pub struct SILM_W<'a> {
w: &'a mut W,
}
impl<'a> SILM_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SILM_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Normal operation"]
#[inline(always)]
pub fn normal(self) -> &'a mut W {
self.variant(SILM_A::NORMAL)
}
#[doc = "Silent Mode"]
#[inline(always)]
pub fn silent(self) -> &'a mut W {
self.variant(SILM_A::SILENT)
}
#[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 << 31)) | (((value as u32) & 0x01) << 31);
self.w
}
}
#[doc = "LBKM\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LBKM_A {
#[doc = "0: Loop Back Mode disabled"]
DISABLED = 0,
#[doc = "1: Loop Back Mode enabled"]
ENABLED = 1,
}
impl From<LBKM_A> for bool {
#[inline(always)]
fn from(variant: LBKM_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `LBKM`"]
pub type LBKM_R = crate::can::bx::R<bool, LBKM_A>;
impl LBKM_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LBKM_A {
match self.bits {
false => LBKM_A::DISABLED,
true => LBKM_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LBKM_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == LBKM_A::ENABLED
}
}
#[doc = "Write proxy for field `LBKM`"]
pub struct LBKM_W<'a> {
w: &'a mut W,
}
impl<'a> LBKM_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LBKM_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Loop Back Mode disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(LBKM_A::DISABLED)
}
#[doc = "Loop Back Mode enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(LBKM_A::ENABLED)
}
#[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 << 30)) | (((value as u32) & 0x01) << 30);
self.w
}
}
#[doc = "Reader of field `SJW`"]
pub type SJW_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `SJW`"]
pub struct SJW_W<'a> {
w: &'a mut W,
}
impl<'a> SJW_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24);
self.w
}
}
#[doc = "Reader of field `TS2`"]
pub type TS2_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `TS2`"]
pub struct TS2_W<'a> {
w: &'a mut W,
}
impl<'a> TS2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 20)) | (((value as u32) & 0x07) << 20);
self.w
}
}
#[doc = "Reader of field `TS1`"]
pub type TS1_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `TS1`"]
pub struct TS1_W<'a> {
w: &'a mut W,
}
impl<'a> TS1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
self.w
}
}
#[doc = "Reader of field `BRP`"]
pub type BRP_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `BRP`"]
pub struct BRP_W<'a> {
w: &'a mut W,
}
impl<'a> BRP_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0x03ff) | ((value as u32) & 0x03ff);
self.w
}
}
impl R {
#[doc = "Bit 31 - SILM"]
#[inline(always)]
pub fn silm(&self) -> SILM_R {
SILM_R::new(((self.bits >> 31) & 0x01) != 0)
}
#[doc = "Bit 30 - LBKM"]
#[inline(always)]
pub fn lbkm(&self) -> LBKM_R {
LBKM_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bits 24:25 - SJW"]
#[inline(always)]
pub fn sjw(&self) -> SJW_R {
SJW_R::new(((self.bits >> 24) & 0x03) as u8)
}
#[doc = "Bits 20:22 - TS2"]
#[inline(always)]
pub fn ts2(&self) -> TS2_R {
TS2_R::new(((self.bits >> 20) & 0x07) as u8)
}
#[doc = "Bits 16:19 - TS1"]
#[inline(always)]
pub fn ts1(&self) -> TS1_R {
TS1_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bits 0:9 - BRP"]
#[inline(always)]
pub fn brp(&self) -> BRP_R {
BRP_R::new((self.bits & 0x03ff) as u16)
}
}
impl W {
#[doc = "Bit 31 - SILM"]
#[inline(always)]
pub fn silm(&mut self) -> SILM_W {
SILM_W { w: self }
}
#[doc = "Bit 30 - LBKM"]
#[inline(always)]
pub fn lbkm(&mut self) -> LBKM_W {
LBKM_W { w: self }
}
#[doc = "Bits 24:25 - SJW"]
#[inline(always)]
pub fn sjw(&mut self) -> SJW_W {
SJW_W { w: self }
}
#[doc = "Bits 20:22 - TS2"]
#[inline(always)]
pub fn ts2(&mut self) -> TS2_W {
TS2_W { w: self }
}
#[doc = "Bits 16:19 - TS1"]
#[inline(always)]
pub fn ts1(&mut self) -> TS1_W {
TS1_W { w: self }
}
#[doc = "Bits 0:9 - BRP"]
#[inline(always)]
pub fn brp(&mut self) -> BRP_W {
BRP_W { w: self }
}
}

View file

@ -1,206 +0,0 @@
#[doc = "Reader of register ESR"]
pub type R = crate::can::bx::R<u32, super::ESR>;
#[doc = "Writer for register ESR"]
pub type W = crate::can::bx::W<u32, super::ESR>;
#[doc = "Register ESR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::ESR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `REC`"]
pub type REC_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `TEC`"]
pub type TEC_R = crate::can::bx::R<u8, u8>;
#[doc = "LEC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum LEC_A {
#[doc = "0: No Error"]
NOERROR = 0,
#[doc = "1: Stuff Error"]
STUFF = 1,
#[doc = "2: Form Error"]
FORM = 2,
#[doc = "3: Acknowledgment Error"]
ACK = 3,
#[doc = "4: Bit recessive Error"]
BITRECESSIVE = 4,
#[doc = "5: Bit dominant Error"]
BITDOMINANT = 5,
#[doc = "6: CRC Error"]
CRC = 6,
#[doc = "7: Set by software"]
CUSTOM = 7,
}
impl From<LEC_A> for u8 {
#[inline(always)]
fn from(variant: LEC_A) -> Self {
variant as _
}
}
#[doc = "Reader of field `LEC`"]
pub type LEC_R = crate::can::bx::R<u8, LEC_A>;
impl LEC_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LEC_A {
match self.bits {
0 => LEC_A::NOERROR,
1 => LEC_A::STUFF,
2 => LEC_A::FORM,
3 => LEC_A::ACK,
4 => LEC_A::BITRECESSIVE,
5 => LEC_A::BITDOMINANT,
6 => LEC_A::CRC,
7 => LEC_A::CUSTOM,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `NOERROR`"]
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == LEC_A::NOERROR
}
#[doc = "Checks if the value of the field is `STUFF`"]
#[inline(always)]
pub fn is_stuff(&self) -> bool {
*self == LEC_A::STUFF
}
#[doc = "Checks if the value of the field is `FORM`"]
#[inline(always)]
pub fn is_form(&self) -> bool {
*self == LEC_A::FORM
}
#[doc = "Checks if the value of the field is `ACK`"]
#[inline(always)]
pub fn is_ack(&self) -> bool {
*self == LEC_A::ACK
}
#[doc = "Checks if the value of the field is `BITRECESSIVE`"]
#[inline(always)]
pub fn is_bit_recessive(&self) -> bool {
*self == LEC_A::BITRECESSIVE
}
#[doc = "Checks if the value of the field is `BITDOMINANT`"]
#[inline(always)]
pub fn is_bit_dominant(&self) -> bool {
*self == LEC_A::BITDOMINANT
}
#[doc = "Checks if the value of the field is `CRC`"]
#[inline(always)]
pub fn is_crc(&self) -> bool {
*self == LEC_A::CRC
}
#[doc = "Checks if the value of the field is `CUSTOM`"]
#[inline(always)]
pub fn is_custom(&self) -> bool {
*self == LEC_A::CUSTOM
}
}
#[doc = "Write proxy for field `LEC`"]
pub struct LEC_W<'a> {
w: &'a mut W,
}
impl<'a> LEC_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LEC_A) -> &'a mut W {
{
self.bits(variant.into())
}
}
#[doc = "No Error"]
#[inline(always)]
pub fn no_error(self) -> &'a mut W {
self.variant(LEC_A::NOERROR)
}
#[doc = "Stuff Error"]
#[inline(always)]
pub fn stuff(self) -> &'a mut W {
self.variant(LEC_A::STUFF)
}
#[doc = "Form Error"]
#[inline(always)]
pub fn form(self) -> &'a mut W {
self.variant(LEC_A::FORM)
}
#[doc = "Acknowledgment Error"]
#[inline(always)]
pub fn ack(self) -> &'a mut W {
self.variant(LEC_A::ACK)
}
#[doc = "Bit recessive Error"]
#[inline(always)]
pub fn bit_recessive(self) -> &'a mut W {
self.variant(LEC_A::BITRECESSIVE)
}
#[doc = "Bit dominant Error"]
#[inline(always)]
pub fn bit_dominant(self) -> &'a mut W {
self.variant(LEC_A::BITDOMINANT)
}
#[doc = "CRC Error"]
#[inline(always)]
pub fn crc(self) -> &'a mut W {
self.variant(LEC_A::CRC)
}
#[doc = "Set by software"]
#[inline(always)]
pub fn custom(self) -> &'a mut W {
self.variant(LEC_A::CUSTOM)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4);
self.w
}
}
#[doc = "Reader of field `BOFF`"]
pub type BOFF_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `EPVF`"]
pub type EPVF_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `EWGF`"]
pub type EWGF_R = crate::can::bx::R<bool, bool>;
impl R {
#[doc = "Bits 24:31 - REC"]
#[inline(always)]
pub fn rec(&self) -> REC_R {
REC_R::new(((self.bits >> 24) & 0xff) as u8)
}
#[doc = "Bits 16:23 - TEC"]
#[inline(always)]
pub fn tec(&self) -> TEC_R {
TEC_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 4:6 - LEC"]
#[inline(always)]
pub fn lec(&self) -> LEC_R {
LEC_R::new(((self.bits >> 4) & 0x07) as u8)
}
#[doc = "Bit 2 - BOFF"]
#[inline(always)]
pub fn boff(&self) -> BOFF_R {
BOFF_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - EPVF"]
#[inline(always)]
pub fn epvf(&self) -> EPVF_R {
EPVF_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - EWGF"]
#[inline(always)]
pub fn ewgf(&self) -> EWGF_R {
EWGF_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bits 4:6 - LEC"]
#[inline(always)]
pub fn lec(&mut self) -> LEC_W {
LEC_W { w: self }
}
}

View file

@ -1,492 +0,0 @@
#[doc = "Reader of register FA1R"]
pub type R = crate::can::bx::R<u32, super::FA1R>;
#[doc = "Writer for register FA1R"]
pub type W = crate::can::bx::W<u32, super::FA1R>;
#[doc = "Register FA1R `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FA1R {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FACT0`"]
pub type FACT0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT0`"]
pub struct FACT0_W<'a> {
w: &'a mut W,
}
impl<'a> FACT0_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 `FACT1`"]
pub type FACT1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT1`"]
pub struct FACT1_W<'a> {
w: &'a mut W,
}
impl<'a> FACT1_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 `FACT2`"]
pub type FACT2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT2`"]
pub struct FACT2_W<'a> {
w: &'a mut W,
}
impl<'a> FACT2_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 `FACT3`"]
pub type FACT3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT3`"]
pub struct FACT3_W<'a> {
w: &'a mut W,
}
impl<'a> FACT3_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 `FACT4`"]
pub type FACT4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT4`"]
pub struct FACT4_W<'a> {
w: &'a mut W,
}
impl<'a> FACT4_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 `FACT5`"]
pub type FACT5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT5`"]
pub struct FACT5_W<'a> {
w: &'a mut W,
}
impl<'a> FACT5_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 `FACT6`"]
pub type FACT6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT6`"]
pub struct FACT6_W<'a> {
w: &'a mut W,
}
impl<'a> FACT6_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 `FACT7`"]
pub type FACT7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT7`"]
pub struct FACT7_W<'a> {
w: &'a mut W,
}
impl<'a> FACT7_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 `FACT8`"]
pub type FACT8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT8`"]
pub struct FACT8_W<'a> {
w: &'a mut W,
}
impl<'a> FACT8_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 `FACT9`"]
pub type FACT9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT9`"]
pub struct FACT9_W<'a> {
w: &'a mut W,
}
impl<'a> FACT9_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 `FACT10`"]
pub type FACT10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT10`"]
pub struct FACT10_W<'a> {
w: &'a mut W,
}
impl<'a> FACT10_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 `FACT11`"]
pub type FACT11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT11`"]
pub struct FACT11_W<'a> {
w: &'a mut W,
}
impl<'a> FACT11_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 `FACT12`"]
pub type FACT12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT12`"]
pub struct FACT12_W<'a> {
w: &'a mut W,
}
impl<'a> FACT12_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 `FACT13`"]
pub type FACT13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT13`"]
pub struct FACT13_W<'a> {
w: &'a mut W,
}
impl<'a> FACT13_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 active"]
#[inline(always)]
pub fn fact0(&self) -> FACT0_R {
FACT0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Filter active"]
#[inline(always)]
pub fn fact1(&self) -> FACT1_R {
FACT1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Filter active"]
#[inline(always)]
pub fn fact2(&self) -> FACT2_R {
FACT2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Filter active"]
#[inline(always)]
pub fn fact3(&self) -> FACT3_R {
FACT3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Filter active"]
#[inline(always)]
pub fn fact4(&self) -> FACT4_R {
FACT4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Filter active"]
#[inline(always)]
pub fn fact5(&self) -> FACT5_R {
FACT5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Filter active"]
#[inline(always)]
pub fn fact6(&self) -> FACT6_R {
FACT6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Filter active"]
#[inline(always)]
pub fn fact7(&self) -> FACT7_R {
FACT7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Filter active"]
#[inline(always)]
pub fn fact8(&self) -> FACT8_R {
FACT8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Filter active"]
#[inline(always)]
pub fn fact9(&self) -> FACT9_R {
FACT9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Filter active"]
#[inline(always)]
pub fn fact10(&self) -> FACT10_R {
FACT10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Filter active"]
#[inline(always)]
pub fn fact11(&self) -> FACT11_R {
FACT11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Filter active"]
#[inline(always)]
pub fn fact12(&self) -> FACT12_R {
FACT12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Filter active"]
#[inline(always)]
pub fn fact13(&self) -> FACT13_R {
FACT13_R::new(((self.bits >> 13) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Filter active"]
#[inline(always)]
pub fn fact0(&mut self) -> FACT0_W {
FACT0_W { w: self }
}
#[doc = "Bit 1 - Filter active"]
#[inline(always)]
pub fn fact1(&mut self) -> FACT1_W {
FACT1_W { w: self }
}
#[doc = "Bit 2 - Filter active"]
#[inline(always)]
pub fn fact2(&mut self) -> FACT2_W {
FACT2_W { w: self }
}
#[doc = "Bit 3 - Filter active"]
#[inline(always)]
pub fn fact3(&mut self) -> FACT3_W {
FACT3_W { w: self }
}
#[doc = "Bit 4 - Filter active"]
#[inline(always)]
pub fn fact4(&mut self) -> FACT4_W {
FACT4_W { w: self }
}
#[doc = "Bit 5 - Filter active"]
#[inline(always)]
pub fn fact5(&mut self) -> FACT5_W {
FACT5_W { w: self }
}
#[doc = "Bit 6 - Filter active"]
#[inline(always)]
pub fn fact6(&mut self) -> FACT6_W {
FACT6_W { w: self }
}
#[doc = "Bit 7 - Filter active"]
#[inline(always)]
pub fn fact7(&mut self) -> FACT7_W {
FACT7_W { w: self }
}
#[doc = "Bit 8 - Filter active"]
#[inline(always)]
pub fn fact8(&mut self) -> FACT8_W {
FACT8_W { w: self }
}
#[doc = "Bit 9 - Filter active"]
#[inline(always)]
pub fn fact9(&mut self) -> FACT9_W {
FACT9_W { w: self }
}
#[doc = "Bit 10 - Filter active"]
#[inline(always)]
pub fn fact10(&mut self) -> FACT10_W {
FACT10_W { w: self }
}
#[doc = "Bit 11 - Filter active"]
#[inline(always)]
pub fn fact11(&mut self) -> FACT11_W {
FACT11_W { w: self }
}
#[doc = "Bit 12 - Filter active"]
#[inline(always)]
pub fn fact12(&mut self) -> FACT12_W {
FACT12_W { w: self }
}
#[doc = "Bit 13 - Filter active"]
#[inline(always)]
pub fn fact13(&mut self) -> FACT13_W {
FACT13_W { w: self }
}
}

View file

@ -1,22 +0,0 @@
#[doc = "Filter bank 0 register 1\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fr1](fr1) module"]
pub type FR1 = crate::can::bx::Reg<u32, _FR1>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FR1;
#[doc = "`read()` method returns [fr1::R](fr1::R) reader structure"]
impl crate::can::bx::Readable for FR1 {}
#[doc = "`write(|w| ..)` method takes [fr1::W](fr1::W) writer structure"]
impl crate::can::bx::Writable for FR1 {}
#[doc = "Filter bank 0 register 1"]
pub mod fr1;
#[doc = "Filter bank 0 register 2\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fr2](fr2) module"]
pub type FR2 = crate::can::bx::Reg<u32, _FR2>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FR2;
#[doc = "`read()` method returns [fr2::R](fr2::R) reader structure"]
impl crate::can::bx::Readable for FR2 {}
#[doc = "`write(|w| ..)` method takes [fr2::W](fr2::W) writer structure"]
impl crate::can::bx::Writable for FR2 {}
#[doc = "Filter bank 0 register 2"]
pub mod fr2;

View file

@ -1,40 +0,0 @@
#[doc = "Reader of register FR1"]
pub type R = crate::can::bx::R<u32, super::FR1>;
#[doc = "Writer for register FR1"]
pub type W = crate::can::bx::W<u32, super::FR1>;
#[doc = "Register FR1 `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FR1 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FB`"]
pub type FB_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `FB`"]
pub struct FB_W<'a> {
w: &'a mut W,
}
impl<'a> FB_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
self.w
}
}
impl R {
#[doc = "Bits 0:31 - Filter bits"]
#[inline(always)]
pub fn fb(&self) -> FB_R {
FB_R::new((self.bits & 0xffff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:31 - Filter bits"]
#[inline(always)]
pub fn fb(&mut self) -> FB_W {
FB_W { w: self }
}
}

View file

@ -1,40 +0,0 @@
#[doc = "Reader of register FR2"]
pub type R = crate::can::bx::R<u32, super::FR2>;
#[doc = "Writer for register FR2"]
pub type W = crate::can::bx::W<u32, super::FR2>;
#[doc = "Register FR2 `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FR2 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FB`"]
pub type FB_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `FB`"]
pub struct FB_W<'a> {
w: &'a mut W,
}
impl<'a> FB_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
self.w
}
}
impl R {
#[doc = "Bits 0:31 - Filter bits"]
#[inline(always)]
pub fn fb(&self) -> FB_R {
FB_R::new((self.bits & 0xffff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:31 - Filter bits"]
#[inline(always)]
pub fn fb(&mut self) -> FB_W {
FB_W { w: self }
}
}

View file

@ -1,492 +0,0 @@
#[doc = "Reader of register FFA1R"]
pub type R = crate::can::bx::R<u32, super::FFA1R>;
#[doc = "Writer for register FFA1R"]
pub type W = crate::can::bx::W<u32, super::FFA1R>;
#[doc = "Register FFA1R `reset()`'s with value 0"]
impl crate::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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::can::bx::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 }
}
}

View file

@ -1,492 +0,0 @@
#[doc = "Reader of register FM1R"]
pub type R = crate::can::bx::R<u32, super::FM1R>;
#[doc = "Writer for register FM1R"]
pub type W = crate::can::bx::W<u32, super::FM1R>;
#[doc = "Register FM1R `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FM1R {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FBM0`"]
pub type FBM0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM0`"]
pub struct FBM0_W<'a> {
w: &'a mut W,
}
impl<'a> FBM0_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 `FBM1`"]
pub type FBM1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM1`"]
pub struct FBM1_W<'a> {
w: &'a mut W,
}
impl<'a> FBM1_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 `FBM2`"]
pub type FBM2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM2`"]
pub struct FBM2_W<'a> {
w: &'a mut W,
}
impl<'a> FBM2_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 `FBM3`"]
pub type FBM3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM3`"]
pub struct FBM3_W<'a> {
w: &'a mut W,
}
impl<'a> FBM3_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 `FBM4`"]
pub type FBM4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM4`"]
pub struct FBM4_W<'a> {
w: &'a mut W,
}
impl<'a> FBM4_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 `FBM5`"]
pub type FBM5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM5`"]
pub struct FBM5_W<'a> {
w: &'a mut W,
}
impl<'a> FBM5_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 `FBM6`"]
pub type FBM6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM6`"]
pub struct FBM6_W<'a> {
w: &'a mut W,
}
impl<'a> FBM6_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 `FBM7`"]
pub type FBM7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM7`"]
pub struct FBM7_W<'a> {
w: &'a mut W,
}
impl<'a> FBM7_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 `FBM8`"]
pub type FBM8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM8`"]
pub struct FBM8_W<'a> {
w: &'a mut W,
}
impl<'a> FBM8_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 `FBM9`"]
pub type FBM9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM9`"]
pub struct FBM9_W<'a> {
w: &'a mut W,
}
impl<'a> FBM9_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 `FBM10`"]
pub type FBM10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM10`"]
pub struct FBM10_W<'a> {
w: &'a mut W,
}
impl<'a> FBM10_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 `FBM11`"]
pub type FBM11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM11`"]
pub struct FBM11_W<'a> {
w: &'a mut W,
}
impl<'a> FBM11_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 `FBM12`"]
pub type FBM12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM12`"]
pub struct FBM12_W<'a> {
w: &'a mut W,
}
impl<'a> FBM12_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 `FBM13`"]
pub type FBM13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM13`"]
pub struct FBM13_W<'a> {
w: &'a mut W,
}
impl<'a> FBM13_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 mode"]
#[inline(always)]
pub fn fbm0(&self) -> FBM0_R {
FBM0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Filter mode"]
#[inline(always)]
pub fn fbm1(&self) -> FBM1_R {
FBM1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Filter mode"]
#[inline(always)]
pub fn fbm2(&self) -> FBM2_R {
FBM2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Filter mode"]
#[inline(always)]
pub fn fbm3(&self) -> FBM3_R {
FBM3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Filter mode"]
#[inline(always)]
pub fn fbm4(&self) -> FBM4_R {
FBM4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Filter mode"]
#[inline(always)]
pub fn fbm5(&self) -> FBM5_R {
FBM5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Filter mode"]
#[inline(always)]
pub fn fbm6(&self) -> FBM6_R {
FBM6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Filter mode"]
#[inline(always)]
pub fn fbm7(&self) -> FBM7_R {
FBM7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Filter mode"]
#[inline(always)]
pub fn fbm8(&self) -> FBM8_R {
FBM8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Filter mode"]
#[inline(always)]
pub fn fbm9(&self) -> FBM9_R {
FBM9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Filter mode"]
#[inline(always)]
pub fn fbm10(&self) -> FBM10_R {
FBM10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Filter mode"]
#[inline(always)]
pub fn fbm11(&self) -> FBM11_R {
FBM11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Filter mode"]
#[inline(always)]
pub fn fbm12(&self) -> FBM12_R {
FBM12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Filter mode"]
#[inline(always)]
pub fn fbm13(&self) -> FBM13_R {
FBM13_R::new(((self.bits >> 13) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Filter mode"]
#[inline(always)]
pub fn fbm0(&mut self) -> FBM0_W {
FBM0_W { w: self }
}
#[doc = "Bit 1 - Filter mode"]
#[inline(always)]
pub fn fbm1(&mut self) -> FBM1_W {
FBM1_W { w: self }
}
#[doc = "Bit 2 - Filter mode"]
#[inline(always)]
pub fn fbm2(&mut self) -> FBM2_W {
FBM2_W { w: self }
}
#[doc = "Bit 3 - Filter mode"]
#[inline(always)]
pub fn fbm3(&mut self) -> FBM3_W {
FBM3_W { w: self }
}
#[doc = "Bit 4 - Filter mode"]
#[inline(always)]
pub fn fbm4(&mut self) -> FBM4_W {
FBM4_W { w: self }
}
#[doc = "Bit 5 - Filter mode"]
#[inline(always)]
pub fn fbm5(&mut self) -> FBM5_W {
FBM5_W { w: self }
}
#[doc = "Bit 6 - Filter mode"]
#[inline(always)]
pub fn fbm6(&mut self) -> FBM6_W {
FBM6_W { w: self }
}
#[doc = "Bit 7 - Filter mode"]
#[inline(always)]
pub fn fbm7(&mut self) -> FBM7_W {
FBM7_W { w: self }
}
#[doc = "Bit 8 - Filter mode"]
#[inline(always)]
pub fn fbm8(&mut self) -> FBM8_W {
FBM8_W { w: self }
}
#[doc = "Bit 9 - Filter mode"]
#[inline(always)]
pub fn fbm9(&mut self) -> FBM9_W {
FBM9_W { w: self }
}
#[doc = "Bit 10 - Filter mode"]
#[inline(always)]
pub fn fbm10(&mut self) -> FBM10_W {
FBM10_W { w: self }
}
#[doc = "Bit 11 - Filter mode"]
#[inline(always)]
pub fn fbm11(&mut self) -> FBM11_W {
FBM11_W { w: self }
}
#[doc = "Bit 12 - Filter mode"]
#[inline(always)]
pub fn fbm12(&mut self) -> FBM12_W {
FBM12_W { w: self }
}
#[doc = "Bit 13 - Filter mode"]
#[inline(always)]
pub fn fbm13(&mut self) -> FBM13_W {
FBM13_W { w: self }
}
}

View file

@ -1,74 +0,0 @@
#[doc = "Reader of register FMR"]
pub type R = crate::can::bx::R<u32, super::FMR>;
#[doc = "Writer for register FMR"]
pub type W = crate::can::bx::W<u32, super::FMR>;
#[doc = "Register FMR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FMR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `CAN2SB`"]
pub type CAN2SB_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `CAN2SB`"]
pub struct CAN2SB_W<'a> {
w: &'a mut W,
}
impl<'a> CAN2SB_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x3f << 8)) | (((value as u32) & 0x3f) << 8);
self.w
}
}
#[doc = "Reader of field `FINIT`"]
pub type FINIT_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FINIT`"]
pub struct FINIT_W<'a> {
w: &'a mut W,
}
impl<'a> FINIT_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
}
}
impl R {
#[doc = "Bits 8:13 - CAN2SB"]
#[inline(always)]
pub fn can2sb(&self) -> CAN2SB_R {
CAN2SB_R::new(((self.bits >> 8) & 0x3f) as u8)
}
#[doc = "Bit 0 - FINIT"]
#[inline(always)]
pub fn finit(&self) -> FINIT_R {
FINIT_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bits 8:13 - CAN2SB"]
#[inline(always)]
pub fn can2sb(&mut self) -> CAN2SB_W {
CAN2SB_W { w: self }
}
#[doc = "Bit 0 - FINIT"]
#[inline(always)]
pub fn finit(&mut self) -> FINIT_W {
FINIT_W { w: self }
}
}

View file

@ -1,492 +0,0 @@
#[doc = "Reader of register FS1R"]
pub type R = crate::can::bx::R<u32, super::FS1R>;
#[doc = "Writer for register FS1R"]
pub type W = crate::can::bx::W<u32, super::FS1R>;
#[doc = "Register FS1R `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::FS1R {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FSC0`"]
pub type FSC0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC0`"]
pub struct FSC0_W<'a> {
w: &'a mut W,
}
impl<'a> FSC0_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 `FSC1`"]
pub type FSC1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC1`"]
pub struct FSC1_W<'a> {
w: &'a mut W,
}
impl<'a> FSC1_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 `FSC2`"]
pub type FSC2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC2`"]
pub struct FSC2_W<'a> {
w: &'a mut W,
}
impl<'a> FSC2_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 `FSC3`"]
pub type FSC3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC3`"]
pub struct FSC3_W<'a> {
w: &'a mut W,
}
impl<'a> FSC3_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 `FSC4`"]
pub type FSC4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC4`"]
pub struct FSC4_W<'a> {
w: &'a mut W,
}
impl<'a> FSC4_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 `FSC5`"]
pub type FSC5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC5`"]
pub struct FSC5_W<'a> {
w: &'a mut W,
}
impl<'a> FSC5_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 `FSC6`"]
pub type FSC6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC6`"]
pub struct FSC6_W<'a> {
w: &'a mut W,
}
impl<'a> FSC6_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 `FSC7`"]
pub type FSC7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC7`"]
pub struct FSC7_W<'a> {
w: &'a mut W,
}
impl<'a> FSC7_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 `FSC8`"]
pub type FSC8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC8`"]
pub struct FSC8_W<'a> {
w: &'a mut W,
}
impl<'a> FSC8_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 `FSC9`"]
pub type FSC9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC9`"]
pub struct FSC9_W<'a> {
w: &'a mut W,
}
impl<'a> FSC9_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 `FSC10`"]
pub type FSC10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC10`"]
pub struct FSC10_W<'a> {
w: &'a mut W,
}
impl<'a> FSC10_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 `FSC11`"]
pub type FSC11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC11`"]
pub struct FSC11_W<'a> {
w: &'a mut W,
}
impl<'a> FSC11_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 `FSC12`"]
pub type FSC12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC12`"]
pub struct FSC12_W<'a> {
w: &'a mut W,
}
impl<'a> FSC12_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 `FSC13`"]
pub type FSC13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC13`"]
pub struct FSC13_W<'a> {
w: &'a mut W,
}
impl<'a> FSC13_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 scale configuration"]
#[inline(always)]
pub fn fsc0(&self) -> FSC0_R {
FSC0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Filter scale configuration"]
#[inline(always)]
pub fn fsc1(&self) -> FSC1_R {
FSC1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Filter scale configuration"]
#[inline(always)]
pub fn fsc2(&self) -> FSC2_R {
FSC2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Filter scale configuration"]
#[inline(always)]
pub fn fsc3(&self) -> FSC3_R {
FSC3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Filter scale configuration"]
#[inline(always)]
pub fn fsc4(&self) -> FSC4_R {
FSC4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Filter scale configuration"]
#[inline(always)]
pub fn fsc5(&self) -> FSC5_R {
FSC5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Filter scale configuration"]
#[inline(always)]
pub fn fsc6(&self) -> FSC6_R {
FSC6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Filter scale configuration"]
#[inline(always)]
pub fn fsc7(&self) -> FSC7_R {
FSC7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Filter scale configuration"]
#[inline(always)]
pub fn fsc8(&self) -> FSC8_R {
FSC8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Filter scale configuration"]
#[inline(always)]
pub fn fsc9(&self) -> FSC9_R {
FSC9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Filter scale configuration"]
#[inline(always)]
pub fn fsc10(&self) -> FSC10_R {
FSC10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Filter scale configuration"]
#[inline(always)]
pub fn fsc11(&self) -> FSC11_R {
FSC11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Filter scale configuration"]
#[inline(always)]
pub fn fsc12(&self) -> FSC12_R {
FSC12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Filter scale configuration"]
#[inline(always)]
pub fn fsc13(&self) -> FSC13_R {
FSC13_R::new(((self.bits >> 13) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Filter scale configuration"]
#[inline(always)]
pub fn fsc0(&mut self) -> FSC0_W {
FSC0_W { w: self }
}
#[doc = "Bit 1 - Filter scale configuration"]
#[inline(always)]
pub fn fsc1(&mut self) -> FSC1_W {
FSC1_W { w: self }
}
#[doc = "Bit 2 - Filter scale configuration"]
#[inline(always)]
pub fn fsc2(&mut self) -> FSC2_W {
FSC2_W { w: self }
}
#[doc = "Bit 3 - Filter scale configuration"]
#[inline(always)]
pub fn fsc3(&mut self) -> FSC3_W {
FSC3_W { w: self }
}
#[doc = "Bit 4 - Filter scale configuration"]
#[inline(always)]
pub fn fsc4(&mut self) -> FSC4_W {
FSC4_W { w: self }
}
#[doc = "Bit 5 - Filter scale configuration"]
#[inline(always)]
pub fn fsc5(&mut self) -> FSC5_W {
FSC5_W { w: self }
}
#[doc = "Bit 6 - Filter scale configuration"]
#[inline(always)]
pub fn fsc6(&mut self) -> FSC6_W {
FSC6_W { w: self }
}
#[doc = "Bit 7 - Filter scale configuration"]
#[inline(always)]
pub fn fsc7(&mut self) -> FSC7_W {
FSC7_W { w: self }
}
#[doc = "Bit 8 - Filter scale configuration"]
#[inline(always)]
pub fn fsc8(&mut self) -> FSC8_W {
FSC8_W { w: self }
}
#[doc = "Bit 9 - Filter scale configuration"]
#[inline(always)]
pub fn fsc9(&mut self) -> FSC9_W {
FSC9_W { w: self }
}
#[doc = "Bit 10 - Filter scale configuration"]
#[inline(always)]
pub fn fsc10(&mut self) -> FSC10_W {
FSC10_W { w: self }
}
#[doc = "Bit 11 - Filter scale configuration"]
#[inline(always)]
pub fn fsc11(&mut self) -> FSC11_W {
FSC11_W { w: self }
}
#[doc = "Bit 12 - Filter scale configuration"]
#[inline(always)]
pub fn fsc12(&mut self) -> FSC12_W {
FSC12_W { w: self }
}
#[doc = "Bit 13 - Filter scale configuration"]
#[inline(always)]
pub fn fsc13(&mut self) -> FSC13_W {
FSC13_W { w: self }
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,356 +0,0 @@
#[doc = "Reader of register MCR"]
pub type R = crate::can::bx::R<u32, super::MCR>;
#[doc = "Writer for register MCR"]
pub type W = crate::can::bx::W<u32, super::MCR>;
#[doc = "Register MCR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::MCR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `DBF`"]
pub type DBF_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `DBF`"]
pub struct DBF_W<'a> {
w: &'a mut W,
}
impl<'a> DBF_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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Reader of field `RESET`"]
pub type RESET_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RESET`"]
pub struct RESET_W<'a> {
w: &'a mut W,
}
impl<'a> RESET_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 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
#[doc = "Reader of field `TTCM`"]
pub type TTCM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TTCM`"]
pub struct TTCM_W<'a> {
w: &'a mut W,
}
impl<'a> TTCM_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 `ABOM`"]
pub type ABOM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABOM`"]
pub struct ABOM_W<'a> {
w: &'a mut W,
}
impl<'a> ABOM_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 `AWUM`"]
pub type AWUM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `AWUM`"]
pub struct AWUM_W<'a> {
w: &'a mut W,
}
impl<'a> AWUM_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 `NART`"]
pub type NART_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `NART`"]
pub struct NART_W<'a> {
w: &'a mut W,
}
impl<'a> NART_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 `RFLM`"]
pub type RFLM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RFLM`"]
pub struct RFLM_W<'a> {
w: &'a mut W,
}
impl<'a> RFLM_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 `TXFP`"]
pub type TXFP_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXFP`"]
pub struct TXFP_W<'a> {
w: &'a mut W,
}
impl<'a> TXFP_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 `SLEEP`"]
pub type SLEEP_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `SLEEP`"]
pub struct SLEEP_W<'a> {
w: &'a mut W,
}
impl<'a> SLEEP_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 `INRQ`"]
pub type INRQ_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `INRQ`"]
pub struct INRQ_W<'a> {
w: &'a mut W,
}
impl<'a> INRQ_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
}
}
impl R {
#[doc = "Bit 16 - DBF"]
#[inline(always)]
pub fn dbf(&self) -> DBF_R {
DBF_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 15 - RESET"]
#[inline(always)]
pub fn reset(&self) -> RESET_R {
RESET_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 7 - TTCM"]
#[inline(always)]
pub fn ttcm(&self) -> TTCM_R {
TTCM_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - ABOM"]
#[inline(always)]
pub fn abom(&self) -> ABOM_R {
ABOM_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - AWUM"]
#[inline(always)]
pub fn awum(&self) -> AWUM_R {
AWUM_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - NART"]
#[inline(always)]
pub fn nart(&self) -> NART_R {
NART_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - RFLM"]
#[inline(always)]
pub fn rflm(&self) -> RFLM_R {
RFLM_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - TXFP"]
#[inline(always)]
pub fn txfp(&self) -> TXFP_R {
TXFP_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - SLEEP"]
#[inline(always)]
pub fn sleep(&self) -> SLEEP_R {
SLEEP_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - INRQ"]
#[inline(always)]
pub fn inrq(&self) -> INRQ_R {
INRQ_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 16 - DBF"]
#[inline(always)]
pub fn dbf(&mut self) -> DBF_W {
DBF_W { w: self }
}
#[doc = "Bit 15 - RESET"]
#[inline(always)]
pub fn reset(&mut self) -> RESET_W {
RESET_W { w: self }
}
#[doc = "Bit 7 - TTCM"]
#[inline(always)]
pub fn ttcm(&mut self) -> TTCM_W {
TTCM_W { w: self }
}
#[doc = "Bit 6 - ABOM"]
#[inline(always)]
pub fn abom(&mut self) -> ABOM_W {
ABOM_W { w: self }
}
#[doc = "Bit 5 - AWUM"]
#[inline(always)]
pub fn awum(&mut self) -> AWUM_W {
AWUM_W { w: self }
}
#[doc = "Bit 4 - NART"]
#[inline(always)]
pub fn nart(&mut self) -> NART_W {
NART_W { w: self }
}
#[doc = "Bit 3 - RFLM"]
#[inline(always)]
pub fn rflm(&mut self) -> RFLM_W {
RFLM_W { w: self }
}
#[doc = "Bit 2 - TXFP"]
#[inline(always)]
pub fn txfp(&mut self) -> TXFP_W {
TXFP_W { w: self }
}
#[doc = "Bit 1 - SLEEP"]
#[inline(always)]
pub fn sleep(&mut self) -> SLEEP_W {
SLEEP_W { w: self }
}
#[doc = "Bit 0 - INRQ"]
#[inline(always)]
pub fn inrq(&mut self) -> INRQ_W {
INRQ_W { w: self }
}
}

View file

@ -1,160 +0,0 @@
#[doc = "Reader of register MSR"]
pub type R = crate::can::bx::R<u32, super::MSR>;
#[doc = "Writer for register MSR"]
pub type W = crate::can::bx::W<u32, super::MSR>;
#[doc = "Register MSR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::MSR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `RX`"]
pub type RX_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `SAMP`"]
pub type SAMP_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `RXM`"]
pub type RXM_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TXM`"]
pub type TXM_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `SLAKI`"]
pub type SLAKI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `SLAKI`"]
pub struct SLAKI_W<'a> {
w: &'a mut W,
}
impl<'a> SLAKI_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 `WKUI`"]
pub type WKUI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `WKUI`"]
pub struct WKUI_W<'a> {
w: &'a mut W,
}
impl<'a> WKUI_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 `ERRI`"]
pub type ERRI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ERRI`"]
pub struct ERRI_W<'a> {
w: &'a mut W,
}
impl<'a> ERRI_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 `SLAK`"]
pub type SLAK_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `INAK`"]
pub type INAK_R = crate::can::bx::R<bool, bool>;
impl R {
#[doc = "Bit 11 - RX"]
#[inline(always)]
pub fn rx(&self) -> RX_R {
RX_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - SAMP"]
#[inline(always)]
pub fn samp(&self) -> SAMP_R {
SAMP_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - RXM"]
#[inline(always)]
pub fn rxm(&self) -> RXM_R {
RXM_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - TXM"]
#[inline(always)]
pub fn txm(&self) -> TXM_R {
TXM_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 4 - SLAKI"]
#[inline(always)]
pub fn slaki(&self) -> SLAKI_R {
SLAKI_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - WKUI"]
#[inline(always)]
pub fn wkui(&self) -> WKUI_R {
WKUI_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - ERRI"]
#[inline(always)]
pub fn erri(&self) -> ERRI_R {
ERRI_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - SLAK"]
#[inline(always)]
pub fn slak(&self) -> SLAK_R {
SLAK_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - INAK"]
#[inline(always)]
pub fn inak(&self) -> INAK_R {
INAK_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 4 - SLAKI"]
#[inline(always)]
pub fn slaki(&mut self) -> SLAKI_W {
SLAKI_W { w: self }
}
#[doc = "Bit 3 - WKUI"]
#[inline(always)]
pub fn wkui(&mut self) -> WKUI_W {
WKUI_W { w: self }
}
#[doc = "Bit 2 - ERRI"]
#[inline(always)]
pub fn erri(&mut self) -> ERRI_W {
ERRI_W { w: self }
}
}

View file

@ -1,281 +0,0 @@
#[doc = "Reader of register RF%sR"]
pub type R = crate::can::bx::R<u32, super::RFR>;
#[doc = "Writer for register RF%sR"]
pub type W = crate::can::bx::W<u32, super::RFR>;
#[doc = "Register RF%sR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::RFR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "RFOM0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RFOM_A {
#[doc = "1: Set by software to release the output mailbox of the FIFO"]
RELEASE = 1,
}
impl From<RFOM_A> for bool {
#[inline(always)]
fn from(variant: RFOM_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `RFOM`"]
pub type RFOM_R = crate::can::bx::R<bool, RFOM_A>;
impl RFOM_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::can::bx::Variant<bool, RFOM_A> {
use crate::can::bx::Variant::*;
match self.bits {
true => Val(RFOM_A::RELEASE),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `RELEASE`"]
#[inline(always)]
pub fn is_release(&self) -> bool {
*self == RFOM_A::RELEASE
}
}
#[doc = "Write proxy for field `RFOM`"]
pub struct RFOM_W<'a> {
w: &'a mut W,
}
impl<'a> RFOM_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFOM_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Set by software to release the output mailbox of the FIFO"]
#[inline(always)]
pub fn release(self) -> &'a mut W {
self.variant(RFOM_A::RELEASE)
}
#[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 = "FOVR0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FOVR_A {
#[doc = "0: No FIFO x overrun"]
NOOVERRUN = 0,
#[doc = "1: FIFO x overrun"]
OVERRUN = 1,
}
impl From<FOVR_A> for bool {
#[inline(always)]
fn from(variant: FOVR_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `FOVR`"]
pub type FOVR_R = crate::can::bx::R<bool, FOVR_A>;
impl FOVR_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FOVR_A {
match self.bits {
false => FOVR_A::NOOVERRUN,
true => FOVR_A::OVERRUN,
}
}
#[doc = "Checks if the value of the field is `NOOVERRUN`"]
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == FOVR_A::NOOVERRUN
}
#[doc = "Checks if the value of the field is `OVERRUN`"]
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == FOVR_A::OVERRUN
}
}
#[doc = "FOVR0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FOVR_AW {
#[doc = "1: Clear flag"]
CLEAR = 1,
}
impl From<FOVR_AW> for bool {
#[inline(always)]
fn from(variant: FOVR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Write proxy for field `FOVR`"]
pub struct FOVR_W<'a> {
w: &'a mut W,
}
impl<'a> FOVR_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FOVR_AW) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(FOVR_AW::CLEAR)
}
#[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 = "FULL0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FULL_A {
#[doc = "0: FIFO x is not full"]
NOTFULL = 0,
#[doc = "1: FIFO x is full"]
FULL = 1,
}
impl From<FULL_A> for bool {
#[inline(always)]
fn from(variant: FULL_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `FULL`"]
pub type FULL_R = crate::can::bx::R<bool, FULL_A>;
impl FULL_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FULL_A {
match self.bits {
false => FULL_A::NOTFULL,
true => FULL_A::FULL,
}
}
#[doc = "Checks if the value of the field is `NOTFULL`"]
#[inline(always)]
pub fn is_not_full(&self) -> bool {
*self == FULL_A::NOTFULL
}
#[doc = "Checks if the value of the field is `FULL`"]
#[inline(always)]
pub fn is_full(&self) -> bool {
*self == FULL_A::FULL
}
}
#[doc = "FULL0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FULL_AW {
#[doc = "1: Clear flag"]
CLEAR = 1,
}
impl From<FULL_AW> for bool {
#[inline(always)]
fn from(variant: FULL_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Write proxy for field `FULL`"]
pub struct FULL_W<'a> {
w: &'a mut W,
}
impl<'a> FULL_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FULL_AW) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(FULL_AW::CLEAR)
}
#[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 `FMP`"]
pub type FMP_R = crate::can::bx::R<u8, u8>;
impl R {
#[doc = "Bit 5 - RFOM0"]
#[inline(always)]
pub fn rfom(&self) -> RFOM_R {
RFOM_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - FOVR0"]
#[inline(always)]
pub fn fovr(&self) -> FOVR_R {
FOVR_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - FULL0"]
#[inline(always)]
pub fn full(&self) -> FULL_R {
FULL_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bits 0:1 - FMP0"]
#[inline(always)]
pub fn fmp(&self) -> FMP_R {
FMP_R::new((self.bits & 0x03) as u8)
}
}
impl W {
#[doc = "Bit 5 - RFOM0"]
#[inline(always)]
pub fn rfom(&mut self) -> RFOM_W {
RFOM_W { w: self }
}
#[doc = "Bit 4 - FOVR0"]
#[inline(always)]
pub fn fovr(&mut self) -> FOVR_W {
FOVR_W { w: self }
}
#[doc = "Bit 3 - FULL0"]
#[inline(always)]
pub fn full(&mut self) -> FULL_W {
FULL_W { w: self }
}
}

View file

@ -1,36 +0,0 @@
#[doc = "CAN_RI0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rir](rir) module"]
pub type RIR = crate::can::bx::Reg<u32, _RIR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _RIR;
#[doc = "`read()` method returns [rir::R](rir::R) reader structure"]
impl crate::can::bx::Readable for RIR {}
#[doc = "CAN_RI0R"]
pub mod rir;
#[doc = "CAN_RDT0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdtr](rdtr) module"]
pub type RDTR = crate::can::bx::Reg<u32, _RDTR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _RDTR;
#[doc = "`read()` method returns [rdtr::R](rdtr::R) reader structure"]
impl crate::can::bx::Readable for RDTR {}
#[doc = "CAN_RDT0R"]
pub mod rdtr;
#[doc = "CAN_RDL0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdlr](rdlr) module"]
pub type RDLR = crate::can::bx::Reg<u32, _RDLR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _RDLR;
#[doc = "`read()` method returns [rdlr::R](rdlr::R) reader structure"]
impl crate::can::bx::Readable for RDLR {}
#[doc = "CAN_RDL0R"]
pub mod rdlr;
#[doc = "CAN_RDH0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdhr](rdhr) module"]
pub type RDHR = crate::can::bx::Reg<u32, _RDHR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _RDHR;
#[doc = "`read()` method returns [rdhr::R](rdhr::R) reader structure"]
impl crate::can::bx::Readable for RDHR {}
#[doc = "CAN_RDH0R"]
pub mod rdhr;

View file

@ -1,32 +0,0 @@
#[doc = "Reader of register RDHR"]
pub type R = crate::can::bx::R<u32, super::RDHR>;
#[doc = "Reader of field `DATA7`"]
pub type DATA7_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA6`"]
pub type DATA6_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA5`"]
pub type DATA5_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA4`"]
pub type DATA4_R = crate::can::bx::R<u8, u8>;
impl R {
#[doc = "Bits 24:31 - DATA7"]
#[inline(always)]
pub fn data7(&self) -> DATA7_R {
DATA7_R::new(((self.bits >> 24) & 0xff) as u8)
}
#[doc = "Bits 16:23 - DATA6"]
#[inline(always)]
pub fn data6(&self) -> DATA6_R {
DATA6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 8:15 - DATA5"]
#[inline(always)]
pub fn data5(&self) -> DATA5_R {
DATA5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - DATA4"]
#[inline(always)]
pub fn data4(&self) -> DATA4_R {
DATA4_R::new((self.bits & 0xff) as u8)
}
}

View file

@ -1,32 +0,0 @@
#[doc = "Reader of register RDLR"]
pub type R = crate::can::bx::R<u32, super::RDLR>;
#[doc = "Reader of field `DATA3`"]
pub type DATA3_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA2`"]
pub type DATA2_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA1`"]
pub type DATA1_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA0`"]
pub type DATA0_R = crate::can::bx::R<u8, u8>;
impl R {
#[doc = "Bits 24:31 - DATA3"]
#[inline(always)]
pub fn data3(&self) -> DATA3_R {
DATA3_R::new(((self.bits >> 24) & 0xff) as u8)
}
#[doc = "Bits 16:23 - DATA2"]
#[inline(always)]
pub fn data2(&self) -> DATA2_R {
DATA2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 8:15 - DATA1"]
#[inline(always)]
pub fn data1(&self) -> DATA1_R {
DATA1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - DATA0"]
#[inline(always)]
pub fn data0(&self) -> DATA0_R {
DATA0_R::new((self.bits & 0xff) as u8)
}
}

View file

@ -1,25 +0,0 @@
#[doc = "Reader of register RDTR"]
pub type R = crate::can::bx::R<u32, super::RDTR>;
#[doc = "Reader of field `TIME`"]
pub type TIME_R = crate::can::bx::R<u16, u16>;
#[doc = "Reader of field `FMI`"]
pub type FMI_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DLC`"]
pub type DLC_R = crate::can::bx::R<u8, u8>;
impl R {
#[doc = "Bits 16:31 - TIME"]
#[inline(always)]
pub fn time(&self) -> TIME_R {
TIME_R::new(((self.bits >> 16) & 0xffff) as u16)
}
#[doc = "Bits 8:15 - FMI"]
#[inline(always)]
pub fn fmi(&self) -> FMI_R {
FMI_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:3 - DLC"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new((self.bits & 0x0f) as u8)
}
}

View file

@ -1,100 +0,0 @@
#[doc = "Reader of register RIR"]
pub type R = crate::can::bx::R<u32, super::RIR>;
#[doc = "Reader of field `STID`"]
pub type STID_R = crate::can::bx::R<u16, u16>;
#[doc = "Reader of field `EXID`"]
pub type EXID_R = crate::can::bx::R<u32, u32>;
#[doc = "IDE\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IDE_A {
#[doc = "0: Standard identifier"]
STANDARD = 0,
#[doc = "1: Extended identifier"]
EXTENDED = 1,
}
impl From<IDE_A> for bool {
#[inline(always)]
fn from(variant: IDE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `IDE`"]
pub type IDE_R = crate::can::bx::R<bool, IDE_A>;
impl IDE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> IDE_A {
match self.bits {
false => IDE_A::STANDARD,
true => IDE_A::EXTENDED,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == IDE_A::STANDARD
}
#[doc = "Checks if the value of the field is `EXTENDED`"]
#[inline(always)]
pub fn is_extended(&self) -> bool {
*self == IDE_A::EXTENDED
}
}
#[doc = "RTR\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTR_A {
#[doc = "0: Data frame"]
DATA = 0,
#[doc = "1: Remote frame"]
REMOTE = 1,
}
impl From<RTR_A> for bool {
#[inline(always)]
fn from(variant: RTR_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `RTR`"]
pub type RTR_R = crate::can::bx::R<bool, RTR_A>;
impl RTR_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RTR_A {
match self.bits {
false => RTR_A::DATA,
true => RTR_A::REMOTE,
}
}
#[doc = "Checks if the value of the field is `DATA`"]
#[inline(always)]
pub fn is_data(&self) -> bool {
*self == RTR_A::DATA
}
#[doc = "Checks if the value of the field is `REMOTE`"]
#[inline(always)]
pub fn is_remote(&self) -> bool {
*self == RTR_A::REMOTE
}
}
impl R {
#[doc = "Bits 21:31 - STID"]
#[inline(always)]
pub fn stid(&self) -> STID_R {
STID_R::new(((self.bits >> 21) & 0x07ff) as u16)
}
#[doc = "Bits 3:20 - EXID"]
#[inline(always)]
pub fn exid(&self) -> EXID_R {
EXID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32)
}
#[doc = "Bit 2 - IDE"]
#[inline(always)]
pub fn ide(&self) -> IDE_R {
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - RTR"]
#[inline(always)]
pub fn rtr(&self) -> RTR_R {
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
}
}

View file

@ -1,575 +0,0 @@
#[doc = "Reader of register TSR"]
pub type R = crate::can::bx::R<u32, super::TSR>;
#[doc = "Writer for register TSR"]
pub type W = crate::can::bx::W<u32, super::TSR>;
#[doc = "Register TSR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::TSR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `LOW2`"]
pub type LOW2_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `LOW1`"]
pub type LOW1_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `LOW0`"]
pub type LOW0_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME2`"]
pub type TME2_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME1`"]
pub type TME1_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME0`"]
pub type TME0_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `CODE`"]
pub type CODE_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `ABRQ2`"]
pub type ABRQ2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ2`"]
pub struct ABRQ2_W<'a> {
w: &'a mut W,
}
impl<'a> ABRQ2_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 << 23)) | (((value as u32) & 0x01) << 23);
self.w
}
}
#[doc = "Reader of field `TERR2`"]
pub type TERR2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR2`"]
pub struct TERR2_W<'a> {
w: &'a mut W,
}
impl<'a> TERR2_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 << 19)) | (((value as u32) & 0x01) << 19);
self.w
}
}
#[doc = "Reader of field `ALST2`"]
pub type ALST2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST2`"]
pub struct ALST2_W<'a> {
w: &'a mut W,
}
impl<'a> ALST2_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 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Reader of field `TXOK2`"]
pub type TXOK2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK2`"]
pub struct TXOK2_W<'a> {
w: &'a mut W,
}
impl<'a> TXOK2_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 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Reader of field `RQCP2`"]
pub type RQCP2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP2`"]
pub struct RQCP2_W<'a> {
w: &'a mut W,
}
impl<'a> RQCP2_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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Reader of field `ABRQ1`"]
pub type ABRQ1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ1`"]
pub struct ABRQ1_W<'a> {
w: &'a mut W,
}
impl<'a> ABRQ1_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 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
#[doc = "Reader of field `TERR1`"]
pub type TERR1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR1`"]
pub struct TERR1_W<'a> {
w: &'a mut W,
}
impl<'a> TERR1_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 `ALST1`"]
pub type ALST1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST1`"]
pub struct ALST1_W<'a> {
w: &'a mut W,
}
impl<'a> ALST1_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 `TXOK1`"]
pub type TXOK1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK1`"]
pub struct TXOK1_W<'a> {
w: &'a mut W,
}
impl<'a> TXOK1_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 `RQCP1`"]
pub type RQCP1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP1`"]
pub struct RQCP1_W<'a> {
w: &'a mut W,
}
impl<'a> RQCP1_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 `ABRQ0`"]
pub type ABRQ0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ0`"]
pub struct ABRQ0_W<'a> {
w: &'a mut W,
}
impl<'a> ABRQ0_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 `TERR0`"]
pub type TERR0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR0`"]
pub struct TERR0_W<'a> {
w: &'a mut W,
}
impl<'a> TERR0_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 `ALST0`"]
pub type ALST0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST0`"]
pub struct ALST0_W<'a> {
w: &'a mut W,
}
impl<'a> ALST0_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 `TXOK0`"]
pub type TXOK0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK0`"]
pub struct TXOK0_W<'a> {
w: &'a mut W,
}
impl<'a> TXOK0_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 `RQCP0`"]
pub type RQCP0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP0`"]
pub struct RQCP0_W<'a> {
w: &'a mut W,
}
impl<'a> RQCP0_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
}
}
impl R {
#[doc = "Bit 31 - Lowest priority flag for mailbox 2"]
#[inline(always)]
pub fn low2(&self) -> LOW2_R {
LOW2_R::new(((self.bits >> 31) & 0x01) != 0)
}
#[doc = "Bit 30 - Lowest priority flag for mailbox 1"]
#[inline(always)]
pub fn low1(&self) -> LOW1_R {
LOW1_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 29 - Lowest priority flag for mailbox 0"]
#[inline(always)]
pub fn low0(&self) -> LOW0_R {
LOW0_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 28 - Lowest priority flag for mailbox 2"]
#[inline(always)]
pub fn tme2(&self) -> TME2_R {
TME2_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 27 - Lowest priority flag for mailbox 1"]
#[inline(always)]
pub fn tme1(&self) -> TME1_R {
TME1_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 26 - Lowest priority flag for mailbox 0"]
#[inline(always)]
pub fn tme0(&self) -> TME0_R {
TME0_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bits 24:25 - CODE"]
#[inline(always)]
pub fn code(&self) -> CODE_R {
CODE_R::new(((self.bits >> 24) & 0x03) as u8)
}
#[doc = "Bit 23 - ABRQ2"]
#[inline(always)]
pub fn abrq2(&self) -> ABRQ2_R {
ABRQ2_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 19 - TERR2"]
#[inline(always)]
pub fn terr2(&self) -> TERR2_R {
TERR2_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 18 - ALST2"]
#[inline(always)]
pub fn alst2(&self) -> ALST2_R {
ALST2_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 17 - TXOK2"]
#[inline(always)]
pub fn txok2(&self) -> TXOK2_R {
TXOK2_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 16 - RQCP2"]
#[inline(always)]
pub fn rqcp2(&self) -> RQCP2_R {
RQCP2_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 15 - ABRQ1"]
#[inline(always)]
pub fn abrq1(&self) -> ABRQ1_R {
ABRQ1_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 11 - TERR1"]
#[inline(always)]
pub fn terr1(&self) -> TERR1_R {
TERR1_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - ALST1"]
#[inline(always)]
pub fn alst1(&self) -> ALST1_R {
ALST1_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - TXOK1"]
#[inline(always)]
pub fn txok1(&self) -> TXOK1_R {
TXOK1_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - RQCP1"]
#[inline(always)]
pub fn rqcp1(&self) -> RQCP1_R {
RQCP1_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - ABRQ0"]
#[inline(always)]
pub fn abrq0(&self) -> ABRQ0_R {
ABRQ0_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 3 - TERR0"]
#[inline(always)]
pub fn terr0(&self) -> TERR0_R {
TERR0_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - ALST0"]
#[inline(always)]
pub fn alst0(&self) -> ALST0_R {
ALST0_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - TXOK0"]
#[inline(always)]
pub fn txok0(&self) -> TXOK0_R {
TXOK0_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - RQCP0"]
#[inline(always)]
pub fn rqcp0(&self) -> RQCP0_R {
RQCP0_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 23 - ABRQ2"]
#[inline(always)]
pub fn abrq2(&mut self) -> ABRQ2_W {
ABRQ2_W { w: self }
}
#[doc = "Bit 19 - TERR2"]
#[inline(always)]
pub fn terr2(&mut self) -> TERR2_W {
TERR2_W { w: self }
}
#[doc = "Bit 18 - ALST2"]
#[inline(always)]
pub fn alst2(&mut self) -> ALST2_W {
ALST2_W { w: self }
}
#[doc = "Bit 17 - TXOK2"]
#[inline(always)]
pub fn txok2(&mut self) -> TXOK2_W {
TXOK2_W { w: self }
}
#[doc = "Bit 16 - RQCP2"]
#[inline(always)]
pub fn rqcp2(&mut self) -> RQCP2_W {
RQCP2_W { w: self }
}
#[doc = "Bit 15 - ABRQ1"]
#[inline(always)]
pub fn abrq1(&mut self) -> ABRQ1_W {
ABRQ1_W { w: self }
}
#[doc = "Bit 11 - TERR1"]
#[inline(always)]
pub fn terr1(&mut self) -> TERR1_W {
TERR1_W { w: self }
}
#[doc = "Bit 10 - ALST1"]
#[inline(always)]
pub fn alst1(&mut self) -> ALST1_W {
ALST1_W { w: self }
}
#[doc = "Bit 9 - TXOK1"]
#[inline(always)]
pub fn txok1(&mut self) -> TXOK1_W {
TXOK1_W { w: self }
}
#[doc = "Bit 8 - RQCP1"]
#[inline(always)]
pub fn rqcp1(&mut self) -> RQCP1_W {
RQCP1_W { w: self }
}
#[doc = "Bit 7 - ABRQ0"]
#[inline(always)]
pub fn abrq0(&mut self) -> ABRQ0_W {
ABRQ0_W { w: self }
}
#[doc = "Bit 3 - TERR0"]
#[inline(always)]
pub fn terr0(&mut self) -> TERR0_W {
TERR0_W { w: self }
}
#[doc = "Bit 2 - ALST0"]
#[inline(always)]
pub fn alst0(&mut self) -> ALST0_W {
ALST0_W { w: self }
}
#[doc = "Bit 1 - TXOK0"]
#[inline(always)]
pub fn txok0(&mut self) -> TXOK0_W {
TXOK0_W { w: self }
}
#[doc = "Bit 0 - RQCP0"]
#[inline(always)]
pub fn rqcp0(&mut self) -> RQCP0_W {
RQCP0_W { w: self }
}
}

View file

@ -1,44 +0,0 @@
#[doc = "CAN_TI0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tir](tir) module"]
pub type TIR = crate::can::bx::Reg<u32, _TIR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TIR;
#[doc = "`read()` method returns [tir::R](tir::R) reader structure"]
impl crate::can::bx::Readable for TIR {}
#[doc = "`write(|w| ..)` method takes [tir::W](tir::W) writer structure"]
impl crate::can::bx::Writable for TIR {}
#[doc = "CAN_TI0R"]
pub mod tir;
#[doc = "CAN_TDT0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdtr](tdtr) module"]
pub type TDTR = crate::can::bx::Reg<u32, _TDTR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TDTR;
#[doc = "`read()` method returns [tdtr::R](tdtr::R) reader structure"]
impl crate::can::bx::Readable for TDTR {}
#[doc = "`write(|w| ..)` method takes [tdtr::W](tdtr::W) writer structure"]
impl crate::can::bx::Writable for TDTR {}
#[doc = "CAN_TDT0R"]
pub mod tdtr;
#[doc = "CAN_TDL0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdlr](tdlr) module"]
pub type TDLR = crate::can::bx::Reg<u32, _TDLR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TDLR;
#[doc = "`read()` method returns [tdlr::R](tdlr::R) reader structure"]
impl crate::can::bx::Readable for TDLR {}
#[doc = "`write(|w| ..)` method takes [tdlr::W](tdlr::W) writer structure"]
impl crate::can::bx::Writable for TDLR {}
#[doc = "CAN_TDL0R"]
pub mod tdlr;
#[doc = "CAN_TDH0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdhr](tdhr) module"]
pub type TDHR = crate::can::bx::Reg<u32, _TDHR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TDHR;
#[doc = "`read()` method returns [tdhr::R](tdhr::R) reader structure"]
impl crate::can::bx::Readable for TDHR {}
#[doc = "`write(|w| ..)` method takes [tdhr::W](tdhr::W) writer structure"]
impl crate::can::bx::Writable for TDHR {}
#[doc = "CAN_TDH0R"]
pub mod tdhr;

View file

@ -1,112 +0,0 @@
#[doc = "Reader of register TDHR"]
pub type R = crate::can::bx::R<u32, super::TDHR>;
#[doc = "Writer for register TDHR"]
pub type W = crate::can::bx::W<u32, super::TDHR>;
#[doc = "Register TDHR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::TDHR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `DATA7`"]
pub type DATA7_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA7`"]
pub struct DATA7_W<'a> {
w: &'a mut W,
}
impl<'a> DATA7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24);
self.w
}
}
#[doc = "Reader of field `DATA6`"]
pub type DATA6_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA6`"]
pub struct DATA6_W<'a> {
w: &'a mut W,
}
impl<'a> DATA6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16);
self.w
}
}
#[doc = "Reader of field `DATA5`"]
pub type DATA5_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA5`"]
pub struct DATA5_W<'a> {
w: &'a mut W,
}
impl<'a> DATA5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
self.w
}
}
#[doc = "Reader of field `DATA4`"]
pub type DATA4_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA4`"]
pub struct DATA4_W<'a> {
w: &'a mut W,
}
impl<'a> DATA4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 24:31 - DATA7"]
#[inline(always)]
pub fn data7(&self) -> DATA7_R {
DATA7_R::new(((self.bits >> 24) & 0xff) as u8)
}
#[doc = "Bits 16:23 - DATA6"]
#[inline(always)]
pub fn data6(&self) -> DATA6_R {
DATA6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 8:15 - DATA5"]
#[inline(always)]
pub fn data5(&self) -> DATA5_R {
DATA5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - DATA4"]
#[inline(always)]
pub fn data4(&self) -> DATA4_R {
DATA4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 24:31 - DATA7"]
#[inline(always)]
pub fn data7(&mut self) -> DATA7_W {
DATA7_W { w: self }
}
#[doc = "Bits 16:23 - DATA6"]
#[inline(always)]
pub fn data6(&mut self) -> DATA6_W {
DATA6_W { w: self }
}
#[doc = "Bits 8:15 - DATA5"]
#[inline(always)]
pub fn data5(&mut self) -> DATA5_W {
DATA5_W { w: self }
}
#[doc = "Bits 0:7 - DATA4"]
#[inline(always)]
pub fn data4(&mut self) -> DATA4_W {
DATA4_W { w: self }
}
}

View file

@ -1,112 +0,0 @@
#[doc = "Reader of register TDLR"]
pub type R = crate::can::bx::R<u32, super::TDLR>;
#[doc = "Writer for register TDLR"]
pub type W = crate::can::bx::W<u32, super::TDLR>;
#[doc = "Register TDLR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::TDLR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `DATA3`"]
pub type DATA3_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA3`"]
pub struct DATA3_W<'a> {
w: &'a mut W,
}
impl<'a> DATA3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24);
self.w
}
}
#[doc = "Reader of field `DATA2`"]
pub type DATA2_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA2`"]
pub struct DATA2_W<'a> {
w: &'a mut W,
}
impl<'a> DATA2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16);
self.w
}
}
#[doc = "Reader of field `DATA1`"]
pub type DATA1_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA1`"]
pub struct DATA1_W<'a> {
w: &'a mut W,
}
impl<'a> DATA1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
self.w
}
}
#[doc = "Reader of field `DATA0`"]
pub type DATA0_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA0`"]
pub struct DATA0_W<'a> {
w: &'a mut W,
}
impl<'a> DATA0_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 24:31 - DATA3"]
#[inline(always)]
pub fn data3(&self) -> DATA3_R {
DATA3_R::new(((self.bits >> 24) & 0xff) as u8)
}
#[doc = "Bits 16:23 - DATA2"]
#[inline(always)]
pub fn data2(&self) -> DATA2_R {
DATA2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 8:15 - DATA1"]
#[inline(always)]
pub fn data1(&self) -> DATA1_R {
DATA1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - DATA0"]
#[inline(always)]
pub fn data0(&self) -> DATA0_R {
DATA0_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 24:31 - DATA3"]
#[inline(always)]
pub fn data3(&mut self) -> DATA3_W {
DATA3_W { w: self }
}
#[doc = "Bits 16:23 - DATA2"]
#[inline(always)]
pub fn data2(&mut self) -> DATA2_W {
DATA2_W { w: self }
}
#[doc = "Bits 8:15 - DATA1"]
#[inline(always)]
pub fn data1(&mut self) -> DATA1_W {
DATA1_W { w: self }
}
#[doc = "Bits 0:7 - DATA0"]
#[inline(always)]
pub fn data0(&mut self) -> DATA0_W {
DATA0_W { w: self }
}
}

View file

@ -1,98 +0,0 @@
#[doc = "Reader of register TDTR"]
pub type R = crate::can::bx::R<u32, super::TDTR>;
#[doc = "Writer for register TDTR"]
pub type W = crate::can::bx::W<u32, super::TDTR>;
#[doc = "Register TDTR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::TDTR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `TIME`"]
pub type TIME_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `TIME`"]
pub struct TIME_W<'a> {
w: &'a mut W,
}
impl<'a> TIME_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16);
self.w
}
}
#[doc = "Reader of field `TGT`"]
pub type TGT_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TGT`"]
pub struct TGT_W<'a> {
w: &'a mut W,
}
impl<'a> TGT_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 `DLC`"]
pub type DLC_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DLC`"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 16:31 - TIME"]
#[inline(always)]
pub fn time(&self) -> TIME_R {
TIME_R::new(((self.bits >> 16) & 0xffff) as u16)
}
#[doc = "Bit 8 - TGT"]
#[inline(always)]
pub fn tgt(&self) -> TGT_R {
TGT_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bits 0:3 - DLC"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 16:31 - TIME"]
#[inline(always)]
pub fn time(&mut self) -> TIME_W {
TIME_W { w: self }
}
#[doc = "Bit 8 - TGT"]
#[inline(always)]
pub fn tgt(&mut self) -> TGT_W {
TGT_W { w: self }
}
#[doc = "Bits 0:3 - DLC"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
}

View file

@ -1,268 +0,0 @@
#[doc = "Reader of register TIR"]
pub type R = crate::can::bx::R<u32, super::TIR>;
#[doc = "Writer for register TIR"]
pub type W = crate::can::bx::W<u32, super::TIR>;
#[doc = "Register TIR `reset()`'s with value 0"]
impl crate::can::bx::ResetValue for super::TIR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `STID`"]
pub type STID_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `STID`"]
pub struct STID_W<'a> {
w: &'a mut W,
}
impl<'a> STID_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07ff << 21)) | (((value as u32) & 0x07ff) << 21);
self.w
}
}
#[doc = "Reader of field `EXID`"]
pub type EXID_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `EXID`"]
pub struct EXID_W<'a> {
w: &'a mut W,
}
impl<'a> EXID_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0003_ffff << 3)) | (((value as u32) & 0x0003_ffff) << 3);
self.w
}
}
#[doc = "IDE\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IDE_A {
#[doc = "0: Standard identifier"]
STANDARD = 0,
#[doc = "1: Extended identifier"]
EXTENDED = 1,
}
impl From<IDE_A> for bool {
#[inline(always)]
fn from(variant: IDE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `IDE`"]
pub type IDE_R = crate::can::bx::R<bool, IDE_A>;
impl IDE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> IDE_A {
match self.bits {
false => IDE_A::STANDARD,
true => IDE_A::EXTENDED,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == IDE_A::STANDARD
}
#[doc = "Checks if the value of the field is `EXTENDED`"]
#[inline(always)]
pub fn is_extended(&self) -> bool {
*self == IDE_A::EXTENDED
}
}
#[doc = "Write proxy for field `IDE`"]
pub struct IDE_W<'a> {
w: &'a mut W,
}
impl<'a> IDE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: IDE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Standard identifier"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(IDE_A::STANDARD)
}
#[doc = "Extended identifier"]
#[inline(always)]
pub fn extended(self) -> &'a mut W {
self.variant(IDE_A::EXTENDED)
}
#[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 = "RTR\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTR_A {
#[doc = "0: Data frame"]
DATA = 0,
#[doc = "1: Remote frame"]
REMOTE = 1,
}
impl From<RTR_A> for bool {
#[inline(always)]
fn from(variant: RTR_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `RTR`"]
pub type RTR_R = crate::can::bx::R<bool, RTR_A>;
impl RTR_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RTR_A {
match self.bits {
false => RTR_A::DATA,
true => RTR_A::REMOTE,
}
}
#[doc = "Checks if the value of the field is `DATA`"]
#[inline(always)]
pub fn is_data(&self) -> bool {
*self == RTR_A::DATA
}
#[doc = "Checks if the value of the field is `REMOTE`"]
#[inline(always)]
pub fn is_remote(&self) -> bool {
*self == RTR_A::REMOTE
}
}
#[doc = "Write proxy for field `RTR`"]
pub struct RTR_W<'a> {
w: &'a mut W,
}
impl<'a> RTR_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTR_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Data frame"]
#[inline(always)]
pub fn data(self) -> &'a mut W {
self.variant(RTR_A::DATA)
}
#[doc = "Remote frame"]
#[inline(always)]
pub fn remote(self) -> &'a mut W {
self.variant(RTR_A::REMOTE)
}
#[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 `TXRQ`"]
pub type TXRQ_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXRQ`"]
pub struct TXRQ_W<'a> {
w: &'a mut W,
}
impl<'a> TXRQ_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
}
}
impl R {
#[doc = "Bits 21:31 - STID"]
#[inline(always)]
pub fn stid(&self) -> STID_R {
STID_R::new(((self.bits >> 21) & 0x07ff) as u16)
}
#[doc = "Bits 3:20 - EXID"]
#[inline(always)]
pub fn exid(&self) -> EXID_R {
EXID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32)
}
#[doc = "Bit 2 - IDE"]
#[inline(always)]
pub fn ide(&self) -> IDE_R {
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - RTR"]
#[inline(always)]
pub fn rtr(&self) -> RTR_R {
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - TXRQ"]
#[inline(always)]
pub fn txrq(&self) -> TXRQ_R {
TXRQ_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bits 21:31 - STID"]
#[inline(always)]
pub fn stid(&mut self) -> STID_W {
STID_W { w: self }
}
#[doc = "Bits 3:20 - EXID"]
#[inline(always)]
pub fn exid(&mut self) -> EXID_W {
EXID_W { w: self }
}
#[doc = "Bit 2 - IDE"]
#[inline(always)]
pub fn ide(&mut self) -> IDE_W {
IDE_W { w: self }
}
#[doc = "Bit 1 - RTR"]
#[inline(always)]
pub fn rtr(&mut self) -> RTR_W {
RTR_W { w: self }
}
#[doc = "Bit 0 - TXRQ"]
#[inline(always)]
pub fn txrq(&mut self) -> TXRQ_W {
TXRQ_W { w: self }
}
}

View file

@ -1,256 +0,0 @@
use core::marker;
///This trait shows that register has `read` method
///
///Registers marked with `Writable` can be also `modify`'ed
pub trait Readable {}
///This trait shows that register has `write`, `write_with_zero` and `reset` method
///
///Registers marked with `Readable` can be also `modify`'ed
pub trait Writable {}
///Reset value of the register
///
///This value is initial value for `write` method.
///It can be also directly writed to register by `reset` method.
pub trait ResetValue {
///Register size
type Type;
///Reset value of the register
fn reset_value() -> Self::Type;
}
///This structure provides volatile access to register
pub struct Reg<U, REG> {
register: vcell::VolatileCell<U>,
_marker: marker::PhantomData<REG>,
}
unsafe impl<U: Send, REG> Send for Reg<U, REG> {}
impl<U, REG> Reg<U, REG>
where
Self: Readable,
U: Copy,
{
///Reads the contents of `Readable` register
///
///You can read the contents of a register in such way:
///```ignore
///let bits = periph.reg.read().bits();
///```
///or get the content of a particular field of a register.
///```ignore
///let reader = periph.reg.read();
///let bits = reader.field1().bits();
///let flag = reader.field2().bit_is_set();
///```
#[inline(always)]
pub fn read(&self) -> R<U, Self> {
R {
bits: self.register.get(),
_reg: marker::PhantomData,
}
}
}
impl<U, REG> Reg<U, REG>
where
Self: ResetValue<Type = U> + Writable,
U: Copy,
{
///Writes the reset value to `Writable` register
///
///Resets the register to its initial state
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
impl<U, REG> Reg<U, REG>
where
Self: ResetValue<Type = U> + Writable,
U: Copy,
{
///Writes bits to `Writable` register
///
///You can write raw bits into a register:
///```ignore
///periph.reg.write(|w| unsafe { w.bits(rawbits) });
///```
///or write only the fields you need:
///```ignore
///periph.reg.write(|w| w
/// .field1().bits(newfield1bits)
/// .field2().set_bit()
/// .field3().variant(VARIANT)
///);
///```
///Other fields will have reset value.
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W<U, Self>) -> &mut W<U, Self>,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
_reg: marker::PhantomData,
})
.bits,
);
}
}
impl<U, REG> Reg<U, REG>
where
Self: Writable,
U: Copy + Default,
{
///Writes Zero to `Writable` register
///
///Similar to `write`, but unused bits will contain 0.
#[inline(always)]
pub fn write_with_zero<F>(&self, f: F)
where
F: FnOnce(&mut W<U, Self>) -> &mut W<U, Self>,
{
self.register.set(
f(&mut W {
bits: U::default(),
_reg: marker::PhantomData,
})
.bits,
);
}
}
impl<U, REG> Reg<U, REG>
where
Self: Readable + Writable,
U: Copy,
{
///Modifies the contents of the register
///
///E.g. to do a read-modify-write sequence to change parts of a register:
///```ignore
///periph.reg.modify(|r, w| unsafe { w.bits(
/// r.bits() | 3
///) });
///```
///or
///```ignore
///periph.reg.modify(|_, w| w
/// .field1().bits(newfield1bits)
/// .field2().set_bit()
/// .field3().variant(VARIANT)
///);
///```
///Other fields will have value they had before call `modify`.
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R<U, Self>, &'w mut W<U, Self>) -> &'w mut W<U, Self>,
{
let bits = self.register.get();
self.register.set(
f(
&R {
bits,
_reg: marker::PhantomData,
},
&mut W {
bits,
_reg: marker::PhantomData,
},
)
.bits,
);
}
}
///Register/field reader
///
///Result of the [`read`](Reg::read) method of a register.
///Also it can be used in the [`modify`](Reg::read) method
pub struct R<U, T> {
pub(crate) bits: U,
_reg: marker::PhantomData<T>,
}
impl<U, T> R<U, T>
where
U: Copy,
{
///Create new instance of reader
#[inline(always)]
pub(crate) fn new(bits: U) -> Self {
Self {
bits,
_reg: marker::PhantomData,
}
}
///Read raw bits from register/field
#[inline(always)]
pub fn bits(&self) -> U {
self.bits
}
}
impl<U, T, FI> PartialEq<FI> for R<U, T>
where
U: PartialEq,
FI: Copy + Into<U>,
{
#[inline(always)]
fn eq(&self, other: &FI) -> bool {
self.bits.eq(&(*other).into())
}
}
impl<FI> R<bool, FI> {
///Value of the field as raw bits
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
///Returns `true` if the bit is clear (0)
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
///Returns `true` if the bit is set (1)
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
///Register writer
///
///Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register
pub struct W<U, REG> {
///Writable bits
pub(crate) bits: U,
_reg: marker::PhantomData<REG>,
}
impl<U, REG> W<U, REG> {
///Writes raw bits to the register
#[inline(always)]
pub unsafe fn bits(&mut self, bits: U) -> &mut Self {
self.bits = bits;
self
}
}
///Used if enumerated values cover not the whole range
#[derive(Clone, Copy, PartialEq)]
pub enum Variant<U, T> {
///Expected variant
Val(T),
///Raw bits
Res(U),
}

View file

@ -1,9 +0,0 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(unused)]
use core::marker::PhantomData;
use core::ops::Deref;
#[doc = "Controller area network"]
pub mod can;
pub mod generic;