From 0666a6ba1dbd66cf8b93c113e362ccbcd99152a0 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Sat, 6 Nov 2021 11:50:33 +0100 Subject: Initial commit --- src/can0.rs | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 src/can0.rs (limited to 'src/can0.rs') diff --git a/src/can0.rs b/src/can0.rs new file mode 100644 index 0000000..96ccd4c --- /dev/null +++ b/src/can0.rs @@ -0,0 +1,291 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Core Release"] + pub crel: crate::Reg, + #[doc = "0x04 - Endian"] + pub endn: crate::Reg, + #[doc = "0x08 - Message RAM Configuration"] + pub mrcfg: crate::Reg, + #[doc = "0x0c - Fast Bit Timing and Prescaler"] + pub dbtp: crate::Reg, + #[doc = "0x10 - Test"] + pub test: crate::Reg, + #[doc = "0x14 - RAM Watchdog"] + pub rwd: crate::Reg, + #[doc = "0x18 - CC Control"] + pub cccr: crate::Reg, + #[doc = "0x1c - Nominal Bit Timing and Prescaler"] + pub nbtp: crate::Reg, + #[doc = "0x20 - Timestamp Counter Configuration"] + pub tscc: crate::Reg, + #[doc = "0x24 - Timestamp Counter Value"] + pub tscv: crate::Reg, + #[doc = "0x28 - Timeout Counter Configuration"] + pub tocc: crate::Reg, + #[doc = "0x2c - Timeout Counter Value"] + pub tocv: crate::Reg, + _reserved12: [u8; 0x10], + #[doc = "0x40 - Error Counter"] + pub ecr: crate::Reg, + #[doc = "0x44 - Protocol Status"] + pub psr: crate::Reg, + #[doc = "0x48 - Extended ID Filter Configuration"] + pub tdcr: crate::Reg, + _reserved15: [u8; 0x04], + #[doc = "0x50 - Interrupt"] + pub ir: crate::Reg, + #[doc = "0x54 - Interrupt Enable"] + pub ie: crate::Reg, + #[doc = "0x58 - Interrupt Line Select"] + pub ils: crate::Reg, + #[doc = "0x5c - Interrupt Line Enable"] + pub ile: crate::Reg, + _reserved19: [u8; 0x20], + #[doc = "0x80 - Global Filter Configuration"] + pub gfc: crate::Reg, + #[doc = "0x84 - Standard ID Filter Configuration"] + pub sidfc: crate::Reg, + #[doc = "0x88 - Extended ID Filter Configuration"] + pub xidfc: crate::Reg, + _reserved22: [u8; 0x04], + #[doc = "0x90 - Extended ID AND Mask"] + pub xidam: crate::Reg, + #[doc = "0x94 - High Priority Message Status"] + pub hpms: crate::Reg, + #[doc = "0x98 - New Data 1"] + pub ndat1: crate::Reg, + #[doc = "0x9c - New Data 2"] + pub ndat2: crate::Reg, + #[doc = "0xa0 - Rx FIFO 0 Configuration"] + pub rxf0c: crate::Reg, + #[doc = "0xa4 - Rx FIFO 0 Status"] + pub rxf0s: crate::Reg, + #[doc = "0xa8 - Rx FIFO 0 Acknowledge"] + pub rxf0a: crate::Reg, + #[doc = "0xac - Rx Buffer Configuration"] + pub rxbc: crate::Reg, + #[doc = "0xb0 - Rx FIFO 1 Configuration"] + pub rxf1c: crate::Reg, + #[doc = "0xb4 - Rx FIFO 1 Status"] + pub rxf1s: crate::Reg, + #[doc = "0xb8 - Rx FIFO 1 Acknowledge"] + pub rxf1a: crate::Reg, + #[doc = "0xbc - Rx Buffer / FIFO Element Size Configuration"] + pub rxesc: crate::Reg, + #[doc = "0xc0 - Tx Buffer Configuration"] + pub txbc: crate::Reg, + #[doc = "0xc4 - Tx FIFO / Queue Status"] + pub txfqs: crate::Reg, + #[doc = "0xc8 - Tx Buffer Element Size Configuration"] + pub txesc: crate::Reg, + #[doc = "0xcc - Tx Buffer Request Pending"] + pub txbrp: crate::Reg, + #[doc = "0xd0 - Tx Buffer Add Request"] + pub txbar: crate::Reg, + #[doc = "0xd4 - Tx Buffer Cancellation Request"] + pub txbcr: crate::Reg, + #[doc = "0xd8 - Tx Buffer Transmission Occurred"] + pub txbto: crate::Reg, + #[doc = "0xdc - Tx Buffer Cancellation Finished"] + pub txbcf: crate::Reg, + #[doc = "0xe0 - Tx Buffer Transmission Interrupt Enable"] + pub txbtie: crate::Reg, + #[doc = "0xe4 - Tx Buffer Cancellation Finished Interrupt Enable"] + pub txbcie: crate::Reg, + _reserved44: [u8; 0x08], + #[doc = "0xf0 - Tx Event FIFO Configuration"] + pub txefc: crate::Reg, + #[doc = "0xf4 - Tx Event FIFO Status"] + pub txefs: crate::Reg, + #[doc = "0xf8 - Tx Event FIFO Acknowledge"] + pub txefa: crate::Reg, +} +#[doc = "CREL register accessor: an alias for `Reg`"] +pub type CREL = crate::Reg; +#[doc = "Core Release"] +pub mod crel; +#[doc = "ENDN register accessor: an alias for `Reg`"] +pub type ENDN = crate::Reg; +#[doc = "Endian"] +pub mod endn; +#[doc = "MRCFG register accessor: an alias for `Reg`"] +pub type MRCFG = crate::Reg; +#[doc = "Message RAM Configuration"] +pub mod mrcfg; +#[doc = "DBTP register accessor: an alias for `Reg`"] +pub type DBTP = crate::Reg; +#[doc = "Fast Bit Timing and Prescaler"] +pub mod dbtp; +#[doc = "TEST register accessor: an alias for `Reg`"] +pub type TEST = crate::Reg; +#[doc = "Test"] +pub mod test; +#[doc = "RWD register accessor: an alias for `Reg`"] +pub type RWD = crate::Reg; +#[doc = "RAM Watchdog"] +pub mod rwd; +#[doc = "CCCR register accessor: an alias for `Reg`"] +pub type CCCR = crate::Reg; +#[doc = "CC Control"] +pub mod cccr; +#[doc = "NBTP register accessor: an alias for `Reg`"] +pub type NBTP = crate::Reg; +#[doc = "Nominal Bit Timing and Prescaler"] +pub mod nbtp; +#[doc = "TSCC register accessor: an alias for `Reg`"] +pub type TSCC = crate::Reg; +#[doc = "Timestamp Counter Configuration"] +pub mod tscc; +#[doc = "TSCV register accessor: an alias for `Reg`"] +pub type TSCV = crate::Reg; +#[doc = "Timestamp Counter Value"] +pub mod tscv; +#[doc = "TOCC register accessor: an alias for `Reg`"] +pub type TOCC = crate::Reg; +#[doc = "Timeout Counter Configuration"] +pub mod tocc; +#[doc = "TOCV register accessor: an alias for `Reg`"] +pub type TOCV = crate::Reg; +#[doc = "Timeout Counter Value"] +pub mod tocv; +#[doc = "ECR register accessor: an alias for `Reg`"] +pub type ECR = crate::Reg; +#[doc = "Error Counter"] +pub mod ecr; +#[doc = "PSR register accessor: an alias for `Reg`"] +pub type PSR = crate::Reg; +#[doc = "Protocol Status"] +pub mod psr; +#[doc = "TDCR register accessor: an alias for `Reg`"] +pub type TDCR = crate::Reg; +#[doc = "Extended ID Filter Configuration"] +pub mod tdcr; +#[doc = "IR register accessor: an alias for `Reg`"] +pub type IR = crate::Reg; +#[doc = "Interrupt"] +pub mod ir; +#[doc = "IE register accessor: an alias for `Reg`"] +pub type IE = crate::Reg; +#[doc = "Interrupt Enable"] +pub mod ie; +#[doc = "ILS register accessor: an alias for `Reg`"] +pub type ILS = crate::Reg; +#[doc = "Interrupt Line Select"] +pub mod ils; +#[doc = "ILE register accessor: an alias for `Reg`"] +pub type ILE = crate::Reg; +#[doc = "Interrupt Line Enable"] +pub mod ile; +#[doc = "GFC register accessor: an alias for `Reg`"] +pub type GFC = crate::Reg; +#[doc = "Global Filter Configuration"] +pub mod gfc; +#[doc = "SIDFC register accessor: an alias for `Reg`"] +pub type SIDFC = crate::Reg; +#[doc = "Standard ID Filter Configuration"] +pub mod sidfc; +#[doc = "XIDFC register accessor: an alias for `Reg`"] +pub type XIDFC = crate::Reg; +#[doc = "Extended ID Filter Configuration"] +pub mod xidfc; +#[doc = "XIDAM register accessor: an alias for `Reg`"] +pub type XIDAM = crate::Reg; +#[doc = "Extended ID AND Mask"] +pub mod xidam; +#[doc = "HPMS register accessor: an alias for `Reg`"] +pub type HPMS = crate::Reg; +#[doc = "High Priority Message Status"] +pub mod hpms; +#[doc = "NDAT1 register accessor: an alias for `Reg`"] +pub type NDAT1 = crate::Reg; +#[doc = "New Data 1"] +pub mod ndat1; +#[doc = "NDAT2 register accessor: an alias for `Reg`"] +pub type NDAT2 = crate::Reg; +#[doc = "New Data 2"] +pub mod ndat2; +#[doc = "RXF0C register accessor: an alias for `Reg`"] +pub type RXF0C = crate::Reg; +#[doc = "Rx FIFO 0 Configuration"] +pub mod rxf0c; +#[doc = "RXF0S register accessor: an alias for `Reg`"] +pub type RXF0S = crate::Reg; +#[doc = "Rx FIFO 0 Status"] +pub mod rxf0s; +#[doc = "RXF0A register accessor: an alias for `Reg`"] +pub type RXF0A = crate::Reg; +#[doc = "Rx FIFO 0 Acknowledge"] +pub mod rxf0a; +#[doc = "RXBC register accessor: an alias for `Reg`"] +pub type RXBC = crate::Reg; +#[doc = "Rx Buffer Configuration"] +pub mod rxbc; +#[doc = "RXF1C register accessor: an alias for `Reg`"] +pub type RXF1C = crate::Reg; +#[doc = "Rx FIFO 1 Configuration"] +pub mod rxf1c; +#[doc = "RXF1S register accessor: an alias for `Reg`"] +pub type RXF1S = crate::Reg; +#[doc = "Rx FIFO 1 Status"] +pub mod rxf1s; +#[doc = "RXF1A register accessor: an alias for `Reg`"] +pub type RXF1A = crate::Reg; +#[doc = "Rx FIFO 1 Acknowledge"] +pub mod rxf1a; +#[doc = "RXESC register accessor: an alias for `Reg`"] +pub type RXESC = crate::Reg; +#[doc = "Rx Buffer / FIFO Element Size Configuration"] +pub mod rxesc; +#[doc = "TXBC register accessor: an alias for `Reg`"] +pub type TXBC = crate::Reg; +#[doc = "Tx Buffer Configuration"] +pub mod txbc; +#[doc = "TXFQS register accessor: an alias for `Reg`"] +pub type TXFQS = crate::Reg; +#[doc = "Tx FIFO / Queue Status"] +pub mod txfqs; +#[doc = "TXESC register accessor: an alias for `Reg`"] +pub type TXESC = crate::Reg; +#[doc = "Tx Buffer Element Size Configuration"] +pub mod txesc; +#[doc = "TXBRP register accessor: an alias for `Reg`"] +pub type TXBRP = crate::Reg; +#[doc = "Tx Buffer Request Pending"] +pub mod txbrp; +#[doc = "TXBAR register accessor: an alias for `Reg`"] +pub type TXBAR = crate::Reg; +#[doc = "Tx Buffer Add Request"] +pub mod txbar; +#[doc = "TXBCR register accessor: an alias for `Reg`"] +pub type TXBCR = crate::Reg; +#[doc = "Tx Buffer Cancellation Request"] +pub mod txbcr; +#[doc = "TXBTO register accessor: an alias for `Reg`"] +pub type TXBTO = crate::Reg; +#[doc = "Tx Buffer Transmission Occurred"] +pub mod txbto; +#[doc = "TXBCF register accessor: an alias for `Reg`"] +pub type TXBCF = crate::Reg; +#[doc = "Tx Buffer Cancellation Finished"] +pub mod txbcf; +#[doc = "TXBTIE register accessor: an alias for `Reg`"] +pub type TXBTIE = crate::Reg; +#[doc = "Tx Buffer Transmission Interrupt Enable"] +pub mod txbtie; +#[doc = "TXBCIE register accessor: an alias for `Reg`"] +pub type TXBCIE = crate::Reg; +#[doc = "Tx Buffer Cancellation Finished Interrupt Enable"] +pub mod txbcie; +#[doc = "TXEFC register accessor: an alias for `Reg`"] +pub type TXEFC = crate::Reg; +#[doc = "Tx Event FIFO Configuration"] +pub mod txefc; +#[doc = "TXEFS register accessor: an alias for `Reg`"] +pub type TXEFS = crate::Reg; +#[doc = "Tx Event FIFO Status"] +pub mod txefs; +#[doc = "TXEFA register accessor: an alias for `Reg`"] +pub type TXEFA = crate::Reg; +#[doc = "Tx Event FIFO Acknowledge"] +pub mod txefa; -- cgit v1.2.3-70-g09d2