Make use of internal BXCAN crate work. Tested on stm32f103 with real bus and HIL tests.

Fix
This commit is contained in:
Corey Schuhen 2024-03-03 16:23:40 +10:00
parent f736f1b27f
commit fecb65b988
34 changed files with 376 additions and 375 deletions

View File

@ -72,7 +72,6 @@ critical-section = "1.1"
#stm32-metapac = { version = "15" } #stm32-metapac = { version = "15" }
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-e7f91751fbbf856e0cb30e50ae6db79f0409b085" } stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-e7f91751fbbf856e0cb30e50ae6db79f0409b085" }
vcell = "0.1.3" vcell = "0.1.3"
bxcan = "0.7.0"
nb = "1.0.0" nb = "1.0.0"
stm32-fmc = "0.3.0" stm32-fmc = "0.3.0"
cfg-if = "1.0.0" cfg-if = "1.0.0"
@ -84,6 +83,7 @@ document-features = "0.2.7"
static_assertions = { version = "1.1" } static_assertions = { version = "1.1" }
volatile-register = { version = "0.2.1" } volatile-register = { version = "0.2.1" }
bitflags = "2.4.2"
@ -104,7 +104,7 @@ default = ["rt"]
rt = ["stm32-metapac/rt"] rt = ["stm32-metapac/rt"]
## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging ## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging
defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io-async/defmt-03", "embassy-usb-driver/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"] defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io-async/defmt-03", "embassy-usb-driver/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"]
exti = [] exti = []
low-power = [ "dep:embassy-executor", "embassy-executor?/arch-cortex-m", "time" ] low-power = [ "dep:embassy-executor", "embassy-executor?/arch-cortex-m", "time" ]

View File

@ -2,8 +2,8 @@
use core::marker::PhantomData; use core::marker::PhantomData;
use crate::pac::can::RegisterBlock; use crate::can::bx::pac::can::RegisterBlock;
use crate::{ExtendedId, Fifo, FilterOwner, Id, Instance, MasterInstance, StandardId}; use crate::can::bx::{ExtendedId, Fifo, FilterOwner, Id, Instance, MasterInstance, StandardId};
const F32_RTR: u32 = 0b010; // set the RTR bit to match remote frames const F32_RTR: u32 = 0b010; // set the RTR bit to match remote frames
const F32_IDE: u32 = 0b100; // set the IDE bit to match extended identifiers const F32_IDE: u32 = 0b100; // set the IDE bit to match extended identifiers
@ -14,19 +14,19 @@ const F16_IDE: u16 = 0b01000;
/// ///
/// This can match data and remote frames using standard IDs. /// This can match data and remote frames using standard IDs.
#[derive(Debug, Copy, Clone, Eq, PartialEq)] #[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ListEntry16(u16); pub struct ListEntry16(u16);
/// A 32-bit filter list entry. /// A 32-bit filter list entry.
/// ///
/// This can match data and remote frames using extended or standard IDs. /// This can match data and remote frames using extended or standard IDs.
#[derive(Debug, Copy, Clone, Eq, PartialEq)] #[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ListEntry32(u32); pub struct ListEntry32(u32);
/// A 16-bit identifier mask. /// A 16-bit identifier mask.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Mask16 { pub struct Mask16 {
id: u16, id: u16,
mask: u16, mask: u16,
@ -34,7 +34,7 @@ pub struct Mask16 {
/// A 32-bit identifier mask. /// A 32-bit identifier mask.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Mask32 { pub struct Mask32 {
id: u32, id: u32,
mask: u32, mask: u32,
@ -170,7 +170,7 @@ impl Mask32 {
/// The configuration of a filter bank. /// The configuration of a filter bank.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum BankConfig { pub enum BankConfig {
List16([ListEntry16; 4]), List16([ListEntry16; 4]),
List32([ListEntry32; 2]), List32([ListEntry32; 2]),

View File

@ -1,14 +1,14 @@
#[cfg(test)] #[cfg(test)]
mod tests;
use core::cmp::Ordering; use core::cmp::Ordering;
use core::ops::{Deref, DerefMut}; use core::ops::{Deref, DerefMut};
use crate::{Id, IdReg}; use crate::can::bx::{Id, IdReg};
/// A CAN data or remote frame. /// A CAN data or remote frame.
#[derive(Clone, Debug, Eq)] #[derive(Clone, Debug, Eq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] //#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Frame { pub struct Frame {
pub(crate) id: IdReg, pub(crate) id: IdReg,
pub(crate) data: Data, pub(crate) data: Data,
@ -128,20 +128,20 @@ pub struct FramePriority(IdReg);
/// Ordering is based on the Identifier and frame type (data vs. remote) and can be used to sort /// Ordering is based on the Identifier and frame type (data vs. remote) and can be used to sort
/// frames by priority. /// frames by priority.
impl Ord for FramePriority { impl Ord for FramePriority {
fn cmp(&self, other: &Self) -> Ordering { fn cmp(&self, other: &Self) -> core::cmp::Ordering {
self.0.cmp(&other.0) self.0.cmp(&other.0)
} }
} }
impl PartialOrd for FramePriority { impl PartialOrd for FramePriority {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
Some(self.cmp(other)) Some(self.cmp(other))
} }
} }
impl PartialEq for FramePriority { impl PartialEq for FramePriority {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
self.cmp(other) == Ordering::Equal self.cmp(other) == core::cmp::Ordering::Equal
} }
} }
@ -227,7 +227,7 @@ impl PartialEq for Data {
impl Eq for Data {} impl Eq for Data {}
#[cfg(feature = "unstable-defmt")] #[cfg(feature = "defmt")]
impl defmt::Format for Data { impl defmt::Format for Data {
fn format(&self, fmt: defmt::Formatter<'_>) { fn format(&self, fmt: defmt::Formatter<'_>) {
self.as_ref().format(fmt) self.as_ref().format(fmt)

View File

@ -3,7 +3,7 @@
use core::ops; use core::ops;
#[allow(unused_imports)] // for intra-doc links only #[allow(unused_imports)] // for intra-doc links only
use crate::{Can, Rx0}; use crate::can::bx::{Can, Rx0};
/// bxCAN interrupt sources. /// bxCAN interrupt sources.
/// ///
@ -18,7 +18,7 @@ use crate::{Can, Rx0};
/// This means that some of the interrupts listed here will result in the same interrupt handler /// This means that some of the interrupts listed here will result in the same interrupt handler
/// being invoked. /// being invoked.
#[derive(Debug, Copy, Clone, Eq, PartialEq)] #[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive] #[non_exhaustive]
pub enum Interrupt { pub enum Interrupt {
/// Fires the **TX** interrupt when one of the transmit mailboxes returns to empty state. /// Fires the **TX** interrupt when one of the transmit mailboxes returns to empty state.

View File

@ -23,7 +23,7 @@
//! //!
//! | Feature | Description | //! | Feature | Description |
//! |---------|-------------| //! |---------|-------------|
//! | `unstable-defmt` | Implements [`defmt`]'s `Format` trait for the types in this crate.[^1] | //! | `defmt` | Implements [`defmt`]'s `Format` trait for the types in this crate.[^1] |
//! //!
//! [^1]: The specific version of defmt is unspecified and may be updated in a patch release. //! [^1]: The specific version of defmt is unspecified and may be updated in a patch release.
//! //!
@ -36,7 +36,7 @@
#![no_std] #![no_std]
#![allow(clippy::unnecessary_operation)] // lint is bugged #![allow(clippy::unnecessary_operation)] // lint is bugged
mod embedded_hal; //mod embedded_hal;
pub mod filter; pub mod filter;
mod frame; mod frame;
mod id; mod id;
@ -47,11 +47,11 @@ mod pac;
pub use id::{ExtendedId, Id, StandardId}; pub use id::{ExtendedId, Id, StandardId};
pub use crate::frame::{Data, Frame, FramePriority}; pub use crate::can::bx::frame::{Data, Frame, FramePriority};
pub use crate::interrupt::{Interrupt, Interrupts}; pub use crate::can::bx::interrupt::{Interrupt, Interrupts};
pub use crate::pac::can::RegisterBlock; pub use crate::can::bx::pac::can::RegisterBlock;
use crate::filter::MasterFilters; use crate::can::bx::filter::MasterFilters;
use core::cmp::{Ord, Ordering}; use core::cmp::{Ord, Ordering};
use core::convert::{Infallible, TryInto}; use core::convert::{Infallible, TryInto};
use core::marker::PhantomData; use core::marker::PhantomData;
@ -124,7 +124,7 @@ pub enum Error {
/// Error that indicates that an incoming message has been lost due to buffer overrun. /// Error that indicates that an incoming message has been lost due to buffer overrun.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct OverrunError { pub struct OverrunError {
_priv: (), _priv: (),
} }
@ -140,7 +140,7 @@ pub struct OverrunError {
/// have a higher priority than extended frames and data frames have a higher /// have a higher priority than extended frames and data frames have a higher
/// priority than remote frames. /// priority than remote frames.
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
struct IdReg(u32); struct IdReg(u32);
impl IdReg { impl IdReg {
@ -1060,7 +1060,7 @@ fn receive_fifo(can: &RegisterBlock, fifo_nr: usize) -> nb::Result<Frame, Overru
/// Identifies one of the two receive FIFOs. /// Identifies one of the two receive FIFOs.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Fifo { pub enum Fifo {
Fifo0 = 0, Fifo0 = 0,
Fifo1 = 1, Fifo1 = 1,
@ -1068,7 +1068,7 @@ pub enum Fifo {
/// Identifies one of the three transmit mailboxes. /// Identifies one of the three transmit mailboxes.
#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)] #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
#[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Mailbox { pub enum Mailbox {
/// Transmit mailbox 0 /// Transmit mailbox 0
Mailbox0 = 0, Mailbox0 = 0,

View File

@ -79,135 +79,135 @@ pub struct FB {
#[doc = r"Register block"] #[doc = r"Register block"]
#[doc = "CAN Filter Bank cluster"] #[doc = "CAN Filter Bank cluster"]
pub mod fb; pub mod fb;
#[doc = "CAN_MCR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mcr](mcr) module"] #[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::Reg<u32, _MCR>; pub type MCR = crate::can::bx::Reg<u32, _MCR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _MCR; pub struct _MCR;
#[doc = "`read()` method returns [mcr::R](mcr::R) reader structure"] #[doc = "`read()` method returns [mcr::R](mcr::R) reader structure"]
impl crate::Readable for MCR {} impl crate::can::bx::Readable for MCR {}
#[doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure"]
impl crate::Writable for MCR {} impl crate::can::bx::Writable for MCR {}
#[doc = "CAN_MCR"] #[doc = "CAN_MCR"]
pub mod mcr; pub mod mcr;
#[doc = "CAN_MSR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [msr](msr) module"] #[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::Reg<u32, _MSR>; pub type MSR = crate::can::bx::Reg<u32, _MSR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _MSR; pub struct _MSR;
#[doc = "`read()` method returns [msr::R](msr::R) reader structure"] #[doc = "`read()` method returns [msr::R](msr::R) reader structure"]
impl crate::Readable for MSR {} impl crate::can::bx::Readable for MSR {}
#[doc = "`write(|w| ..)` method takes [msr::W](msr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [msr::W](msr::W) writer structure"]
impl crate::Writable for MSR {} impl crate::can::bx::Writable for MSR {}
#[doc = "CAN_MSR"] #[doc = "CAN_MSR"]
pub mod msr; pub mod msr;
#[doc = "CAN_TSR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tsr](tsr) module"] #[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::Reg<u32, _TSR>; pub type TSR = crate::can::bx::Reg<u32, _TSR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _TSR; pub struct _TSR;
#[doc = "`read()` method returns [tsr::R](tsr::R) reader structure"] #[doc = "`read()` method returns [tsr::R](tsr::R) reader structure"]
impl crate::Readable for TSR {} impl crate::can::bx::Readable for TSR {}
#[doc = "`write(|w| ..)` method takes [tsr::W](tsr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [tsr::W](tsr::W) writer structure"]
impl crate::Writable for TSR {} impl crate::can::bx::Writable for TSR {}
#[doc = "CAN_TSR"] #[doc = "CAN_TSR"]
pub mod tsr; pub mod tsr;
#[doc = "CAN_RF0R\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rfr](rfr) module"] #[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::Reg<u32, _RFR>; pub type RFR = crate::can::bx::Reg<u32, _RFR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _RFR; pub struct _RFR;
#[doc = "`read()` method returns [rfr::R](rfr::R) reader structure"] #[doc = "`read()` method returns [rfr::R](rfr::R) reader structure"]
impl crate::Readable for RFR {} impl crate::can::bx::Readable for RFR {}
#[doc = "`write(|w| ..)` method takes [rfr::W](rfr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [rfr::W](rfr::W) writer structure"]
impl crate::Writable for RFR {} impl crate::can::bx::Writable for RFR {}
#[doc = "CAN_RF0R"] #[doc = "CAN_RF0R"]
pub mod rfr; pub mod rfr;
#[doc = "CAN_IER\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ier](ier) module"] #[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::Reg<u32, _IER>; pub type IER = crate::can::bx::Reg<u32, _IER>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _IER; pub struct _IER;
#[doc = "`read()` method returns [ier::R](ier::R) reader structure"] #[doc = "`read()` method returns [ier::R](ier::R) reader structure"]
impl crate::Readable for IER {} impl crate::can::bx::Readable for IER {}
#[doc = "`write(|w| ..)` method takes [ier::W](ier::W) writer structure"] #[doc = "`write(|w| ..)` method takes [ier::W](ier::W) writer structure"]
impl crate::Writable for IER {} impl crate::can::bx::Writable for IER {}
#[doc = "CAN_IER"] #[doc = "CAN_IER"]
pub mod ier; pub mod ier;
#[doc = "CAN_ESR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [esr](esr) module"] #[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::Reg<u32, _ESR>; pub type ESR = crate::can::bx::Reg<u32, _ESR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _ESR; pub struct _ESR;
#[doc = "`read()` method returns [esr::R](esr::R) reader structure"] #[doc = "`read()` method returns [esr::R](esr::R) reader structure"]
impl crate::Readable for ESR {} impl crate::can::bx::Readable for ESR {}
#[doc = "`write(|w| ..)` method takes [esr::W](esr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [esr::W](esr::W) writer structure"]
impl crate::Writable for ESR {} impl crate::can::bx::Writable for ESR {}
#[doc = "CAN_ESR"] #[doc = "CAN_ESR"]
pub mod esr; pub mod esr;
#[doc = "CAN_BTR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [btr](btr) module"] #[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::Reg<u32, _BTR>; pub type BTR = crate::can::bx::Reg<u32, _BTR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _BTR; pub struct _BTR;
#[doc = "`read()` method returns [btr::R](btr::R) reader structure"] #[doc = "`read()` method returns [btr::R](btr::R) reader structure"]
impl crate::Readable for BTR {} impl crate::can::bx::Readable for BTR {}
#[doc = "`write(|w| ..)` method takes [btr::W](btr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [btr::W](btr::W) writer structure"]
impl crate::Writable for BTR {} impl crate::can::bx::Writable for BTR {}
#[doc = "CAN_BTR"] #[doc = "CAN_BTR"]
pub mod btr; pub mod btr;
#[doc = "CAN_FMR\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fmr](fmr) module"] #[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::Reg<u32, _FMR>; pub type FMR = crate::can::bx::Reg<u32, _FMR>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _FMR; pub struct _FMR;
#[doc = "`read()` method returns [fmr::R](fmr::R) reader structure"] #[doc = "`read()` method returns [fmr::R](fmr::R) reader structure"]
impl crate::Readable for FMR {} impl crate::can::bx::Readable for FMR {}
#[doc = "`write(|w| ..)` method takes [fmr::W](fmr::W) writer structure"] #[doc = "`write(|w| ..)` method takes [fmr::W](fmr::W) writer structure"]
impl crate::Writable for FMR {} impl crate::can::bx::Writable for FMR {}
#[doc = "CAN_FMR"] #[doc = "CAN_FMR"]
pub mod fmr; pub mod fmr;
#[doc = "CAN_FM1R\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fm1r](fm1r) module"] #[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::Reg<u32, _FM1R>; pub type FM1R = crate::can::bx::Reg<u32, _FM1R>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _FM1R; pub struct _FM1R;
#[doc = "`read()` method returns [fm1r::R](fm1r::R) reader structure"] #[doc = "`read()` method returns [fm1r::R](fm1r::R) reader structure"]
impl crate::Readable for FM1R {} impl crate::can::bx::Readable for FM1R {}
#[doc = "`write(|w| ..)` method takes [fm1r::W](fm1r::W) writer structure"] #[doc = "`write(|w| ..)` method takes [fm1r::W](fm1r::W) writer structure"]
impl crate::Writable for FM1R {} impl crate::can::bx::Writable for FM1R {}
#[doc = "CAN_FM1R"] #[doc = "CAN_FM1R"]
pub mod fm1r; pub mod fm1r;
#[doc = "CAN_FS1R\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fs1r](fs1r) module"] #[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::Reg<u32, _FS1R>; pub type FS1R = crate::can::bx::Reg<u32, _FS1R>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _FS1R; pub struct _FS1R;
#[doc = "`read()` method returns [fs1r::R](fs1r::R) reader structure"] #[doc = "`read()` method returns [fs1r::R](fs1r::R) reader structure"]
impl crate::Readable for FS1R {} impl crate::can::bx::Readable for FS1R {}
#[doc = "`write(|w| ..)` method takes [fs1r::W](fs1r::W) writer structure"] #[doc = "`write(|w| ..)` method takes [fs1r::W](fs1r::W) writer structure"]
impl crate::Writable for FS1R {} impl crate::can::bx::Writable for FS1R {}
#[doc = "CAN_FS1R"] #[doc = "CAN_FS1R"]
pub mod fs1r; pub mod fs1r;
#[doc = "CAN_FFA1R\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ffa1r](ffa1r) module"] #[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::Reg<u32, _FFA1R>; pub type FFA1R = crate::can::bx::Reg<u32, _FFA1R>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _FFA1R; pub struct _FFA1R;
#[doc = "`read()` method returns [ffa1r::R](ffa1r::R) reader structure"] #[doc = "`read()` method returns [ffa1r::R](ffa1r::R) reader structure"]
impl crate::Readable for FFA1R {} impl crate::can::bx::Readable for FFA1R {}
#[doc = "`write(|w| ..)` method takes [ffa1r::W](ffa1r::W) writer structure"] #[doc = "`write(|w| ..)` method takes [ffa1r::W](ffa1r::W) writer structure"]
impl crate::Writable for FFA1R {} impl crate::can::bx::Writable for FFA1R {}
#[doc = "CAN_FFA1R"] #[doc = "CAN_FFA1R"]
pub mod ffa1r; pub mod ffa1r;
#[doc = "CAN_FA1R\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fa1r](fa1r) module"] #[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::Reg<u32, _FA1R>; pub type FA1R = crate::can::bx::Reg<u32, _FA1R>;
#[allow(missing_docs)] #[allow(missing_docs)]
#[doc(hidden)] #[doc(hidden)]
pub struct _FA1R; pub struct _FA1R;
#[doc = "`read()` method returns [fa1r::R](fa1r::R) reader structure"] #[doc = "`read()` method returns [fa1r::R](fa1r::R) reader structure"]
impl crate::Readable for FA1R {} impl crate::can::bx::Readable for FA1R {}
#[doc = "`write(|w| ..)` method takes [fa1r::W](fa1r::W) writer structure"] #[doc = "`write(|w| ..)` method takes [fa1r::W](fa1r::W) writer structure"]
impl crate::Writable for FA1R {} impl crate::can::bx::Writable for FA1R {}
#[doc = "CAN_FA1R"] #[doc = "CAN_FA1R"]
pub mod fa1r; pub mod fa1r;

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register BTR"] #[doc = "Reader of register BTR"]
pub type R = crate::R<u32, super::BTR>; pub type R = crate::can::bx::R<u32, super::BTR>;
#[doc = "Writer for register BTR"] #[doc = "Writer for register BTR"]
pub type W = crate::W<u32, super::BTR>; pub type W = crate::can::bx::W<u32, super::BTR>;
#[doc = "Register BTR `reset()`'s with value 0"] #[doc = "Register BTR `reset()`'s with value 0"]
impl crate::ResetValue for super::BTR { impl crate::can::bx::ResetValue for super::BTR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -25,7 +25,7 @@ impl From<SILM_A> for bool {
} }
} }
#[doc = "Reader of field `SILM`"] #[doc = "Reader of field `SILM`"]
pub type SILM_R = crate::R<bool, SILM_A>; pub type SILM_R = crate::can::bx::R<bool, SILM_A>;
impl SILM_R { impl SILM_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -100,7 +100,7 @@ impl From<LBKM_A> for bool {
} }
} }
#[doc = "Reader of field `LBKM`"] #[doc = "Reader of field `LBKM`"]
pub type LBKM_R = crate::R<bool, LBKM_A>; pub type LBKM_R = crate::can::bx::R<bool, LBKM_A>;
impl LBKM_R { impl LBKM_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -161,7 +161,7 @@ impl<'a> LBKM_W<'a> {
} }
} }
#[doc = "Reader of field `SJW`"] #[doc = "Reader of field `SJW`"]
pub type SJW_R = crate::R<u8, u8>; pub type SJW_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `SJW`"] #[doc = "Write proxy for field `SJW`"]
pub struct SJW_W<'a> { pub struct SJW_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -175,7 +175,7 @@ impl<'a> SJW_W<'a> {
} }
} }
#[doc = "Reader of field `TS2`"] #[doc = "Reader of field `TS2`"]
pub type TS2_R = crate::R<u8, u8>; pub type TS2_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `TS2`"] #[doc = "Write proxy for field `TS2`"]
pub struct TS2_W<'a> { pub struct TS2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -189,7 +189,7 @@ impl<'a> TS2_W<'a> {
} }
} }
#[doc = "Reader of field `TS1`"] #[doc = "Reader of field `TS1`"]
pub type TS1_R = crate::R<u8, u8>; pub type TS1_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `TS1`"] #[doc = "Write proxy for field `TS1`"]
pub struct TS1_W<'a> { pub struct TS1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> TS1_W<'a> {
} }
} }
#[doc = "Reader of field `BRP`"] #[doc = "Reader of field `BRP`"]
pub type BRP_R = crate::R<u16, u16>; pub type BRP_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `BRP`"] #[doc = "Write proxy for field `BRP`"]
pub struct BRP_W<'a> { pub struct BRP_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register ESR"] #[doc = "Reader of register ESR"]
pub type R = crate::R<u32, super::ESR>; pub type R = crate::can::bx::R<u32, super::ESR>;
#[doc = "Writer for register ESR"] #[doc = "Writer for register ESR"]
pub type W = crate::W<u32, super::ESR>; pub type W = crate::can::bx::W<u32, super::ESR>;
#[doc = "Register ESR `reset()`'s with value 0"] #[doc = "Register ESR `reset()`'s with value 0"]
impl crate::ResetValue for super::ESR { impl crate::can::bx::ResetValue for super::ESR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,9 +11,9 @@ impl crate::ResetValue for super::ESR {
} }
} }
#[doc = "Reader of field `REC`"] #[doc = "Reader of field `REC`"]
pub type REC_R = crate::R<u8, u8>; pub type REC_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `TEC`"] #[doc = "Reader of field `TEC`"]
pub type TEC_R = crate::R<u8, u8>; pub type TEC_R = crate::can::bx::R<u8, u8>;
#[doc = "LEC\n\nValue on reset: 0"] #[doc = "LEC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)] #[repr(u8)]
@ -42,7 +42,7 @@ impl From<LEC_A> for u8 {
} }
} }
#[doc = "Reader of field `LEC`"] #[doc = "Reader of field `LEC`"]
pub type LEC_R = crate::R<u8, LEC_A>; pub type LEC_R = crate::can::bx::R<u8, LEC_A>;
impl LEC_R { impl LEC_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -160,11 +160,11 @@ impl<'a> LEC_W<'a> {
} }
} }
#[doc = "Reader of field `BOFF`"] #[doc = "Reader of field `BOFF`"]
pub type BOFF_R = crate::R<bool, bool>; pub type BOFF_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `EPVF`"] #[doc = "Reader of field `EPVF`"]
pub type EPVF_R = crate::R<bool, bool>; pub type EPVF_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `EWGF`"] #[doc = "Reader of field `EWGF`"]
pub type EWGF_R = crate::R<bool, bool>; pub type EWGF_R = crate::can::bx::R<bool, bool>;
impl R { impl R {
#[doc = "Bits 24:31 - REC"] #[doc = "Bits 24:31 - REC"]
#[inline(always)] #[inline(always)]

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FA1R"] #[doc = "Reader of register FA1R"]
pub type R = crate::R<u32, super::FA1R>; pub type R = crate::can::bx::R<u32, super::FA1R>;
#[doc = "Writer for register FA1R"] #[doc = "Writer for register FA1R"]
pub type W = crate::W<u32, super::FA1R>; pub type W = crate::can::bx::W<u32, super::FA1R>;
#[doc = "Register FA1R `reset()`'s with value 0"] #[doc = "Register FA1R `reset()`'s with value 0"]
impl crate::ResetValue for super::FA1R { impl crate::can::bx::ResetValue for super::FA1R {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FA1R {
} }
} }
#[doc = "Reader of field `FACT0`"] #[doc = "Reader of field `FACT0`"]
pub type FACT0_R = crate::R<bool, bool>; pub type FACT0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT0`"] #[doc = "Write proxy for field `FACT0`"]
pub struct FACT0_W<'a> { pub struct FACT0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -35,7 +35,7 @@ impl<'a> FACT0_W<'a> {
} }
} }
#[doc = "Reader of field `FACT1`"] #[doc = "Reader of field `FACT1`"]
pub type FACT1_R = crate::R<bool, bool>; pub type FACT1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT1`"] #[doc = "Write proxy for field `FACT1`"]
pub struct FACT1_W<'a> { pub struct FACT1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -59,7 +59,7 @@ impl<'a> FACT1_W<'a> {
} }
} }
#[doc = "Reader of field `FACT2`"] #[doc = "Reader of field `FACT2`"]
pub type FACT2_R = crate::R<bool, bool>; pub type FACT2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT2`"] #[doc = "Write proxy for field `FACT2`"]
pub struct FACT2_W<'a> { pub struct FACT2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -83,7 +83,7 @@ impl<'a> FACT2_W<'a> {
} }
} }
#[doc = "Reader of field `FACT3`"] #[doc = "Reader of field `FACT3`"]
pub type FACT3_R = crate::R<bool, bool>; pub type FACT3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT3`"] #[doc = "Write proxy for field `FACT3`"]
pub struct FACT3_W<'a> { pub struct FACT3_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -107,7 +107,7 @@ impl<'a> FACT3_W<'a> {
} }
} }
#[doc = "Reader of field `FACT4`"] #[doc = "Reader of field `FACT4`"]
pub type FACT4_R = crate::R<bool, bool>; pub type FACT4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT4`"] #[doc = "Write proxy for field `FACT4`"]
pub struct FACT4_W<'a> { pub struct FACT4_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -131,7 +131,7 @@ impl<'a> FACT4_W<'a> {
} }
} }
#[doc = "Reader of field `FACT5`"] #[doc = "Reader of field `FACT5`"]
pub type FACT5_R = crate::R<bool, bool>; pub type FACT5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT5`"] #[doc = "Write proxy for field `FACT5`"]
pub struct FACT5_W<'a> { pub struct FACT5_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -155,7 +155,7 @@ impl<'a> FACT5_W<'a> {
} }
} }
#[doc = "Reader of field `FACT6`"] #[doc = "Reader of field `FACT6`"]
pub type FACT6_R = crate::R<bool, bool>; pub type FACT6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT6`"] #[doc = "Write proxy for field `FACT6`"]
pub struct FACT6_W<'a> { pub struct FACT6_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -179,7 +179,7 @@ impl<'a> FACT6_W<'a> {
} }
} }
#[doc = "Reader of field `FACT7`"] #[doc = "Reader of field `FACT7`"]
pub type FACT7_R = crate::R<bool, bool>; pub type FACT7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT7`"] #[doc = "Write proxy for field `FACT7`"]
pub struct FACT7_W<'a> { pub struct FACT7_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> FACT7_W<'a> {
} }
} }
#[doc = "Reader of field `FACT8`"] #[doc = "Reader of field `FACT8`"]
pub type FACT8_R = crate::R<bool, bool>; pub type FACT8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT8`"] #[doc = "Write proxy for field `FACT8`"]
pub struct FACT8_W<'a> { pub struct FACT8_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -227,7 +227,7 @@ impl<'a> FACT8_W<'a> {
} }
} }
#[doc = "Reader of field `FACT9`"] #[doc = "Reader of field `FACT9`"]
pub type FACT9_R = crate::R<bool, bool>; pub type FACT9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT9`"] #[doc = "Write proxy for field `FACT9`"]
pub struct FACT9_W<'a> { pub struct FACT9_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -251,7 +251,7 @@ impl<'a> FACT9_W<'a> {
} }
} }
#[doc = "Reader of field `FACT10`"] #[doc = "Reader of field `FACT10`"]
pub type FACT10_R = crate::R<bool, bool>; pub type FACT10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT10`"] #[doc = "Write proxy for field `FACT10`"]
pub struct FACT10_W<'a> { pub struct FACT10_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -275,7 +275,7 @@ impl<'a> FACT10_W<'a> {
} }
} }
#[doc = "Reader of field `FACT11`"] #[doc = "Reader of field `FACT11`"]
pub type FACT11_R = crate::R<bool, bool>; pub type FACT11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT11`"] #[doc = "Write proxy for field `FACT11`"]
pub struct FACT11_W<'a> { pub struct FACT11_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -299,7 +299,7 @@ impl<'a> FACT11_W<'a> {
} }
} }
#[doc = "Reader of field `FACT12`"] #[doc = "Reader of field `FACT12`"]
pub type FACT12_R = crate::R<bool, bool>; pub type FACT12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT12`"] #[doc = "Write proxy for field `FACT12`"]
pub struct FACT12_W<'a> { pub struct FACT12_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -323,7 +323,7 @@ impl<'a> FACT12_W<'a> {
} }
} }
#[doc = "Reader of field `FACT13`"] #[doc = "Reader of field `FACT13`"]
pub type FACT13_R = crate::R<bool, bool>; pub type FACT13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FACT13`"] #[doc = "Write proxy for field `FACT13`"]
pub struct FACT13_W<'a> { pub struct FACT13_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

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

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FR1"] #[doc = "Reader of register FR1"]
pub type R = crate::R<u32, super::FR1>; pub type R = crate::can::bx::R<u32, super::FR1>;
#[doc = "Writer for register FR1"] #[doc = "Writer for register FR1"]
pub type W = crate::W<u32, super::FR1>; pub type W = crate::can::bx::W<u32, super::FR1>;
#[doc = "Register FR1 `reset()`'s with value 0"] #[doc = "Register FR1 `reset()`'s with value 0"]
impl crate::ResetValue for super::FR1 { impl crate::can::bx::ResetValue for super::FR1 {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FR1 {
} }
} }
#[doc = "Reader of field `FB`"] #[doc = "Reader of field `FB`"]
pub type FB_R = crate::R<u32, u32>; pub type FB_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `FB`"] #[doc = "Write proxy for field `FB`"]
pub struct FB_W<'a> { pub struct FB_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FR2"] #[doc = "Reader of register FR2"]
pub type R = crate::R<u32, super::FR2>; pub type R = crate::can::bx::R<u32, super::FR2>;
#[doc = "Writer for register FR2"] #[doc = "Writer for register FR2"]
pub type W = crate::W<u32, super::FR2>; pub type W = crate::can::bx::W<u32, super::FR2>;
#[doc = "Register FR2 `reset()`'s with value 0"] #[doc = "Register FR2 `reset()`'s with value 0"]
impl crate::ResetValue for super::FR2 { impl crate::can::bx::ResetValue for super::FR2 {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FR2 {
} }
} }
#[doc = "Reader of field `FB`"] #[doc = "Reader of field `FB`"]
pub type FB_R = crate::R<u32, u32>; pub type FB_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `FB`"] #[doc = "Write proxy for field `FB`"]
pub struct FB_W<'a> { pub struct FB_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FFA1R"] #[doc = "Reader of register FFA1R"]
pub type R = crate::R<u32, super::FFA1R>; pub type R = crate::can::bx::R<u32, super::FFA1R>;
#[doc = "Writer for register FFA1R"] #[doc = "Writer for register FFA1R"]
pub type W = crate::W<u32, super::FFA1R>; pub type W = crate::can::bx::W<u32, super::FFA1R>;
#[doc = "Register FFA1R `reset()`'s with value 0"] #[doc = "Register FFA1R `reset()`'s with value 0"]
impl crate::ResetValue for super::FFA1R { impl crate::can::bx::ResetValue for super::FFA1R {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FFA1R {
} }
} }
#[doc = "Reader of field `FFA0`"] #[doc = "Reader of field `FFA0`"]
pub type FFA0_R = crate::R<bool, bool>; pub type FFA0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA0`"] #[doc = "Write proxy for field `FFA0`"]
pub struct FFA0_W<'a> { pub struct FFA0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -35,7 +35,7 @@ impl<'a> FFA0_W<'a> {
} }
} }
#[doc = "Reader of field `FFA1`"] #[doc = "Reader of field `FFA1`"]
pub type FFA1_R = crate::R<bool, bool>; pub type FFA1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA1`"] #[doc = "Write proxy for field `FFA1`"]
pub struct FFA1_W<'a> { pub struct FFA1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -59,7 +59,7 @@ impl<'a> FFA1_W<'a> {
} }
} }
#[doc = "Reader of field `FFA2`"] #[doc = "Reader of field `FFA2`"]
pub type FFA2_R = crate::R<bool, bool>; pub type FFA2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA2`"] #[doc = "Write proxy for field `FFA2`"]
pub struct FFA2_W<'a> { pub struct FFA2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -83,7 +83,7 @@ impl<'a> FFA2_W<'a> {
} }
} }
#[doc = "Reader of field `FFA3`"] #[doc = "Reader of field `FFA3`"]
pub type FFA3_R = crate::R<bool, bool>; pub type FFA3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA3`"] #[doc = "Write proxy for field `FFA3`"]
pub struct FFA3_W<'a> { pub struct FFA3_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -107,7 +107,7 @@ impl<'a> FFA3_W<'a> {
} }
} }
#[doc = "Reader of field `FFA4`"] #[doc = "Reader of field `FFA4`"]
pub type FFA4_R = crate::R<bool, bool>; pub type FFA4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA4`"] #[doc = "Write proxy for field `FFA4`"]
pub struct FFA4_W<'a> { pub struct FFA4_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -131,7 +131,7 @@ impl<'a> FFA4_W<'a> {
} }
} }
#[doc = "Reader of field `FFA5`"] #[doc = "Reader of field `FFA5`"]
pub type FFA5_R = crate::R<bool, bool>; pub type FFA5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA5`"] #[doc = "Write proxy for field `FFA5`"]
pub struct FFA5_W<'a> { pub struct FFA5_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -155,7 +155,7 @@ impl<'a> FFA5_W<'a> {
} }
} }
#[doc = "Reader of field `FFA6`"] #[doc = "Reader of field `FFA6`"]
pub type FFA6_R = crate::R<bool, bool>; pub type FFA6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA6`"] #[doc = "Write proxy for field `FFA6`"]
pub struct FFA6_W<'a> { pub struct FFA6_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -179,7 +179,7 @@ impl<'a> FFA6_W<'a> {
} }
} }
#[doc = "Reader of field `FFA7`"] #[doc = "Reader of field `FFA7`"]
pub type FFA7_R = crate::R<bool, bool>; pub type FFA7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA7`"] #[doc = "Write proxy for field `FFA7`"]
pub struct FFA7_W<'a> { pub struct FFA7_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> FFA7_W<'a> {
} }
} }
#[doc = "Reader of field `FFA8`"] #[doc = "Reader of field `FFA8`"]
pub type FFA8_R = crate::R<bool, bool>; pub type FFA8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA8`"] #[doc = "Write proxy for field `FFA8`"]
pub struct FFA8_W<'a> { pub struct FFA8_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -227,7 +227,7 @@ impl<'a> FFA8_W<'a> {
} }
} }
#[doc = "Reader of field `FFA9`"] #[doc = "Reader of field `FFA9`"]
pub type FFA9_R = crate::R<bool, bool>; pub type FFA9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA9`"] #[doc = "Write proxy for field `FFA9`"]
pub struct FFA9_W<'a> { pub struct FFA9_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -251,7 +251,7 @@ impl<'a> FFA9_W<'a> {
} }
} }
#[doc = "Reader of field `FFA10`"] #[doc = "Reader of field `FFA10`"]
pub type FFA10_R = crate::R<bool, bool>; pub type FFA10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA10`"] #[doc = "Write proxy for field `FFA10`"]
pub struct FFA10_W<'a> { pub struct FFA10_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -275,7 +275,7 @@ impl<'a> FFA10_W<'a> {
} }
} }
#[doc = "Reader of field `FFA11`"] #[doc = "Reader of field `FFA11`"]
pub type FFA11_R = crate::R<bool, bool>; pub type FFA11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA11`"] #[doc = "Write proxy for field `FFA11`"]
pub struct FFA11_W<'a> { pub struct FFA11_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -299,7 +299,7 @@ impl<'a> FFA11_W<'a> {
} }
} }
#[doc = "Reader of field `FFA12`"] #[doc = "Reader of field `FFA12`"]
pub type FFA12_R = crate::R<bool, bool>; pub type FFA12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA12`"] #[doc = "Write proxy for field `FFA12`"]
pub struct FFA12_W<'a> { pub struct FFA12_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -323,7 +323,7 @@ impl<'a> FFA12_W<'a> {
} }
} }
#[doc = "Reader of field `FFA13`"] #[doc = "Reader of field `FFA13`"]
pub type FFA13_R = crate::R<bool, bool>; pub type FFA13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FFA13`"] #[doc = "Write proxy for field `FFA13`"]
pub struct FFA13_W<'a> { pub struct FFA13_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FM1R"] #[doc = "Reader of register FM1R"]
pub type R = crate::R<u32, super::FM1R>; pub type R = crate::can::bx::R<u32, super::FM1R>;
#[doc = "Writer for register FM1R"] #[doc = "Writer for register FM1R"]
pub type W = crate::W<u32, super::FM1R>; pub type W = crate::can::bx::W<u32, super::FM1R>;
#[doc = "Register FM1R `reset()`'s with value 0"] #[doc = "Register FM1R `reset()`'s with value 0"]
impl crate::ResetValue for super::FM1R { impl crate::can::bx::ResetValue for super::FM1R {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FM1R {
} }
} }
#[doc = "Reader of field `FBM0`"] #[doc = "Reader of field `FBM0`"]
pub type FBM0_R = crate::R<bool, bool>; pub type FBM0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM0`"] #[doc = "Write proxy for field `FBM0`"]
pub struct FBM0_W<'a> { pub struct FBM0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -35,7 +35,7 @@ impl<'a> FBM0_W<'a> {
} }
} }
#[doc = "Reader of field `FBM1`"] #[doc = "Reader of field `FBM1`"]
pub type FBM1_R = crate::R<bool, bool>; pub type FBM1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM1`"] #[doc = "Write proxy for field `FBM1`"]
pub struct FBM1_W<'a> { pub struct FBM1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -59,7 +59,7 @@ impl<'a> FBM1_W<'a> {
} }
} }
#[doc = "Reader of field `FBM2`"] #[doc = "Reader of field `FBM2`"]
pub type FBM2_R = crate::R<bool, bool>; pub type FBM2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM2`"] #[doc = "Write proxy for field `FBM2`"]
pub struct FBM2_W<'a> { pub struct FBM2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -83,7 +83,7 @@ impl<'a> FBM2_W<'a> {
} }
} }
#[doc = "Reader of field `FBM3`"] #[doc = "Reader of field `FBM3`"]
pub type FBM3_R = crate::R<bool, bool>; pub type FBM3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM3`"] #[doc = "Write proxy for field `FBM3`"]
pub struct FBM3_W<'a> { pub struct FBM3_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -107,7 +107,7 @@ impl<'a> FBM3_W<'a> {
} }
} }
#[doc = "Reader of field `FBM4`"] #[doc = "Reader of field `FBM4`"]
pub type FBM4_R = crate::R<bool, bool>; pub type FBM4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM4`"] #[doc = "Write proxy for field `FBM4`"]
pub struct FBM4_W<'a> { pub struct FBM4_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -131,7 +131,7 @@ impl<'a> FBM4_W<'a> {
} }
} }
#[doc = "Reader of field `FBM5`"] #[doc = "Reader of field `FBM5`"]
pub type FBM5_R = crate::R<bool, bool>; pub type FBM5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM5`"] #[doc = "Write proxy for field `FBM5`"]
pub struct FBM5_W<'a> { pub struct FBM5_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -155,7 +155,7 @@ impl<'a> FBM5_W<'a> {
} }
} }
#[doc = "Reader of field `FBM6`"] #[doc = "Reader of field `FBM6`"]
pub type FBM6_R = crate::R<bool, bool>; pub type FBM6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM6`"] #[doc = "Write proxy for field `FBM6`"]
pub struct FBM6_W<'a> { pub struct FBM6_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -179,7 +179,7 @@ impl<'a> FBM6_W<'a> {
} }
} }
#[doc = "Reader of field `FBM7`"] #[doc = "Reader of field `FBM7`"]
pub type FBM7_R = crate::R<bool, bool>; pub type FBM7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM7`"] #[doc = "Write proxy for field `FBM7`"]
pub struct FBM7_W<'a> { pub struct FBM7_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> FBM7_W<'a> {
} }
} }
#[doc = "Reader of field `FBM8`"] #[doc = "Reader of field `FBM8`"]
pub type FBM8_R = crate::R<bool, bool>; pub type FBM8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM8`"] #[doc = "Write proxy for field `FBM8`"]
pub struct FBM8_W<'a> { pub struct FBM8_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -227,7 +227,7 @@ impl<'a> FBM8_W<'a> {
} }
} }
#[doc = "Reader of field `FBM9`"] #[doc = "Reader of field `FBM9`"]
pub type FBM9_R = crate::R<bool, bool>; pub type FBM9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM9`"] #[doc = "Write proxy for field `FBM9`"]
pub struct FBM9_W<'a> { pub struct FBM9_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -251,7 +251,7 @@ impl<'a> FBM9_W<'a> {
} }
} }
#[doc = "Reader of field `FBM10`"] #[doc = "Reader of field `FBM10`"]
pub type FBM10_R = crate::R<bool, bool>; pub type FBM10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM10`"] #[doc = "Write proxy for field `FBM10`"]
pub struct FBM10_W<'a> { pub struct FBM10_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -275,7 +275,7 @@ impl<'a> FBM10_W<'a> {
} }
} }
#[doc = "Reader of field `FBM11`"] #[doc = "Reader of field `FBM11`"]
pub type FBM11_R = crate::R<bool, bool>; pub type FBM11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM11`"] #[doc = "Write proxy for field `FBM11`"]
pub struct FBM11_W<'a> { pub struct FBM11_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -299,7 +299,7 @@ impl<'a> FBM11_W<'a> {
} }
} }
#[doc = "Reader of field `FBM12`"] #[doc = "Reader of field `FBM12`"]
pub type FBM12_R = crate::R<bool, bool>; pub type FBM12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM12`"] #[doc = "Write proxy for field `FBM12`"]
pub struct FBM12_W<'a> { pub struct FBM12_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -323,7 +323,7 @@ impl<'a> FBM12_W<'a> {
} }
} }
#[doc = "Reader of field `FBM13`"] #[doc = "Reader of field `FBM13`"]
pub type FBM13_R = crate::R<bool, bool>; pub type FBM13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FBM13`"] #[doc = "Write proxy for field `FBM13`"]
pub struct FBM13_W<'a> { pub struct FBM13_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FMR"] #[doc = "Reader of register FMR"]
pub type R = crate::R<u32, super::FMR>; pub type R = crate::can::bx::R<u32, super::FMR>;
#[doc = "Writer for register FMR"] #[doc = "Writer for register FMR"]
pub type W = crate::W<u32, super::FMR>; pub type W = crate::can::bx::W<u32, super::FMR>;
#[doc = "Register FMR `reset()`'s with value 0"] #[doc = "Register FMR `reset()`'s with value 0"]
impl crate::ResetValue for super::FMR { impl crate::can::bx::ResetValue for super::FMR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FMR {
} }
} }
#[doc = "Reader of field `CAN2SB`"] #[doc = "Reader of field `CAN2SB`"]
pub type CAN2SB_R = crate::R<u8, u8>; pub type CAN2SB_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `CAN2SB`"] #[doc = "Write proxy for field `CAN2SB`"]
pub struct CAN2SB_W<'a> { pub struct CAN2SB_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -25,7 +25,7 @@ impl<'a> CAN2SB_W<'a> {
} }
} }
#[doc = "Reader of field `FINIT`"] #[doc = "Reader of field `FINIT`"]
pub type FINIT_R = crate::R<bool, bool>; pub type FINIT_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FINIT`"] #[doc = "Write proxy for field `FINIT`"]
pub struct FINIT_W<'a> { pub struct FINIT_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register FS1R"] #[doc = "Reader of register FS1R"]
pub type R = crate::R<u32, super::FS1R>; pub type R = crate::can::bx::R<u32, super::FS1R>;
#[doc = "Writer for register FS1R"] #[doc = "Writer for register FS1R"]
pub type W = crate::W<u32, super::FS1R>; pub type W = crate::can::bx::W<u32, super::FS1R>;
#[doc = "Register FS1R `reset()`'s with value 0"] #[doc = "Register FS1R `reset()`'s with value 0"]
impl crate::ResetValue for super::FS1R { impl crate::can::bx::ResetValue for super::FS1R {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::FS1R {
} }
} }
#[doc = "Reader of field `FSC0`"] #[doc = "Reader of field `FSC0`"]
pub type FSC0_R = crate::R<bool, bool>; pub type FSC0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC0`"] #[doc = "Write proxy for field `FSC0`"]
pub struct FSC0_W<'a> { pub struct FSC0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -35,7 +35,7 @@ impl<'a> FSC0_W<'a> {
} }
} }
#[doc = "Reader of field `FSC1`"] #[doc = "Reader of field `FSC1`"]
pub type FSC1_R = crate::R<bool, bool>; pub type FSC1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC1`"] #[doc = "Write proxy for field `FSC1`"]
pub struct FSC1_W<'a> { pub struct FSC1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -59,7 +59,7 @@ impl<'a> FSC1_W<'a> {
} }
} }
#[doc = "Reader of field `FSC2`"] #[doc = "Reader of field `FSC2`"]
pub type FSC2_R = crate::R<bool, bool>; pub type FSC2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC2`"] #[doc = "Write proxy for field `FSC2`"]
pub struct FSC2_W<'a> { pub struct FSC2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -83,7 +83,7 @@ impl<'a> FSC2_W<'a> {
} }
} }
#[doc = "Reader of field `FSC3`"] #[doc = "Reader of field `FSC3`"]
pub type FSC3_R = crate::R<bool, bool>; pub type FSC3_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC3`"] #[doc = "Write proxy for field `FSC3`"]
pub struct FSC3_W<'a> { pub struct FSC3_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -107,7 +107,7 @@ impl<'a> FSC3_W<'a> {
} }
} }
#[doc = "Reader of field `FSC4`"] #[doc = "Reader of field `FSC4`"]
pub type FSC4_R = crate::R<bool, bool>; pub type FSC4_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC4`"] #[doc = "Write proxy for field `FSC4`"]
pub struct FSC4_W<'a> { pub struct FSC4_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -131,7 +131,7 @@ impl<'a> FSC4_W<'a> {
} }
} }
#[doc = "Reader of field `FSC5`"] #[doc = "Reader of field `FSC5`"]
pub type FSC5_R = crate::R<bool, bool>; pub type FSC5_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC5`"] #[doc = "Write proxy for field `FSC5`"]
pub struct FSC5_W<'a> { pub struct FSC5_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -155,7 +155,7 @@ impl<'a> FSC5_W<'a> {
} }
} }
#[doc = "Reader of field `FSC6`"] #[doc = "Reader of field `FSC6`"]
pub type FSC6_R = crate::R<bool, bool>; pub type FSC6_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC6`"] #[doc = "Write proxy for field `FSC6`"]
pub struct FSC6_W<'a> { pub struct FSC6_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -179,7 +179,7 @@ impl<'a> FSC6_W<'a> {
} }
} }
#[doc = "Reader of field `FSC7`"] #[doc = "Reader of field `FSC7`"]
pub type FSC7_R = crate::R<bool, bool>; pub type FSC7_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC7`"] #[doc = "Write proxy for field `FSC7`"]
pub struct FSC7_W<'a> { pub struct FSC7_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> FSC7_W<'a> {
} }
} }
#[doc = "Reader of field `FSC8`"] #[doc = "Reader of field `FSC8`"]
pub type FSC8_R = crate::R<bool, bool>; pub type FSC8_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC8`"] #[doc = "Write proxy for field `FSC8`"]
pub struct FSC8_W<'a> { pub struct FSC8_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -227,7 +227,7 @@ impl<'a> FSC8_W<'a> {
} }
} }
#[doc = "Reader of field `FSC9`"] #[doc = "Reader of field `FSC9`"]
pub type FSC9_R = crate::R<bool, bool>; pub type FSC9_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC9`"] #[doc = "Write proxy for field `FSC9`"]
pub struct FSC9_W<'a> { pub struct FSC9_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -251,7 +251,7 @@ impl<'a> FSC9_W<'a> {
} }
} }
#[doc = "Reader of field `FSC10`"] #[doc = "Reader of field `FSC10`"]
pub type FSC10_R = crate::R<bool, bool>; pub type FSC10_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC10`"] #[doc = "Write proxy for field `FSC10`"]
pub struct FSC10_W<'a> { pub struct FSC10_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -275,7 +275,7 @@ impl<'a> FSC10_W<'a> {
} }
} }
#[doc = "Reader of field `FSC11`"] #[doc = "Reader of field `FSC11`"]
pub type FSC11_R = crate::R<bool, bool>; pub type FSC11_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC11`"] #[doc = "Write proxy for field `FSC11`"]
pub struct FSC11_W<'a> { pub struct FSC11_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -299,7 +299,7 @@ impl<'a> FSC11_W<'a> {
} }
} }
#[doc = "Reader of field `FSC12`"] #[doc = "Reader of field `FSC12`"]
pub type FSC12_R = crate::R<bool, bool>; pub type FSC12_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC12`"] #[doc = "Write proxy for field `FSC12`"]
pub struct FSC12_W<'a> { pub struct FSC12_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -323,7 +323,7 @@ impl<'a> FSC12_W<'a> {
} }
} }
#[doc = "Reader of field `FSC13`"] #[doc = "Reader of field `FSC13`"]
pub type FSC13_R = crate::R<bool, bool>; pub type FSC13_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `FSC13`"] #[doc = "Write proxy for field `FSC13`"]
pub struct FSC13_W<'a> { pub struct FSC13_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register IER"] #[doc = "Reader of register IER"]
pub type R = crate::R<u32, super::IER>; pub type R = crate::can::bx::R<u32, super::IER>;
#[doc = "Writer for register IER"] #[doc = "Writer for register IER"]
pub type W = crate::W<u32, super::IER>; pub type W = crate::can::bx::W<u32, super::IER>;
#[doc = "Register IER `reset()`'s with value 0"] #[doc = "Register IER `reset()`'s with value 0"]
impl crate::ResetValue for super::IER { impl crate::can::bx::ResetValue for super::IER {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -25,7 +25,7 @@ impl From<SLKIE_A> for bool {
} }
} }
#[doc = "Reader of field `SLKIE`"] #[doc = "Reader of field `SLKIE`"]
pub type SLKIE_R = crate::R<bool, SLKIE_A>; pub type SLKIE_R = crate::can::bx::R<bool, SLKIE_A>;
impl SLKIE_R { impl SLKIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -100,7 +100,7 @@ impl From<WKUIE_A> for bool {
} }
} }
#[doc = "Reader of field `WKUIE`"] #[doc = "Reader of field `WKUIE`"]
pub type WKUIE_R = crate::R<bool, WKUIE_A>; pub type WKUIE_R = crate::can::bx::R<bool, WKUIE_A>;
impl WKUIE_R { impl WKUIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -175,7 +175,7 @@ impl From<ERRIE_A> for bool {
} }
} }
#[doc = "Reader of field `ERRIE`"] #[doc = "Reader of field `ERRIE`"]
pub type ERRIE_R = crate::R<bool, ERRIE_A>; pub type ERRIE_R = crate::can::bx::R<bool, ERRIE_A>;
impl ERRIE_R { impl ERRIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -252,7 +252,7 @@ impl From<LECIE_A> for bool {
} }
} }
#[doc = "Reader of field `LECIE`"] #[doc = "Reader of field `LECIE`"]
pub type LECIE_R = crate::R<bool, LECIE_A>; pub type LECIE_R = crate::can::bx::R<bool, LECIE_A>;
impl LECIE_R { impl LECIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -329,7 +329,7 @@ impl From<BOFIE_A> for bool {
} }
} }
#[doc = "Reader of field `BOFIE`"] #[doc = "Reader of field `BOFIE`"]
pub type BOFIE_R = crate::R<bool, BOFIE_A>; pub type BOFIE_R = crate::can::bx::R<bool, BOFIE_A>;
impl BOFIE_R { impl BOFIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -404,7 +404,7 @@ impl From<EPVIE_A> for bool {
} }
} }
#[doc = "Reader of field `EPVIE`"] #[doc = "Reader of field `EPVIE`"]
pub type EPVIE_R = crate::R<bool, EPVIE_A>; pub type EPVIE_R = crate::can::bx::R<bool, EPVIE_A>;
impl EPVIE_R { impl EPVIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -479,7 +479,7 @@ impl From<EWGIE_A> for bool {
} }
} }
#[doc = "Reader of field `EWGIE`"] #[doc = "Reader of field `EWGIE`"]
pub type EWGIE_R = crate::R<bool, EWGIE_A>; pub type EWGIE_R = crate::can::bx::R<bool, EWGIE_A>;
impl EWGIE_R { impl EWGIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -554,7 +554,7 @@ impl From<FOVIE1_A> for bool {
} }
} }
#[doc = "Reader of field `FOVIE1`"] #[doc = "Reader of field `FOVIE1`"]
pub type FOVIE1_R = crate::R<bool, FOVIE1_A>; pub type FOVIE1_R = crate::can::bx::R<bool, FOVIE1_A>;
impl FOVIE1_R { impl FOVIE1_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -629,7 +629,7 @@ impl From<FFIE1_A> for bool {
} }
} }
#[doc = "Reader of field `FFIE1`"] #[doc = "Reader of field `FFIE1`"]
pub type FFIE1_R = crate::R<bool, FFIE1_A>; pub type FFIE1_R = crate::can::bx::R<bool, FFIE1_A>;
impl FFIE1_R { impl FFIE1_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -706,7 +706,7 @@ impl From<FMPIE1_A> for bool {
} }
} }
#[doc = "Reader of field `FMPIE1`"] #[doc = "Reader of field `FMPIE1`"]
pub type FMPIE1_R = crate::R<bool, FMPIE1_A>; pub type FMPIE1_R = crate::can::bx::R<bool, FMPIE1_A>;
impl FMPIE1_R { impl FMPIE1_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -783,7 +783,7 @@ impl From<FOVIE0_A> for bool {
} }
} }
#[doc = "Reader of field `FOVIE0`"] #[doc = "Reader of field `FOVIE0`"]
pub type FOVIE0_R = crate::R<bool, FOVIE0_A>; pub type FOVIE0_R = crate::can::bx::R<bool, FOVIE0_A>;
impl FOVIE0_R { impl FOVIE0_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -858,7 +858,7 @@ impl From<FFIE0_A> for bool {
} }
} }
#[doc = "Reader of field `FFIE0`"] #[doc = "Reader of field `FFIE0`"]
pub type FFIE0_R = crate::R<bool, FFIE0_A>; pub type FFIE0_R = crate::can::bx::R<bool, FFIE0_A>;
impl FFIE0_R { impl FFIE0_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -935,7 +935,7 @@ impl From<FMPIE0_A> for bool {
} }
} }
#[doc = "Reader of field `FMPIE0`"] #[doc = "Reader of field `FMPIE0`"]
pub type FMPIE0_R = crate::R<bool, FMPIE0_A>; pub type FMPIE0_R = crate::can::bx::R<bool, FMPIE0_A>;
impl FMPIE0_R { impl FMPIE0_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -1012,7 +1012,7 @@ impl From<TMEIE_A> for bool {
} }
} }
#[doc = "Reader of field `TMEIE`"] #[doc = "Reader of field `TMEIE`"]
pub type TMEIE_R = crate::R<bool, TMEIE_A>; pub type TMEIE_R = crate::can::bx::R<bool, TMEIE_A>;
impl TMEIE_R { impl TMEIE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register MCR"] #[doc = "Reader of register MCR"]
pub type R = crate::R<u32, super::MCR>; pub type R = crate::can::bx::R<u32, super::MCR>;
#[doc = "Writer for register MCR"] #[doc = "Writer for register MCR"]
pub type W = crate::W<u32, super::MCR>; pub type W = crate::can::bx::W<u32, super::MCR>;
#[doc = "Register MCR `reset()`'s with value 0"] #[doc = "Register MCR `reset()`'s with value 0"]
impl crate::ResetValue for super::MCR { impl crate::can::bx::ResetValue for super::MCR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::MCR {
} }
} }
#[doc = "Reader of field `DBF`"] #[doc = "Reader of field `DBF`"]
pub type DBF_R = crate::R<bool, bool>; pub type DBF_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `DBF`"] #[doc = "Write proxy for field `DBF`"]
pub struct DBF_W<'a> { pub struct DBF_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -35,7 +35,7 @@ impl<'a> DBF_W<'a> {
} }
} }
#[doc = "Reader of field `RESET`"] #[doc = "Reader of field `RESET`"]
pub type RESET_R = crate::R<bool, bool>; pub type RESET_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RESET`"] #[doc = "Write proxy for field `RESET`"]
pub struct RESET_W<'a> { pub struct RESET_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -59,7 +59,7 @@ impl<'a> RESET_W<'a> {
} }
} }
#[doc = "Reader of field `TTCM`"] #[doc = "Reader of field `TTCM`"]
pub type TTCM_R = crate::R<bool, bool>; pub type TTCM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TTCM`"] #[doc = "Write proxy for field `TTCM`"]
pub struct TTCM_W<'a> { pub struct TTCM_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -83,7 +83,7 @@ impl<'a> TTCM_W<'a> {
} }
} }
#[doc = "Reader of field `ABOM`"] #[doc = "Reader of field `ABOM`"]
pub type ABOM_R = crate::R<bool, bool>; pub type ABOM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABOM`"] #[doc = "Write proxy for field `ABOM`"]
pub struct ABOM_W<'a> { pub struct ABOM_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -107,7 +107,7 @@ impl<'a> ABOM_W<'a> {
} }
} }
#[doc = "Reader of field `AWUM`"] #[doc = "Reader of field `AWUM`"]
pub type AWUM_R = crate::R<bool, bool>; pub type AWUM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `AWUM`"] #[doc = "Write proxy for field `AWUM`"]
pub struct AWUM_W<'a> { pub struct AWUM_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -131,7 +131,7 @@ impl<'a> AWUM_W<'a> {
} }
} }
#[doc = "Reader of field `NART`"] #[doc = "Reader of field `NART`"]
pub type NART_R = crate::R<bool, bool>; pub type NART_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `NART`"] #[doc = "Write proxy for field `NART`"]
pub struct NART_W<'a> { pub struct NART_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -155,7 +155,7 @@ impl<'a> NART_W<'a> {
} }
} }
#[doc = "Reader of field `RFLM`"] #[doc = "Reader of field `RFLM`"]
pub type RFLM_R = crate::R<bool, bool>; pub type RFLM_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RFLM`"] #[doc = "Write proxy for field `RFLM`"]
pub struct RFLM_W<'a> { pub struct RFLM_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -179,7 +179,7 @@ impl<'a> RFLM_W<'a> {
} }
} }
#[doc = "Reader of field `TXFP`"] #[doc = "Reader of field `TXFP`"]
pub type TXFP_R = crate::R<bool, bool>; pub type TXFP_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXFP`"] #[doc = "Write proxy for field `TXFP`"]
pub struct TXFP_W<'a> { pub struct TXFP_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -203,7 +203,7 @@ impl<'a> TXFP_W<'a> {
} }
} }
#[doc = "Reader of field `SLEEP`"] #[doc = "Reader of field `SLEEP`"]
pub type SLEEP_R = crate::R<bool, bool>; pub type SLEEP_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `SLEEP`"] #[doc = "Write proxy for field `SLEEP`"]
pub struct SLEEP_W<'a> { pub struct SLEEP_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -227,7 +227,7 @@ impl<'a> SLEEP_W<'a> {
} }
} }
#[doc = "Reader of field `INRQ`"] #[doc = "Reader of field `INRQ`"]
pub type INRQ_R = crate::R<bool, bool>; pub type INRQ_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `INRQ`"] #[doc = "Write proxy for field `INRQ`"]
pub struct INRQ_W<'a> { pub struct INRQ_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register MSR"] #[doc = "Reader of register MSR"]
pub type R = crate::R<u32, super::MSR>; pub type R = crate::can::bx::R<u32, super::MSR>;
#[doc = "Writer for register MSR"] #[doc = "Writer for register MSR"]
pub type W = crate::W<u32, super::MSR>; pub type W = crate::can::bx::W<u32, super::MSR>;
#[doc = "Register MSR `reset()`'s with value 0"] #[doc = "Register MSR `reset()`'s with value 0"]
impl crate::ResetValue for super::MSR { impl crate::can::bx::ResetValue for super::MSR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,15 +11,15 @@ impl crate::ResetValue for super::MSR {
} }
} }
#[doc = "Reader of field `RX`"] #[doc = "Reader of field `RX`"]
pub type RX_R = crate::R<bool, bool>; pub type RX_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `SAMP`"] #[doc = "Reader of field `SAMP`"]
pub type SAMP_R = crate::R<bool, bool>; pub type SAMP_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `RXM`"] #[doc = "Reader of field `RXM`"]
pub type RXM_R = crate::R<bool, bool>; pub type RXM_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TXM`"] #[doc = "Reader of field `TXM`"]
pub type TXM_R = crate::R<bool, bool>; pub type TXM_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `SLAKI`"] #[doc = "Reader of field `SLAKI`"]
pub type SLAKI_R = crate::R<bool, bool>; pub type SLAKI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `SLAKI`"] #[doc = "Write proxy for field `SLAKI`"]
pub struct SLAKI_W<'a> { pub struct SLAKI_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -43,7 +43,7 @@ impl<'a> SLAKI_W<'a> {
} }
} }
#[doc = "Reader of field `WKUI`"] #[doc = "Reader of field `WKUI`"]
pub type WKUI_R = crate::R<bool, bool>; pub type WKUI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `WKUI`"] #[doc = "Write proxy for field `WKUI`"]
pub struct WKUI_W<'a> { pub struct WKUI_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -67,7 +67,7 @@ impl<'a> WKUI_W<'a> {
} }
} }
#[doc = "Reader of field `ERRI`"] #[doc = "Reader of field `ERRI`"]
pub type ERRI_R = crate::R<bool, bool>; pub type ERRI_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ERRI`"] #[doc = "Write proxy for field `ERRI`"]
pub struct ERRI_W<'a> { pub struct ERRI_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -91,9 +91,9 @@ impl<'a> ERRI_W<'a> {
} }
} }
#[doc = "Reader of field `SLAK`"] #[doc = "Reader of field `SLAK`"]
pub type SLAK_R = crate::R<bool, bool>; pub type SLAK_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `INAK`"] #[doc = "Reader of field `INAK`"]
pub type INAK_R = crate::R<bool, bool>; pub type INAK_R = crate::can::bx::R<bool, bool>;
impl R { impl R {
#[doc = "Bit 11 - RX"] #[doc = "Bit 11 - RX"]
#[inline(always)] #[inline(always)]

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register RF%sR"] #[doc = "Reader of register RF%sR"]
pub type R = crate::R<u32, super::RFR>; pub type R = crate::can::bx::R<u32, super::RFR>;
#[doc = "Writer for register RF%sR"] #[doc = "Writer for register RF%sR"]
pub type W = crate::W<u32, super::RFR>; pub type W = crate::can::bx::W<u32, super::RFR>;
#[doc = "Register RF%sR `reset()`'s with value 0"] #[doc = "Register RF%sR `reset()`'s with value 0"]
impl crate::ResetValue for super::RFR { impl crate::can::bx::ResetValue for super::RFR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -23,12 +23,12 @@ impl From<RFOM_A> for bool {
} }
} }
#[doc = "Reader of field `RFOM`"] #[doc = "Reader of field `RFOM`"]
pub type RFOM_R = crate::R<bool, RFOM_A>; pub type RFOM_R = crate::can::bx::R<bool, RFOM_A>;
impl RFOM_R { impl RFOM_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, RFOM_A> { pub fn variant(&self) -> crate::can::bx::Variant<bool, RFOM_A> {
use crate::Variant::*; use crate::can::bx::Variant::*;
match self.bits { match self.bits {
true => Val(RFOM_A::RELEASE), true => Val(RFOM_A::RELEASE),
i => Res(i), i => Res(i),
@ -89,7 +89,7 @@ impl From<FOVR_A> for bool {
} }
} }
#[doc = "Reader of field `FOVR`"] #[doc = "Reader of field `FOVR`"]
pub type FOVR_R = crate::R<bool, FOVR_A>; pub type FOVR_R = crate::can::bx::R<bool, FOVR_A>;
impl FOVR_R { impl FOVR_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -171,7 +171,7 @@ impl From<FULL_A> for bool {
} }
} }
#[doc = "Reader of field `FULL`"] #[doc = "Reader of field `FULL`"]
pub type FULL_R = crate::R<bool, FULL_A>; pub type FULL_R = crate::can::bx::R<bool, FULL_A>;
impl FULL_R { impl FULL_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -239,7 +239,7 @@ impl<'a> FULL_W<'a> {
} }
} }
#[doc = "Reader of field `FMP`"] #[doc = "Reader of field `FMP`"]
pub type FMP_R = crate::R<u8, u8>; pub type FMP_R = crate::can::bx::R<u8, u8>;
impl R { impl R {
#[doc = "Bit 5 - RFOM0"] #[doc = "Bit 5 - RFOM0"]
#[inline(always)] #[inline(always)]

View File

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

View File

@ -1,13 +1,13 @@
#[doc = "Reader of register RDHR"] #[doc = "Reader of register RDHR"]
pub type R = crate::R<u32, super::RDHR>; pub type R = crate::can::bx::R<u32, super::RDHR>;
#[doc = "Reader of field `DATA7`"] #[doc = "Reader of field `DATA7`"]
pub type DATA7_R = crate::R<u8, u8>; pub type DATA7_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA6`"] #[doc = "Reader of field `DATA6`"]
pub type DATA6_R = crate::R<u8, u8>; pub type DATA6_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA5`"] #[doc = "Reader of field `DATA5`"]
pub type DATA5_R = crate::R<u8, u8>; pub type DATA5_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA4`"] #[doc = "Reader of field `DATA4`"]
pub type DATA4_R = crate::R<u8, u8>; pub type DATA4_R = crate::can::bx::R<u8, u8>;
impl R { impl R {
#[doc = "Bits 24:31 - DATA7"] #[doc = "Bits 24:31 - DATA7"]
#[inline(always)] #[inline(always)]

View File

@ -1,13 +1,13 @@
#[doc = "Reader of register RDLR"] #[doc = "Reader of register RDLR"]
pub type R = crate::R<u32, super::RDLR>; pub type R = crate::can::bx::R<u32, super::RDLR>;
#[doc = "Reader of field `DATA3`"] #[doc = "Reader of field `DATA3`"]
pub type DATA3_R = crate::R<u8, u8>; pub type DATA3_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA2`"] #[doc = "Reader of field `DATA2`"]
pub type DATA2_R = crate::R<u8, u8>; pub type DATA2_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA1`"] #[doc = "Reader of field `DATA1`"]
pub type DATA1_R = crate::R<u8, u8>; pub type DATA1_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DATA0`"] #[doc = "Reader of field `DATA0`"]
pub type DATA0_R = crate::R<u8, u8>; pub type DATA0_R = crate::can::bx::R<u8, u8>;
impl R { impl R {
#[doc = "Bits 24:31 - DATA3"] #[doc = "Bits 24:31 - DATA3"]
#[inline(always)] #[inline(always)]

View File

@ -1,11 +1,11 @@
#[doc = "Reader of register RDTR"] #[doc = "Reader of register RDTR"]
pub type R = crate::R<u32, super::RDTR>; pub type R = crate::can::bx::R<u32, super::RDTR>;
#[doc = "Reader of field `TIME`"] #[doc = "Reader of field `TIME`"]
pub type TIME_R = crate::R<u16, u16>; pub type TIME_R = crate::can::bx::R<u16, u16>;
#[doc = "Reader of field `FMI`"] #[doc = "Reader of field `FMI`"]
pub type FMI_R = crate::R<u8, u8>; pub type FMI_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `DLC`"] #[doc = "Reader of field `DLC`"]
pub type DLC_R = crate::R<u8, u8>; pub type DLC_R = crate::can::bx::R<u8, u8>;
impl R { impl R {
#[doc = "Bits 16:31 - TIME"] #[doc = "Bits 16:31 - TIME"]
#[inline(always)] #[inline(always)]

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register RIR"] #[doc = "Reader of register RIR"]
pub type R = crate::R<u32, super::RIR>; pub type R = crate::can::bx::R<u32, super::RIR>;
#[doc = "Reader of field `STID`"] #[doc = "Reader of field `STID`"]
pub type STID_R = crate::R<u16, u16>; pub type STID_R = crate::can::bx::R<u16, u16>;
#[doc = "Reader of field `EXID`"] #[doc = "Reader of field `EXID`"]
pub type EXID_R = crate::R<u32, u32>; pub type EXID_R = crate::can::bx::R<u32, u32>;
#[doc = "IDE\n\nValue on reset: 0"] #[doc = "IDE\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq)]
pub enum IDE_A { pub enum IDE_A {
@ -19,7 +19,7 @@ impl From<IDE_A> for bool {
} }
} }
#[doc = "Reader of field `IDE`"] #[doc = "Reader of field `IDE`"]
pub type IDE_R = crate::R<bool, IDE_A>; pub type IDE_R = crate::can::bx::R<bool, IDE_A>;
impl IDE_R { impl IDE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -55,7 +55,7 @@ impl From<RTR_A> for bool {
} }
} }
#[doc = "Reader of field `RTR`"] #[doc = "Reader of field `RTR`"]
pub type RTR_R = crate::R<bool, RTR_A>; pub type RTR_R = crate::can::bx::R<bool, RTR_A>;
impl RTR_R { impl RTR_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register TSR"] #[doc = "Reader of register TSR"]
pub type R = crate::R<u32, super::TSR>; pub type R = crate::can::bx::R<u32, super::TSR>;
#[doc = "Writer for register TSR"] #[doc = "Writer for register TSR"]
pub type W = crate::W<u32, super::TSR>; pub type W = crate::can::bx::W<u32, super::TSR>;
#[doc = "Register TSR `reset()`'s with value 0"] #[doc = "Register TSR `reset()`'s with value 0"]
impl crate::ResetValue for super::TSR { impl crate::can::bx::ResetValue for super::TSR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,21 +11,21 @@ impl crate::ResetValue for super::TSR {
} }
} }
#[doc = "Reader of field `LOW2`"] #[doc = "Reader of field `LOW2`"]
pub type LOW2_R = crate::R<bool, bool>; pub type LOW2_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `LOW1`"] #[doc = "Reader of field `LOW1`"]
pub type LOW1_R = crate::R<bool, bool>; pub type LOW1_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `LOW0`"] #[doc = "Reader of field `LOW0`"]
pub type LOW0_R = crate::R<bool, bool>; pub type LOW0_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME2`"] #[doc = "Reader of field `TME2`"]
pub type TME2_R = crate::R<bool, bool>; pub type TME2_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME1`"] #[doc = "Reader of field `TME1`"]
pub type TME1_R = crate::R<bool, bool>; pub type TME1_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `TME0`"] #[doc = "Reader of field `TME0`"]
pub type TME0_R = crate::R<bool, bool>; pub type TME0_R = crate::can::bx::R<bool, bool>;
#[doc = "Reader of field `CODE`"] #[doc = "Reader of field `CODE`"]
pub type CODE_R = crate::R<u8, u8>; pub type CODE_R = crate::can::bx::R<u8, u8>;
#[doc = "Reader of field `ABRQ2`"] #[doc = "Reader of field `ABRQ2`"]
pub type ABRQ2_R = crate::R<bool, bool>; pub type ABRQ2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ2`"] #[doc = "Write proxy for field `ABRQ2`"]
pub struct ABRQ2_W<'a> { pub struct ABRQ2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -49,7 +49,7 @@ impl<'a> ABRQ2_W<'a> {
} }
} }
#[doc = "Reader of field `TERR2`"] #[doc = "Reader of field `TERR2`"]
pub type TERR2_R = crate::R<bool, bool>; pub type TERR2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR2`"] #[doc = "Write proxy for field `TERR2`"]
pub struct TERR2_W<'a> { pub struct TERR2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -73,7 +73,7 @@ impl<'a> TERR2_W<'a> {
} }
} }
#[doc = "Reader of field `ALST2`"] #[doc = "Reader of field `ALST2`"]
pub type ALST2_R = crate::R<bool, bool>; pub type ALST2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST2`"] #[doc = "Write proxy for field `ALST2`"]
pub struct ALST2_W<'a> { pub struct ALST2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -97,7 +97,7 @@ impl<'a> ALST2_W<'a> {
} }
} }
#[doc = "Reader of field `TXOK2`"] #[doc = "Reader of field `TXOK2`"]
pub type TXOK2_R = crate::R<bool, bool>; pub type TXOK2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK2`"] #[doc = "Write proxy for field `TXOK2`"]
pub struct TXOK2_W<'a> { pub struct TXOK2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -121,7 +121,7 @@ impl<'a> TXOK2_W<'a> {
} }
} }
#[doc = "Reader of field `RQCP2`"] #[doc = "Reader of field `RQCP2`"]
pub type RQCP2_R = crate::R<bool, bool>; pub type RQCP2_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP2`"] #[doc = "Write proxy for field `RQCP2`"]
pub struct RQCP2_W<'a> { pub struct RQCP2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -145,7 +145,7 @@ impl<'a> RQCP2_W<'a> {
} }
} }
#[doc = "Reader of field `ABRQ1`"] #[doc = "Reader of field `ABRQ1`"]
pub type ABRQ1_R = crate::R<bool, bool>; pub type ABRQ1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ1`"] #[doc = "Write proxy for field `ABRQ1`"]
pub struct ABRQ1_W<'a> { pub struct ABRQ1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -169,7 +169,7 @@ impl<'a> ABRQ1_W<'a> {
} }
} }
#[doc = "Reader of field `TERR1`"] #[doc = "Reader of field `TERR1`"]
pub type TERR1_R = crate::R<bool, bool>; pub type TERR1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR1`"] #[doc = "Write proxy for field `TERR1`"]
pub struct TERR1_W<'a> { pub struct TERR1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -193,7 +193,7 @@ impl<'a> TERR1_W<'a> {
} }
} }
#[doc = "Reader of field `ALST1`"] #[doc = "Reader of field `ALST1`"]
pub type ALST1_R = crate::R<bool, bool>; pub type ALST1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST1`"] #[doc = "Write proxy for field `ALST1`"]
pub struct ALST1_W<'a> { pub struct ALST1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -217,7 +217,7 @@ impl<'a> ALST1_W<'a> {
} }
} }
#[doc = "Reader of field `TXOK1`"] #[doc = "Reader of field `TXOK1`"]
pub type TXOK1_R = crate::R<bool, bool>; pub type TXOK1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK1`"] #[doc = "Write proxy for field `TXOK1`"]
pub struct TXOK1_W<'a> { pub struct TXOK1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -241,7 +241,7 @@ impl<'a> TXOK1_W<'a> {
} }
} }
#[doc = "Reader of field `RQCP1`"] #[doc = "Reader of field `RQCP1`"]
pub type RQCP1_R = crate::R<bool, bool>; pub type RQCP1_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP1`"] #[doc = "Write proxy for field `RQCP1`"]
pub struct RQCP1_W<'a> { pub struct RQCP1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -265,7 +265,7 @@ impl<'a> RQCP1_W<'a> {
} }
} }
#[doc = "Reader of field `ABRQ0`"] #[doc = "Reader of field `ABRQ0`"]
pub type ABRQ0_R = crate::R<bool, bool>; pub type ABRQ0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ABRQ0`"] #[doc = "Write proxy for field `ABRQ0`"]
pub struct ABRQ0_W<'a> { pub struct ABRQ0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -289,7 +289,7 @@ impl<'a> ABRQ0_W<'a> {
} }
} }
#[doc = "Reader of field `TERR0`"] #[doc = "Reader of field `TERR0`"]
pub type TERR0_R = crate::R<bool, bool>; pub type TERR0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TERR0`"] #[doc = "Write proxy for field `TERR0`"]
pub struct TERR0_W<'a> { pub struct TERR0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -313,7 +313,7 @@ impl<'a> TERR0_W<'a> {
} }
} }
#[doc = "Reader of field `ALST0`"] #[doc = "Reader of field `ALST0`"]
pub type ALST0_R = crate::R<bool, bool>; pub type ALST0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `ALST0`"] #[doc = "Write proxy for field `ALST0`"]
pub struct ALST0_W<'a> { pub struct ALST0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -337,7 +337,7 @@ impl<'a> ALST0_W<'a> {
} }
} }
#[doc = "Reader of field `TXOK0`"] #[doc = "Reader of field `TXOK0`"]
pub type TXOK0_R = crate::R<bool, bool>; pub type TXOK0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXOK0`"] #[doc = "Write proxy for field `TXOK0`"]
pub struct TXOK0_W<'a> { pub struct TXOK0_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -361,7 +361,7 @@ impl<'a> TXOK0_W<'a> {
} }
} }
#[doc = "Reader of field `RQCP0`"] #[doc = "Reader of field `RQCP0`"]
pub type RQCP0_R = crate::R<bool, bool>; pub type RQCP0_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `RQCP0`"] #[doc = "Write proxy for field `RQCP0`"]
pub struct RQCP0_W<'a> { pub struct RQCP0_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

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

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register TDHR"] #[doc = "Reader of register TDHR"]
pub type R = crate::R<u32, super::TDHR>; pub type R = crate::can::bx::R<u32, super::TDHR>;
#[doc = "Writer for register TDHR"] #[doc = "Writer for register TDHR"]
pub type W = crate::W<u32, super::TDHR>; pub type W = crate::can::bx::W<u32, super::TDHR>;
#[doc = "Register TDHR `reset()`'s with value 0"] #[doc = "Register TDHR `reset()`'s with value 0"]
impl crate::ResetValue for super::TDHR { impl crate::can::bx::ResetValue for super::TDHR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::TDHR {
} }
} }
#[doc = "Reader of field `DATA7`"] #[doc = "Reader of field `DATA7`"]
pub type DATA7_R = crate::R<u8, u8>; pub type DATA7_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA7`"] #[doc = "Write proxy for field `DATA7`"]
pub struct DATA7_W<'a> { pub struct DATA7_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -25,7 +25,7 @@ impl<'a> DATA7_W<'a> {
} }
} }
#[doc = "Reader of field `DATA6`"] #[doc = "Reader of field `DATA6`"]
pub type DATA6_R = crate::R<u8, u8>; pub type DATA6_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA6`"] #[doc = "Write proxy for field `DATA6`"]
pub struct DATA6_W<'a> { pub struct DATA6_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -39,7 +39,7 @@ impl<'a> DATA6_W<'a> {
} }
} }
#[doc = "Reader of field `DATA5`"] #[doc = "Reader of field `DATA5`"]
pub type DATA5_R = crate::R<u8, u8>; pub type DATA5_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA5`"] #[doc = "Write proxy for field `DATA5`"]
pub struct DATA5_W<'a> { pub struct DATA5_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -53,7 +53,7 @@ impl<'a> DATA5_W<'a> {
} }
} }
#[doc = "Reader of field `DATA4`"] #[doc = "Reader of field `DATA4`"]
pub type DATA4_R = crate::R<u8, u8>; pub type DATA4_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA4`"] #[doc = "Write proxy for field `DATA4`"]
pub struct DATA4_W<'a> { pub struct DATA4_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register TDLR"] #[doc = "Reader of register TDLR"]
pub type R = crate::R<u32, super::TDLR>; pub type R = crate::can::bx::R<u32, super::TDLR>;
#[doc = "Writer for register TDLR"] #[doc = "Writer for register TDLR"]
pub type W = crate::W<u32, super::TDLR>; pub type W = crate::can::bx::W<u32, super::TDLR>;
#[doc = "Register TDLR `reset()`'s with value 0"] #[doc = "Register TDLR `reset()`'s with value 0"]
impl crate::ResetValue for super::TDLR { impl crate::can::bx::ResetValue for super::TDLR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::TDLR {
} }
} }
#[doc = "Reader of field `DATA3`"] #[doc = "Reader of field `DATA3`"]
pub type DATA3_R = crate::R<u8, u8>; pub type DATA3_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA3`"] #[doc = "Write proxy for field `DATA3`"]
pub struct DATA3_W<'a> { pub struct DATA3_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -25,7 +25,7 @@ impl<'a> DATA3_W<'a> {
} }
} }
#[doc = "Reader of field `DATA2`"] #[doc = "Reader of field `DATA2`"]
pub type DATA2_R = crate::R<u8, u8>; pub type DATA2_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA2`"] #[doc = "Write proxy for field `DATA2`"]
pub struct DATA2_W<'a> { pub struct DATA2_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -39,7 +39,7 @@ impl<'a> DATA2_W<'a> {
} }
} }
#[doc = "Reader of field `DATA1`"] #[doc = "Reader of field `DATA1`"]
pub type DATA1_R = crate::R<u8, u8>; pub type DATA1_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA1`"] #[doc = "Write proxy for field `DATA1`"]
pub struct DATA1_W<'a> { pub struct DATA1_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -53,7 +53,7 @@ impl<'a> DATA1_W<'a> {
} }
} }
#[doc = "Reader of field `DATA0`"] #[doc = "Reader of field `DATA0`"]
pub type DATA0_R = crate::R<u8, u8>; pub type DATA0_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DATA0`"] #[doc = "Write proxy for field `DATA0`"]
pub struct DATA0_W<'a> { pub struct DATA0_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register TDTR"] #[doc = "Reader of register TDTR"]
pub type R = crate::R<u32, super::TDTR>; pub type R = crate::can::bx::R<u32, super::TDTR>;
#[doc = "Writer for register TDTR"] #[doc = "Writer for register TDTR"]
pub type W = crate::W<u32, super::TDTR>; pub type W = crate::can::bx::W<u32, super::TDTR>;
#[doc = "Register TDTR `reset()`'s with value 0"] #[doc = "Register TDTR `reset()`'s with value 0"]
impl crate::ResetValue for super::TDTR { impl crate::can::bx::ResetValue for super::TDTR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::TDTR {
} }
} }
#[doc = "Reader of field `TIME`"] #[doc = "Reader of field `TIME`"]
pub type TIME_R = crate::R<u16, u16>; pub type TIME_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `TIME`"] #[doc = "Write proxy for field `TIME`"]
pub struct TIME_W<'a> { pub struct TIME_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -25,7 +25,7 @@ impl<'a> TIME_W<'a> {
} }
} }
#[doc = "Reader of field `TGT`"] #[doc = "Reader of field `TGT`"]
pub type TGT_R = crate::R<bool, bool>; pub type TGT_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TGT`"] #[doc = "Write proxy for field `TGT`"]
pub struct TGT_W<'a> { pub struct TGT_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -49,7 +49,7 @@ impl<'a> TGT_W<'a> {
} }
} }
#[doc = "Reader of field `DLC`"] #[doc = "Reader of field `DLC`"]
pub type DLC_R = crate::R<u8, u8>; pub type DLC_R = crate::can::bx::R<u8, u8>;
#[doc = "Write proxy for field `DLC`"] #[doc = "Write proxy for field `DLC`"]
pub struct DLC_W<'a> { pub struct DLC_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -1,9 +1,9 @@
#[doc = "Reader of register TIR"] #[doc = "Reader of register TIR"]
pub type R = crate::R<u32, super::TIR>; pub type R = crate::can::bx::R<u32, super::TIR>;
#[doc = "Writer for register TIR"] #[doc = "Writer for register TIR"]
pub type W = crate::W<u32, super::TIR>; pub type W = crate::can::bx::W<u32, super::TIR>;
#[doc = "Register TIR `reset()`'s with value 0"] #[doc = "Register TIR `reset()`'s with value 0"]
impl crate::ResetValue for super::TIR { impl crate::can::bx::ResetValue for super::TIR {
type Type = u32; type Type = u32;
#[inline(always)] #[inline(always)]
fn reset_value() -> Self::Type { fn reset_value() -> Self::Type {
@ -11,7 +11,7 @@ impl crate::ResetValue for super::TIR {
} }
} }
#[doc = "Reader of field `STID`"] #[doc = "Reader of field `STID`"]
pub type STID_R = crate::R<u16, u16>; pub type STID_R = crate::can::bx::R<u16, u16>;
#[doc = "Write proxy for field `STID`"] #[doc = "Write proxy for field `STID`"]
pub struct STID_W<'a> { pub struct STID_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -25,7 +25,7 @@ impl<'a> STID_W<'a> {
} }
} }
#[doc = "Reader of field `EXID`"] #[doc = "Reader of field `EXID`"]
pub type EXID_R = crate::R<u32, u32>; pub type EXID_R = crate::can::bx::R<u32, u32>;
#[doc = "Write proxy for field `EXID`"] #[doc = "Write proxy for field `EXID`"]
pub struct EXID_W<'a> { pub struct EXID_W<'a> {
w: &'a mut W, w: &'a mut W,
@ -53,7 +53,7 @@ impl From<IDE_A> for bool {
} }
} }
#[doc = "Reader of field `IDE`"] #[doc = "Reader of field `IDE`"]
pub type IDE_R = crate::R<bool, IDE_A>; pub type IDE_R = crate::can::bx::R<bool, IDE_A>;
impl IDE_R { impl IDE_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -128,7 +128,7 @@ impl From<RTR_A> for bool {
} }
} }
#[doc = "Reader of field `RTR`"] #[doc = "Reader of field `RTR`"]
pub type RTR_R = crate::R<bool, RTR_A>; pub type RTR_R = crate::can::bx::R<bool, RTR_A>;
impl RTR_R { impl RTR_R {
#[doc = r"Get enumerated values variant"] #[doc = r"Get enumerated values variant"]
#[inline(always)] #[inline(always)]
@ -189,7 +189,7 @@ impl<'a> RTR_W<'a> {
} }
} }
#[doc = "Reader of field `TXRQ`"] #[doc = "Reader of field `TXRQ`"]
pub type TXRQ_R = crate::R<bool, bool>; pub type TXRQ_R = crate::can::bx::R<bool, bool>;
#[doc = "Write proxy for field `TXRQ`"] #[doc = "Write proxy for field `TXRQ`"]
pub struct TXRQ_W<'a> { pub struct TXRQ_W<'a> {
w: &'a mut W, w: &'a mut W,

View File

@ -4,8 +4,9 @@ use core::marker::PhantomData;
use core::ops::{Deref, DerefMut}; use core::ops::{Deref, DerefMut};
use core::task::Poll; use core::task::Poll;
pub use bxcan; pub mod bx;
use bxcan::{Data, ExtendedId, Frame, Id, StandardId};
use bx::{Data, ExtendedId, Frame, Id, StandardId};
use embassy_hal_internal::{into_ref, PeripheralRef}; use embassy_hal_internal::{into_ref, PeripheralRef};
use futures::FutureExt; use futures::FutureExt;
@ -29,7 +30,7 @@ pub struct Envelope {
#[cfg(feature = "time")] #[cfg(feature = "time")]
pub ts: embassy_time::Instant, pub ts: embassy_time::Instant,
/// The actual CAN frame. /// The actual CAN frame.
pub frame: bxcan::Frame, pub frame: crate::can::bx::Frame,
} }
/// Interrupt handler. /// Interrupt handler.
@ -93,7 +94,7 @@ impl<T: Instance> interrupt::typelevel::Handler<T::SCEInterrupt> for SceInterrup
/// CAN driver /// CAN driver
pub struct Can<'d, T: Instance> { pub struct Can<'d, T: Instance> {
can: bxcan::Can<BxcanInstance<'d, T>>, can: crate::can::bx::Can<BxcanInstance<'d, T>>,
} }
/// Error returned by `try_read` /// Error returned by `try_read`
@ -166,7 +167,7 @@ impl<'d, T: Instance> Can<'d, T> {
rx.set_as_af(rx.af_num(), AFType::Input); rx.set_as_af(rx.af_num(), AFType::Input);
tx.set_as_af(tx.af_num(), AFType::OutputPushPull); tx.set_as_af(tx.af_num(), AFType::OutputPushPull);
let can = bxcan::Can::builder(BxcanInstance(peri)).leave_disabled(); let can = crate::can::bx::Can::builder(BxcanInstance(peri)).leave_disabled();
Self { can } Self { can }
} }
@ -198,19 +199,19 @@ impl<'d, T: Instance> Can<'d, T> {
/// Queues the message to be sent. /// Queues the message to be sent.
/// ///
/// If the TX queue is full, this will wait until there is space, therefore exerting backpressure. /// If the TX queue is full, this will wait until there is space, therefore exerting backpressure.
pub async fn write(&mut self, frame: &Frame) -> bxcan::TransmitStatus { pub async fn write(&mut self, frame: &Frame) -> crate::can::bx::TransmitStatus {
self.split().0.write(frame).await self.split().0.write(frame).await
} }
/// Attempts to transmit a frame without blocking. /// Attempts to transmit a frame without blocking.
/// ///
/// Returns [Err(TryWriteError::Full)] if all transmit mailboxes are full. /// Returns [Err(TryWriteError::Full)] if all transmit mailboxes are full.
pub fn try_write(&mut self, frame: &Frame) -> Result<bxcan::TransmitStatus, TryWriteError> { pub fn try_write(&mut self, frame: &Frame) -> Result<crate::can::bx::TransmitStatus, TryWriteError> {
self.split().0.try_write(frame) self.split().0.try_write(frame)
} }
/// Waits for a specific transmit mailbox to become empty /// Waits for a specific transmit mailbox to become empty
pub async fn flush(&self, mb: bxcan::Mailbox) { pub async fn flush(&self, mb: crate::can::bx::Mailbox) {
CanTx::<T>::flush_inner(mb).await CanTx::<T>::flush_inner(mb).await
} }
@ -304,23 +305,23 @@ impl<'d, T: Instance> Can<'d, T> {
} }
} }
impl<'d, T: Instance> AsMut<bxcan::Can<BxcanInstance<'d, T>>> for Can<'d, T> { impl<'d, T: Instance> AsMut<crate::can::bx::Can<BxcanInstance<'d, T>>> for Can<'d, T> {
/// Get mutable access to the lower-level driver from the `bxcan` crate. /// Get mutable access to the lower-level driver from the `bxcan` crate.
fn as_mut(&mut self) -> &mut bxcan::Can<BxcanInstance<'d, T>> { fn as_mut(&mut self) -> &mut crate::can::bx::Can<BxcanInstance<'d, T>> {
&mut self.can &mut self.can
} }
} }
/// CAN driver, transmit half. /// CAN driver, transmit half.
pub struct CanTx<'c, 'd, T: Instance> { pub struct CanTx<'c, 'd, T: Instance> {
tx: &'c mut bxcan::Tx<BxcanInstance<'d, T>>, tx: &'c mut crate::can::bx::Tx<BxcanInstance<'d, T>>,
} }
impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> { impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
/// Queues the message to be sent. /// Queues the message to be sent.
/// ///
/// If the TX queue is full, this will wait until there is space, therefore exerting backpressure. /// If the TX queue is full, this will wait until there is space, therefore exerting backpressure.
pub async fn write(&mut self, frame: &Frame) -> bxcan::TransmitStatus { pub async fn write(&mut self, frame: &Frame) -> crate::can::bx::TransmitStatus {
poll_fn(|cx| { poll_fn(|cx| {
T::state().tx_waker.register(cx.waker()); T::state().tx_waker.register(cx.waker());
if let Ok(status) = self.tx.transmit(frame) { if let Ok(status) = self.tx.transmit(frame) {
@ -335,11 +336,11 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
/// Attempts to transmit a frame without blocking. /// Attempts to transmit a frame without blocking.
/// ///
/// Returns [Err(TryWriteError::Full)] if all transmit mailboxes are full. /// Returns [Err(TryWriteError::Full)] if all transmit mailboxes are full.
pub fn try_write(&mut self, frame: &Frame) -> Result<bxcan::TransmitStatus, TryWriteError> { pub fn try_write(&mut self, frame: &Frame) -> Result<crate::can::bx::TransmitStatus, TryWriteError> {
self.tx.transmit(frame).map_err(|_| TryWriteError::Full) self.tx.transmit(frame).map_err(|_| TryWriteError::Full)
} }
async fn flush_inner(mb: bxcan::Mailbox) { async fn flush_inner(mb: crate::can::bx::Mailbox) {
poll_fn(|cx| { poll_fn(|cx| {
T::state().tx_waker.register(cx.waker()); T::state().tx_waker.register(cx.waker());
if T::regs().tsr().read().tme(mb.index()) { if T::regs().tsr().read().tme(mb.index()) {
@ -352,7 +353,7 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
} }
/// Waits for a specific transmit mailbox to become empty /// Waits for a specific transmit mailbox to become empty
pub async fn flush(&self, mb: bxcan::Mailbox) { pub async fn flush(&self, mb: crate::can::bx::Mailbox) {
Self::flush_inner(mb).await Self::flush_inner(mb).await
} }
@ -361,9 +362,9 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
T::state().tx_waker.register(cx.waker()); T::state().tx_waker.register(cx.waker());
let tsr = T::regs().tsr().read(); let tsr = T::regs().tsr().read();
if tsr.tme(bxcan::Mailbox::Mailbox0.index()) if tsr.tme(crate::can::bx::Mailbox::Mailbox0.index())
|| tsr.tme(bxcan::Mailbox::Mailbox1.index()) || tsr.tme(crate::can::bx::Mailbox::Mailbox1.index())
|| tsr.tme(bxcan::Mailbox::Mailbox2.index()) || tsr.tme(crate::can::bx::Mailbox::Mailbox2.index())
{ {
return Poll::Ready(()); return Poll::Ready(());
} }
@ -383,9 +384,9 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
T::state().tx_waker.register(cx.waker()); T::state().tx_waker.register(cx.waker());
let tsr = T::regs().tsr().read(); let tsr = T::regs().tsr().read();
if tsr.tme(bxcan::Mailbox::Mailbox0.index()) if tsr.tme(crate::can::bx::Mailbox::Mailbox0.index())
&& tsr.tme(bxcan::Mailbox::Mailbox1.index()) && tsr.tme(crate::can::bx::Mailbox::Mailbox1.index())
&& tsr.tme(bxcan::Mailbox::Mailbox2.index()) && tsr.tme(crate::can::bx::Mailbox::Mailbox2.index())
{ {
return Poll::Ready(()); return Poll::Ready(());
} }
@ -404,8 +405,8 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
/// CAN driver, receive half. /// CAN driver, receive half.
#[allow(dead_code)] #[allow(dead_code)]
pub struct CanRx<'c, 'd, T: Instance> { pub struct CanRx<'c, 'd, T: Instance> {
rx0: &'c mut bxcan::Rx0<BxcanInstance<'d, T>>, rx0: &'c mut crate::can::bx::Rx0<BxcanInstance<'d, T>>,
rx1: &'c mut bxcan::Rx1<BxcanInstance<'d, T>>, rx1: &'c mut crate::can::bx::Rx1<BxcanInstance<'d, T>>,
} }
impl<'c, 'd, T: Instance> CanRx<'c, 'd, T> { impl<'c, 'd, T: Instance> CanRx<'c, 'd, T> {
@ -478,7 +479,7 @@ impl<'d, T: Instance> Drop for Can<'d, T> {
} }
impl<'d, T: Instance> Deref for Can<'d, T> { impl<'d, T: Instance> Deref for Can<'d, T> {
type Target = bxcan::Can<BxcanInstance<'d, T>>; type Target = crate::can::bx::Can<BxcanInstance<'d, T>>;
fn deref(&self) -> &Self::Target { fn deref(&self) -> &Self::Target {
&self.can &self.can
@ -515,7 +516,7 @@ pub(crate) mod sealed {
} }
pub trait Instance { pub trait Instance {
const REGISTERS: *mut bxcan::RegisterBlock; const REGISTERS: *mut crate::can::bx::RegisterBlock;
fn regs() -> crate::pac::can::Can; fn regs() -> crate::pac::can::Can;
fn state() -> &'static State; fn state() -> &'static State;
@ -537,14 +538,14 @@ pub trait Instance: sealed::Instance + RccPeripheral + 'static {
/// BXCAN instance newtype. /// BXCAN instance newtype.
pub struct BxcanInstance<'a, T>(PeripheralRef<'a, T>); pub struct BxcanInstance<'a, T>(PeripheralRef<'a, T>);
unsafe impl<'d, T: Instance> bxcan::Instance for BxcanInstance<'d, T> { unsafe impl<'d, T: Instance> crate::can::bx::Instance for BxcanInstance<'d, T> {
const REGISTERS: *mut bxcan::RegisterBlock = T::REGISTERS; const REGISTERS: *mut crate::can::bx::RegisterBlock = T::REGISTERS;
} }
foreach_peripheral!( foreach_peripheral!(
(can, $inst:ident) => { (can, $inst:ident) => {
impl sealed::Instance for peripherals::$inst { impl sealed::Instance for peripherals::$inst {
const REGISTERS: *mut bxcan::RegisterBlock = crate::pac::$inst.as_ptr() as *mut _; const REGISTERS: *mut crate::can::bx::RegisterBlock = crate::pac::$inst.as_ptr() as *mut _;
fn regs() -> crate::pac::can::Can { fn regs() -> crate::pac::can::Can {
crate::pac::$inst crate::pac::$inst
@ -567,7 +568,7 @@ foreach_peripheral!(
foreach_peripheral!( foreach_peripheral!(
(can, CAN) => { (can, CAN) => {
unsafe impl<'d> bxcan::FilterOwner for BxcanInstance<'d, peripherals::CAN> { unsafe impl<'d> crate::can::bx::FilterOwner for BxcanInstance<'d, peripherals::CAN> {
const NUM_FILTER_BANKS: u8 = 14; const NUM_FILTER_BANKS: u8 = 14;
} }
}; };
@ -582,19 +583,19 @@ foreach_peripheral!(
))] { ))] {
// Most L4 devices and some F7 devices use the name "CAN1" // Most L4 devices and some F7 devices use the name "CAN1"
// even if there is no "CAN2" peripheral. // even if there is no "CAN2" peripheral.
unsafe impl<'d> bxcan::FilterOwner for BxcanInstance<'d, peripherals::CAN1> { unsafe impl<'d> crate::can::bx::FilterOwner for BxcanInstance<'d, peripherals::CAN1> {
const NUM_FILTER_BANKS: u8 = 14; const NUM_FILTER_BANKS: u8 = 14;
} }
} else { } else {
unsafe impl<'d> bxcan::FilterOwner for BxcanInstance<'d, peripherals::CAN1> { unsafe impl<'d> crate::can::bx::FilterOwner for BxcanInstance<'d, peripherals::CAN1> {
const NUM_FILTER_BANKS: u8 = 28; const NUM_FILTER_BANKS: u8 = 28;
} }
unsafe impl<'d> bxcan::MasterInstance for BxcanInstance<'d, peripherals::CAN1> {} unsafe impl<'d> crate::can::bx::MasterInstance for BxcanInstance<'d, peripherals::CAN1> {}
} }
} }
}; };
(can, CAN3) => { (can, CAN3) => {
unsafe impl<'d> bxcan::FilterOwner for BxcanInstance<'d, peripherals::CAN3> { unsafe impl<'d> crate::can::bx::FilterOwner for BxcanInstance<'d, peripherals::CAN3> {
const NUM_FILTER_BANKS: u8 = 14; const NUM_FILTER_BANKS: u8 = 14;
} }
}; };
@ -607,12 +608,12 @@ trait Index {
fn index(&self) -> usize; fn index(&self) -> usize;
} }
impl Index for bxcan::Mailbox { impl Index for crate::can::bx::Mailbox {
fn index(&self) -> usize { fn index(&self) -> usize {
match self { match self {
bxcan::Mailbox::Mailbox0 => 0, crate::can::bx::Mailbox::Mailbox0 => 0,
bxcan::Mailbox::Mailbox1 => 1, crate::can::bx::Mailbox::Mailbox1 => 1,
bxcan::Mailbox::Mailbox2 => 2, crate::can::bx::Mailbox::Mailbox2 => 2,
} }
} }
} }

View File

@ -3,8 +3,8 @@
use defmt::*; use defmt::*;
use embassy_executor::Spawner; use embassy_executor::Spawner;
use embassy_stm32::can::bxcan::filter::Mask32; use embassy_stm32::can::bx::filter::Mask32;
use embassy_stm32::can::bxcan::{Fifo, Frame, Id, StandardId}; use embassy_stm32::can::bx::{Fifo, Frame, Id, StandardId};
use embassy_stm32::can::{Can, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, TxInterruptHandler}; use embassy_stm32::can::{Can, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, TxInterruptHandler};
use embassy_stm32::peripherals::CAN; use embassy_stm32::peripherals::CAN;
use embassy_stm32::{bind_interrupts, Config}; use embassy_stm32::{bind_interrupts, Config};

View File

@ -9,8 +9,8 @@ use common::*;
use defmt::assert; use defmt::assert;
use embassy_executor::Spawner; use embassy_executor::Spawner;
use embassy_stm32::bind_interrupts; use embassy_stm32::bind_interrupts;
use embassy_stm32::can::bxcan::filter::Mask32; use embassy_stm32::can::bx::filter::Mask32;
use embassy_stm32::can::bxcan::{Fifo, Frame, StandardId}; use embassy_stm32::can::bx::{Fifo, Frame, StandardId};
use embassy_stm32::can::{Can, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, TxInterruptHandler}; use embassy_stm32::can::{Can, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, TxInterruptHandler};
use embassy_stm32::gpio::{Input, Pull}; use embassy_stm32::gpio::{Input, Pull};
use embassy_stm32::peripherals::CAN1; use embassy_stm32::peripherals::CAN1;