first building version of the PAC

This commit is contained in:
Robin Müller 2021-11-21 20:06:32 +01:00
parent 71f0713e4f
commit 6145f4163f
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
580 changed files with 96467 additions and 6 deletions

View File

@ -1,8 +1,24 @@
[package]
name = "va416xx"
version = "0.1.0"
authors = ["Robin Mueller <robin.mueller.m@gmail.com>"]
edition = "2021"
description = "PAC for the Vorago VA416xx family of microcontrollers"
homepage = "https://github.com/robamu/va416xx-rs"
repository = "https://github.com/robamu/va416xx-rs"
license = "MIT OR Apache-2.0"
keywords = ["no-std", "arm", "cortex-m", "vorago", "va416xx"]
categories = ["embedded", "no-std", "hardware-support"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
[features]
rt = ["cortex-m-rt/device"]

16
build.rs Normal file
View File

@ -0,0 +1,16 @@
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::PathBuf;
fn main() {
if env::var_os("CARGO_FEATURE_RT").is_some() {
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
File::create(out.join("device.x"))
.unwrap()
.write_all(include_bytes!("device.x"))
.unwrap();
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=device.x");
}
println!("cargo:rerun-if-changed=build.rs");
}

197
device.x Normal file
View File

@ -0,0 +1,197 @@
PROVIDE(U0 = DefaultHandler);
PROVIDE(U1 = DefaultHandler);
PROVIDE(U2 = DefaultHandler);
PROVIDE(U3 = DefaultHandler);
PROVIDE(U4 = DefaultHandler);
PROVIDE(U5 = DefaultHandler);
PROVIDE(U6 = DefaultHandler);
PROVIDE(U7 = DefaultHandler);
PROVIDE(U8 = DefaultHandler);
PROVIDE(U9 = DefaultHandler);
PROVIDE(U10 = DefaultHandler);
PROVIDE(U11 = DefaultHandler);
PROVIDE(U12 = DefaultHandler);
PROVIDE(U13 = DefaultHandler);
PROVIDE(U14 = DefaultHandler);
PROVIDE(U15 = DefaultHandler);
PROVIDE(SPI0_TX = DefaultHandler);
PROVIDE(SPI0_RX = DefaultHandler);
PROVIDE(SPI1_TX = DefaultHandler);
PROVIDE(SPI1_RX = DefaultHandler);
PROVIDE(SPI2_TX = DefaultHandler);
PROVIDE(SPI2_RX = DefaultHandler);
PROVIDE(SPI3_TX = DefaultHandler);
PROVIDE(SPI3_RX = DefaultHandler);
PROVIDE(UART0_TX = DefaultHandler);
PROVIDE(UART0_RX = DefaultHandler);
PROVIDE(UART1_TX = DefaultHandler);
PROVIDE(UART1_RX = DefaultHandler);
PROVIDE(UART2_TX = DefaultHandler);
PROVIDE(UART2_RX = DefaultHandler);
PROVIDE(I2C0_MS = DefaultHandler);
PROVIDE(I2C0_SL = DefaultHandler);
PROVIDE(I2C1_MS = DefaultHandler);
PROVIDE(I2C1_SL = DefaultHandler);
PROVIDE(I2C2_MS = DefaultHandler);
PROVIDE(I2C2_SL = DefaultHandler);
PROVIDE(ETHERNET = DefaultHandler);
PROVIDE(U37 = DefaultHandler);
PROVIDE(SPW = DefaultHandler);
PROVIDE(U39 = DefaultHandler);
PROVIDE(DAC0 = DefaultHandler);
PROVIDE(DAC1 = DefaultHandler);
PROVIDE(TRNG = DefaultHandler);
PROVIDE(DMA_ERROR = DefaultHandler);
PROVIDE(ADC = DefaultHandler);
PROVIDE(LOCLK = DefaultHandler);
PROVIDE(LVD = DefaultHandler);
PROVIDE(WATCHDOG = DefaultHandler);
PROVIDE(TIM0 = DefaultHandler);
PROVIDE(TIM1 = DefaultHandler);
PROVIDE(TIM2 = DefaultHandler);
PROVIDE(TIM3 = DefaultHandler);
PROVIDE(TIM4 = DefaultHandler);
PROVIDE(TIM5 = DefaultHandler);
PROVIDE(TIM6 = DefaultHandler);
PROVIDE(TIM7 = DefaultHandler);
PROVIDE(TIM8 = DefaultHandler);
PROVIDE(TIM9 = DefaultHandler);
PROVIDE(TIM10 = DefaultHandler);
PROVIDE(TIM11 = DefaultHandler);
PROVIDE(TIM12 = DefaultHandler);
PROVIDE(TIM13 = DefaultHandler);
PROVIDE(TIM14 = DefaultHandler);
PROVIDE(TIM15 = DefaultHandler);
PROVIDE(TIM16 = DefaultHandler);
PROVIDE(TIM17 = DefaultHandler);
PROVIDE(TIM18 = DefaultHandler);
PROVIDE(TIM19 = DefaultHandler);
PROVIDE(TIM20 = DefaultHandler);
PROVIDE(TIM21 = DefaultHandler);
PROVIDE(TIM22 = DefaultHandler);
PROVIDE(TIM23 = DefaultHandler);
PROVIDE(CAN0 = DefaultHandler);
PROVIDE(U73 = DefaultHandler);
PROVIDE(CAN1 = DefaultHandler);
PROVIDE(U75 = DefaultHandler);
PROVIDE(EDAC_MBE = DefaultHandler);
PROVIDE(EDAC_SBE = DefaultHandler);
PROVIDE(PORTA0 = DefaultHandler);
PROVIDE(PORTA1 = DefaultHandler);
PROVIDE(PORTA2 = DefaultHandler);
PROVIDE(PORTA3 = DefaultHandler);
PROVIDE(PORTA4 = DefaultHandler);
PROVIDE(PORTA5 = DefaultHandler);
PROVIDE(PORTA6 = DefaultHandler);
PROVIDE(PORTA7 = DefaultHandler);
PROVIDE(PORTA8 = DefaultHandler);
PROVIDE(PORTA9 = DefaultHandler);
PROVIDE(PORTA10 = DefaultHandler);
PROVIDE(PORTA11 = DefaultHandler);
PROVIDE(PORTA12 = DefaultHandler);
PROVIDE(PORTA13 = DefaultHandler);
PROVIDE(PORTA14 = DefaultHandler);
PROVIDE(PORTA15 = DefaultHandler);
PROVIDE(PORTB0 = DefaultHandler);
PROVIDE(PORTB1 = DefaultHandler);
PROVIDE(PORTB2 = DefaultHandler);
PROVIDE(PORTB3 = DefaultHandler);
PROVIDE(PORTB4 = DefaultHandler);
PROVIDE(PORTB5 = DefaultHandler);
PROVIDE(PORTB6 = DefaultHandler);
PROVIDE(PORTB7 = DefaultHandler);
PROVIDE(PORTB8 = DefaultHandler);
PROVIDE(PORTB9 = DefaultHandler);
PROVIDE(PORTB10 = DefaultHandler);
PROVIDE(PORTB11 = DefaultHandler);
PROVIDE(PORTB12 = DefaultHandler);
PROVIDE(PORTB13 = DefaultHandler);
PROVIDE(PORTB14 = DefaultHandler);
PROVIDE(PORTB15 = DefaultHandler);
PROVIDE(PORTC0 = DefaultHandler);
PROVIDE(PORTC1 = DefaultHandler);
PROVIDE(PORTC2 = DefaultHandler);
PROVIDE(PORTC3 = DefaultHandler);
PROVIDE(PORTC4 = DefaultHandler);
PROVIDE(PORTC5 = DefaultHandler);
PROVIDE(PORTC6 = DefaultHandler);
PROVIDE(PORTC7 = DefaultHandler);
PROVIDE(PORTC8 = DefaultHandler);
PROVIDE(PORTC9 = DefaultHandler);
PROVIDE(PORTC10 = DefaultHandler);
PROVIDE(PORTC11 = DefaultHandler);
PROVIDE(PORTC12 = DefaultHandler);
PROVIDE(PORTC13 = DefaultHandler);
PROVIDE(PORTC14 = DefaultHandler);
PROVIDE(PORTC15 = DefaultHandler);
PROVIDE(PORTD0 = DefaultHandler);
PROVIDE(PORTD1 = DefaultHandler);
PROVIDE(PORTD2 = DefaultHandler);
PROVIDE(PORTD3 = DefaultHandler);
PROVIDE(PORTD4 = DefaultHandler);
PROVIDE(PORTD5 = DefaultHandler);
PROVIDE(PORTD6 = DefaultHandler);
PROVIDE(PORTD7 = DefaultHandler);
PROVIDE(PORTD8 = DefaultHandler);
PROVIDE(PORTD9 = DefaultHandler);
PROVIDE(PORTD10 = DefaultHandler);
PROVIDE(PORTD11 = DefaultHandler);
PROVIDE(PORTD12 = DefaultHandler);
PROVIDE(PORTD13 = DefaultHandler);
PROVIDE(PORTD14 = DefaultHandler);
PROVIDE(PORTD15 = DefaultHandler);
PROVIDE(PORTE0 = DefaultHandler);
PROVIDE(PORTE1 = DefaultHandler);
PROVIDE(PORTE2 = DefaultHandler);
PROVIDE(PORTE3 = DefaultHandler);
PROVIDE(PORTE4 = DefaultHandler);
PROVIDE(PORTE5 = DefaultHandler);
PROVIDE(PORTE6 = DefaultHandler);
PROVIDE(PORTE7 = DefaultHandler);
PROVIDE(PORTE8 = DefaultHandler);
PROVIDE(PORTE9 = DefaultHandler);
PROVIDE(PORTE10 = DefaultHandler);
PROVIDE(PORTE11 = DefaultHandler);
PROVIDE(PORTE12 = DefaultHandler);
PROVIDE(PORTE13 = DefaultHandler);
PROVIDE(PORTE14 = DefaultHandler);
PROVIDE(PORTE15 = DefaultHandler);
PROVIDE(PORTF0 = DefaultHandler);
PROVIDE(PORTF1 = DefaultHandler);
PROVIDE(PORTF2 = DefaultHandler);
PROVIDE(PORTF3 = DefaultHandler);
PROVIDE(PORTF4 = DefaultHandler);
PROVIDE(PORTF5 = DefaultHandler);
PROVIDE(PORTF6 = DefaultHandler);
PROVIDE(PORTF7 = DefaultHandler);
PROVIDE(PORTF8 = DefaultHandler);
PROVIDE(PORTF9 = DefaultHandler);
PROVIDE(PORTF10 = DefaultHandler);
PROVIDE(PORTF11 = DefaultHandler);
PROVIDE(PORTF12 = DefaultHandler);
PROVIDE(PORTF13 = DefaultHandler);
PROVIDE(PORTF14 = DefaultHandler);
PROVIDE(PORTF15 = DefaultHandler);
PROVIDE(DMA_ACTIVE0 = DefaultHandler);
PROVIDE(DMA_ACTIVE1 = DefaultHandler);
PROVIDE(DMA_ACTIVE2 = DefaultHandler);
PROVIDE(DMA_ACTIVE3 = DefaultHandler);
PROVIDE(DMA_DONE0 = DefaultHandler);
PROVIDE(DMA_DONE1 = DefaultHandler);
PROVIDE(DMA_DONE2 = DefaultHandler);
PROVIDE(DMA_DONE3 = DefaultHandler);
PROVIDE(I2C0_MS_RX = DefaultHandler);
PROVIDE(I2C0_MS_TX = DefaultHandler);
PROVIDE(I2C0_SL_RX = DefaultHandler);
PROVIDE(I2C0_SL_TX = DefaultHandler);
PROVIDE(I2C1_MS_RX = DefaultHandler);
PROVIDE(I2C1_MS_TX = DefaultHandler);
PROVIDE(I2C1_SL_RX = DefaultHandler);
PROVIDE(I2C1_SL_TX = DefaultHandler);
PROVIDE(I2C2_MS_RX = DefaultHandler);
PROVIDE(I2C2_MS_TX = DefaultHandler);
PROVIDE(I2C2_SL_RX = DefaultHandler);
PROVIDE(I2C2_SL_TX = DefaultHandler);
PROVIDE(FPU = DefaultHandler);
PROVIDE(TXEV = DefaultHandler);

21
gen-helper.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Use installed tool by default
svd2rust_bin="svd2rust"
# Automates the steps specified in https://docs.rs/svd2rust/0.19.0/svd2rust/
if [ -f svd2rust ]; then
# If the local directory contains svd2rust, use that version instead
svd2rust_bin="./svd2rust"
elif [ -f ../svd2rust ]; then
# Keeps the repository clean
svd2rust_bin="../svd2rust"
fi
if [ -x "$(${svd2rust_bin} --version)" ]; then
echo "No svd2rust found locally or installed." \
"Install it with cargo install svd2rust"
exit
fi
${svd2rust_bin} -i svd/va416xx-base.svd
rm -rf src
form -i lib.rs -o src/ && rm lib.rs
cargo fmt

65
src/adc.rs Normal file
View File

@ -0,0 +1,65 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Control Register"]
pub ctrl: crate::Reg<ctrl::CTRL_SPEC>,
#[doc = "0x04 - FIFO data"]
pub fifo_data: crate::Reg<fifo_data::FIFO_DATA_SPEC>,
#[doc = "0x08 - Status"]
pub status: crate::Reg<status::STATUS_SPEC>,
#[doc = "0x0c - Interrupt Enable"]
pub irq_enb: crate::Reg<irq_enb::IRQ_ENB_SPEC>,
#[doc = "0x10 - Raw Interrupt Status"]
pub irq_raw: crate::Reg<irq_raw::IRQ_RAW_SPEC>,
#[doc = "0x14 - Enabled Interrupt Status"]
pub irq_end: crate::Reg<irq_end::IRQ_END_SPEC>,
#[doc = "0x18 - Clear Interrupt"]
pub irq_clr: crate::Reg<irq_clr::IRQ_CLR_SPEC>,
#[doc = "0x1c - Receive FIFO Interrupt Trigger Value"]
pub rxfifoirqtrg: crate::Reg<rxfifoirqtrg::RXFIFOIRQTRG_SPEC>,
#[doc = "0x20 - FIFO Clear"]
pub fifo_clr: crate::Reg<fifo_clr::FIFO_CLR_SPEC>,
_reserved9: [u8; 0x0fd8],
#[doc = "0xffc - Peripheral ID Register"]
pub perid: crate::Reg<perid::PERID_SPEC>,
}
#[doc = "CTRL register accessor: an alias for `Reg<CTRL_SPEC>`"]
pub type CTRL = crate::Reg<ctrl::CTRL_SPEC>;
#[doc = "Control Register"]
pub mod ctrl;
#[doc = "FIFO_DATA register accessor: an alias for `Reg<FIFO_DATA_SPEC>`"]
pub type FIFO_DATA = crate::Reg<fifo_data::FIFO_DATA_SPEC>;
#[doc = "FIFO data"]
pub mod fifo_data;
#[doc = "STATUS register accessor: an alias for `Reg<STATUS_SPEC>`"]
pub type STATUS = crate::Reg<status::STATUS_SPEC>;
#[doc = "Status"]
pub mod status;
#[doc = "IRQ_ENB register accessor: an alias for `Reg<IRQ_ENB_SPEC>`"]
pub type IRQ_ENB = crate::Reg<irq_enb::IRQ_ENB_SPEC>;
#[doc = "Interrupt Enable"]
pub mod irq_enb;
#[doc = "IRQ_RAW register accessor: an alias for `Reg<IRQ_RAW_SPEC>`"]
pub type IRQ_RAW = crate::Reg<irq_raw::IRQ_RAW_SPEC>;
#[doc = "Raw Interrupt Status"]
pub mod irq_raw;
#[doc = "IRQ_END register accessor: an alias for `Reg<IRQ_END_SPEC>`"]
pub type IRQ_END = crate::Reg<irq_end::IRQ_END_SPEC>;
#[doc = "Enabled Interrupt Status"]
pub mod irq_end;
#[doc = "IRQ_CLR register accessor: an alias for `Reg<IRQ_CLR_SPEC>`"]
pub type IRQ_CLR = crate::Reg<irq_clr::IRQ_CLR_SPEC>;
#[doc = "Clear Interrupt"]
pub mod irq_clr;
#[doc = "RXFIFOIRQTRG register accessor: an alias for `Reg<RXFIFOIRQTRG_SPEC>`"]
pub type RXFIFOIRQTRG = crate::Reg<rxfifoirqtrg::RXFIFOIRQTRG_SPEC>;
#[doc = "Receive FIFO Interrupt Trigger Value"]
pub mod rxfifoirqtrg;
#[doc = "FIFO_CLR register accessor: an alias for `Reg<FIFO_CLR_SPEC>`"]
pub type FIFO_CLR = crate::Reg<fifo_clr::FIFO_CLR_SPEC>;
#[doc = "FIFO Clear"]
pub mod fifo_clr;
#[doc = "PERID register accessor: an alias for `Reg<PERID_SPEC>`"]
pub type PERID = crate::Reg<perid::PERID_SPEC>;
#[doc = "Peripheral ID Register"]
pub mod perid;

328
src/adc/ctrl.rs Normal file
View File

@ -0,0 +1,328 @@
#[doc = "Register `CTRL` reader"]
pub struct R(crate::R<CTRL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTRL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTRL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTRL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTRL` writer"]
pub struct W(crate::W<CTRL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTRL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTRL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTRL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CONV_CNT` reader - Conversion count describes the number of conversions to be applied for triggers/sweeps. (N+1 conversions)"]
pub struct CONV_CNT_R(crate::FieldReader<u8, u8>);
impl CONV_CNT_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
CONV_CNT_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CONV_CNT_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CONV_CNT` writer - Conversion count describes the number of conversions to be applied for triggers/sweeps. (N+1 conversions)"]
pub struct CONV_CNT_W<'a> {
w: &'a mut W,
}
impl<'a> CONV_CNT_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20);
self.w
}
}
#[doc = "Field `MANUAL_TRIG` reader - Starts analog acquisition"]
pub struct MANUAL_TRIG_R(crate::FieldReader<bool, bool>);
impl MANUAL_TRIG_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
MANUAL_TRIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MANUAL_TRIG_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MANUAL_TRIG` writer - Starts analog acquisition"]
pub struct MANUAL_TRIG_W<'a> {
w: &'a mut W,
}
impl<'a> MANUAL_TRIG_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
self.w
}
}
#[doc = "Field `EXT_TRIG_EN` reader - Allows the external trigger to start analog acquisition"]
pub struct EXT_TRIG_EN_R(crate::FieldReader<bool, bool>);
impl EXT_TRIG_EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EXT_TRIG_EN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EXT_TRIG_EN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EXT_TRIG_EN` writer - Allows the external trigger to start analog acquisition"]
pub struct EXT_TRIG_EN_W<'a> {
w: &'a mut W,
}
impl<'a> EXT_TRIG_EN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
self.w
}
}
#[doc = "Field `SWEEP_EN` reader - ADC data acquisition for all enabled channel"]
pub struct SWEEP_EN_R(crate::FieldReader<bool, bool>);
impl SWEEP_EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
SWEEP_EN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SWEEP_EN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SWEEP_EN` writer - ADC data acquisition for all enabled channel"]
pub struct SWEEP_EN_W<'a> {
w: &'a mut W,
}
impl<'a> SWEEP_EN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
self.w
}
}
#[doc = "Field `CHAN_TAG_EN` reader - Enables the channel tag to be saved with the ADC data"]
pub struct CHAN_TAG_EN_R(crate::FieldReader<bool, bool>);
impl CHAN_TAG_EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
CHAN_TAG_EN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CHAN_TAG_EN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CHAN_TAG_EN` writer - Enables the channel tag to be saved with the ADC data"]
pub struct CHAN_TAG_EN_W<'a> {
w: &'a mut W,
}
impl<'a> CHAN_TAG_EN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
self.w
}
}
#[doc = "Field `CHAN_EN` reader - Enables the channel for data collection"]
pub struct CHAN_EN_R(crate::FieldReader<u16, u16>);
impl CHAN_EN_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
CHAN_EN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CHAN_EN_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CHAN_EN` writer - Enables the channel for data collection"]
pub struct CHAN_EN_W<'a> {
w: &'a mut W,
}
impl<'a> CHAN_EN_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff);
self.w
}
}
impl R {
#[doc = "Bits 20:23 - Conversion count describes the number of conversions to be applied for triggers/sweeps. (N+1 conversions)"]
#[inline(always)]
pub fn conv_cnt(&self) -> CONV_CNT_R {
CONV_CNT_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[doc = "Bit 19 - Starts analog acquisition"]
#[inline(always)]
pub fn manual_trig(&self) -> MANUAL_TRIG_R {
MANUAL_TRIG_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 18 - Allows the external trigger to start analog acquisition"]
#[inline(always)]
pub fn ext_trig_en(&self) -> EXT_TRIG_EN_R {
EXT_TRIG_EN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 17 - ADC data acquisition for all enabled channel"]
#[inline(always)]
pub fn sweep_en(&self) -> SWEEP_EN_R {
SWEEP_EN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 16 - Enables the channel tag to be saved with the ADC data"]
#[inline(always)]
pub fn chan_tag_en(&self) -> CHAN_TAG_EN_R {
CHAN_TAG_EN_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bits 0:15 - Enables the channel for data collection"]
#[inline(always)]
pub fn chan_en(&self) -> CHAN_EN_R {
CHAN_EN_R::new((self.bits & 0xffff) as u16)
}
}
impl W {
#[doc = "Bits 20:23 - Conversion count describes the number of conversions to be applied for triggers/sweeps. (N+1 conversions)"]
#[inline(always)]
pub fn conv_cnt(&mut self) -> CONV_CNT_W {
CONV_CNT_W { w: self }
}
#[doc = "Bit 19 - Starts analog acquisition"]
#[inline(always)]
pub fn manual_trig(&mut self) -> MANUAL_TRIG_W {
MANUAL_TRIG_W { w: self }
}
#[doc = "Bit 18 - Allows the external trigger to start analog acquisition"]
#[inline(always)]
pub fn ext_trig_en(&mut self) -> EXT_TRIG_EN_W {
EXT_TRIG_EN_W { w: self }
}
#[doc = "Bit 17 - ADC data acquisition for all enabled channel"]
#[inline(always)]
pub fn sweep_en(&mut self) -> SWEEP_EN_W {
SWEEP_EN_W { w: self }
}
#[doc = "Bit 16 - Enables the channel tag to be saved with the ADC data"]
#[inline(always)]
pub fn chan_tag_en(&mut self) -> CHAN_TAG_EN_W {
CHAN_TAG_EN_W { w: self }
}
#[doc = "Bits 0:15 - Enables the channel for data collection"]
#[inline(always)]
pub fn chan_en(&mut self) -> CHAN_EN_W {
CHAN_EN_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
pub struct CTRL_SPEC;
impl crate::RegisterSpec for CTRL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
impl crate::Readable for CTRL_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
impl crate::Writable for CTRL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTRL to value 0"]
impl crate::Resettable for CTRL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

72
src/adc/fifo_clr.rs Normal file
View File

@ -0,0 +1,72 @@
#[doc = "Register `FIFO_CLR` writer"]
pub struct W(crate::W<FIFO_CLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FIFO_CLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<FIFO_CLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FIFO_CLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FIFO_CLR` writer - Clears the ADC FIFO. Always reads 0"]
pub struct FIFO_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl W {
#[doc = "Bit 0 - Clears the ADC FIFO. Always reads 0"]
#[inline(always)]
pub fn fifo_clr(&mut self) -> FIFO_CLR_W {
FIFO_CLR_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "FIFO Clear\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fifo_clr](index.html) module"]
pub struct FIFO_CLR_SPEC;
impl crate::RegisterSpec for FIFO_CLR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [fifo_clr::W](W) writer structure"]
impl crate::Writable for FIFO_CLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FIFO_CLR to value 0"]
impl crate::Resettable for FIFO_CLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

73
src/adc/fifo_data.rs Normal file
View File

@ -0,0 +1,73 @@
#[doc = "Register `FIFO_DATA` reader"]
pub struct R(crate::R<FIFO_DATA_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FIFO_DATA_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FIFO_DATA_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FIFO_DATA_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CHAN_TAG` reader - If enabled, this will include the number of the channel corresponding to the measurement"]
pub struct CHAN_TAG_R(crate::FieldReader<u8, u8>);
impl CHAN_TAG_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
CHAN_TAG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CHAN_TAG_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ADC_DATA` reader - ADC acquisition data from the FIFO"]
pub struct ADC_DATA_R(crate::FieldReader<u16, u16>);
impl ADC_DATA_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
ADC_DATA_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_DATA_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bits 12:15 - If enabled, this will include the number of the channel corresponding to the measurement"]
#[inline(always)]
pub fn chan_tag(&self) -> CHAN_TAG_R {
CHAN_TAG_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 0:11 - ADC acquisition data from the FIFO"]
#[inline(always)]
pub fn adc_data(&self) -> ADC_DATA_R {
ADC_DATA_R::new((self.bits & 0x0fff) as u16)
}
}
#[doc = "FIFO data\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 [fifo_data](index.html) module"]
pub struct FIFO_DATA_SPEC;
impl crate::RegisterSpec for FIFO_DATA_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [fifo_data::R](R) reader structure"]
impl crate::Readable for FIFO_DATA_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets FIFO_DATA to value 0"]
impl crate::Resettable for FIFO_DATA_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

153
src/adc/irq_clr.rs Normal file
View File

@ -0,0 +1,153 @@
#[doc = "Register `IRQ_CLR` writer"]
pub struct W(crate::W<IRQ_CLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<IRQ_CLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<IRQ_CLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<IRQ_CLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TRIG_ERROR` writer - Clears the trigger error interrupt status. Always reads 0"]
pub struct TRIG_ERROR_W<'a> {
w: &'a mut W,
}
impl<'a> TRIG_ERROR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `ADC_DONE` writer - Clears the ADC done interrupt status. Always reads 0"]
pub struct ADC_DONE_W<'a> {
w: &'a mut W,
}
impl<'a> ADC_DONE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `FIFO_UFLOW` writer - Clears the FIFO underflow interrupt status. Always reads 0"]
pub struct FIFO_UFLOW_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_UFLOW_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `FIFO_OFLOW` writer - Clears the FIFO overflow interrupt status. Always reads 0"]
pub struct FIFO_OFLOW_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_OFLOW_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl W {
#[doc = "Bit 3 - Clears the trigger error interrupt status. Always reads 0"]
#[inline(always)]
pub fn trig_error(&mut self) -> TRIG_ERROR_W {
TRIG_ERROR_W { w: self }
}
#[doc = "Bit 2 - Clears the ADC done interrupt status. Always reads 0"]
#[inline(always)]
pub fn adc_done(&mut self) -> ADC_DONE_W {
ADC_DONE_W { w: self }
}
#[doc = "Bit 1 - Clears the FIFO underflow interrupt status. Always reads 0"]
#[inline(always)]
pub fn fifo_uflow(&mut self) -> FIFO_UFLOW_W {
FIFO_UFLOW_W { w: self }
}
#[doc = "Bit 0 - Clears the FIFO overflow interrupt status. Always reads 0"]
#[inline(always)]
pub fn fifo_oflow(&mut self) -> FIFO_OFLOW_W {
FIFO_OFLOW_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Clear Interrupt\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_clr](index.html) module"]
pub struct IRQ_CLR_SPEC;
impl crate::RegisterSpec for IRQ_CLR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [irq_clr::W](W) writer structure"]
impl crate::Writable for IRQ_CLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets IRQ_CLR to value 0"]
impl crate::Resettable for IRQ_CLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

395
src/adc/irq_enb.rs Normal file
View File

@ -0,0 +1,395 @@
#[doc = "Register `IRQ_ENB` reader"]
pub struct R(crate::R<IRQ_ENB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<IRQ_ENB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<IRQ_ENB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<IRQ_ENB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `IRQ_ENB` writer"]
pub struct W(crate::W<IRQ_ENB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<IRQ_ENB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<IRQ_ENB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<IRQ_ENB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Enables the interrupt for the FIFO entry count meets or exceeds the trigger level"]
pub struct FIFO_DEPTH_TRIG_R(crate::FieldReader<bool, bool>);
impl FIFO_DEPTH_TRIG_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_DEPTH_TRIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_DEPTH_TRIG_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_DEPTH_TRIG` writer - Enables the interrupt for the FIFO entry count meets or exceeds the trigger level"]
pub struct FIFO_DEPTH_TRIG_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_DEPTH_TRIG_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `TRIG_ERROR` reader - Enables the interrupt for a trigger error"]
pub struct TRIG_ERROR_R(crate::FieldReader<bool, bool>);
impl TRIG_ERROR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TRIG_ERROR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TRIG_ERROR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TRIG_ERROR` writer - Enables the interrupt for a trigger error"]
pub struct TRIG_ERROR_W<'a> {
w: &'a mut W,
}
impl<'a> TRIG_ERROR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `ADC_DONE` reader - Enables the interrupt for an ADC data acquisition completion"]
pub struct ADC_DONE_R(crate::FieldReader<bool, bool>);
impl ADC_DONE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ADC_DONE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_DONE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ADC_DONE` writer - Enables the interrupt for an ADC data acquisition completion"]
pub struct ADC_DONE_W<'a> {
w: &'a mut W,
}
impl<'a> ADC_DONE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `FIFO_UFLOW` reader - Enables the interrupt for a FIFO underflow"]
pub struct FIFO_UFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_UFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_UFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_UFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_UFLOW` writer - Enables the interrupt for a FIFO underflow"]
pub struct FIFO_UFLOW_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_UFLOW_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `FIFO_OFLOW` reader - Enables the interrupt for a FIFO overflow"]
pub struct FIFO_OFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_OFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_OFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_OFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_OFLOW` writer - Enables the interrupt for a FIFO overflow"]
pub struct FIFO_OFLOW_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_OFLOW_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `FIFO_FULL` reader - Enables the interrupt for FIFO full"]
pub struct FIFO_FULL_R(crate::FieldReader<bool, bool>);
impl FIFO_FULL_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_FULL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_FULL_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_FULL` writer - Enables the interrupt for FIFO full"]
pub struct FIFO_FULL_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_FULL_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `FIFO_EMPTY` reader - Enables the interrupt for FIFO empty"]
pub struct FIFO_EMPTY_R(crate::FieldReader<bool, bool>);
impl FIFO_EMPTY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_EMPTY_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_EMPTY_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_EMPTY` writer - Enables the interrupt for FIFO empty"]
pub struct FIFO_EMPTY_W<'a> {
w: &'a mut W,
}
impl<'a> FIFO_EMPTY_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl R {
#[doc = "Bit 6 - Enables the interrupt for the FIFO entry count meets or exceeds the trigger level"]
#[inline(always)]
pub fn fifo_depth_trig(&self) -> FIFO_DEPTH_TRIG_R {
FIFO_DEPTH_TRIG_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Enables the interrupt for a trigger error"]
#[inline(always)]
pub fn trig_error(&self) -> TRIG_ERROR_R {
TRIG_ERROR_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Enables the interrupt for an ADC data acquisition completion"]
#[inline(always)]
pub fn adc_done(&self) -> ADC_DONE_R {
ADC_DONE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Enables the interrupt for a FIFO underflow"]
#[inline(always)]
pub fn fifo_uflow(&self) -> FIFO_UFLOW_R {
FIFO_UFLOW_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Enables the interrupt for a FIFO overflow"]
#[inline(always)]
pub fn fifo_oflow(&self) -> FIFO_OFLOW_R {
FIFO_OFLOW_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Enables the interrupt for FIFO full"]
#[inline(always)]
pub fn fifo_full(&self) -> FIFO_FULL_R {
FIFO_FULL_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Enables the interrupt for FIFO empty"]
#[inline(always)]
pub fn fifo_empty(&self) -> FIFO_EMPTY_R {
FIFO_EMPTY_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 6 - Enables the interrupt for the FIFO entry count meets or exceeds the trigger level"]
#[inline(always)]
pub fn fifo_depth_trig(&mut self) -> FIFO_DEPTH_TRIG_W {
FIFO_DEPTH_TRIG_W { w: self }
}
#[doc = "Bit 5 - Enables the interrupt for a trigger error"]
#[inline(always)]
pub fn trig_error(&mut self) -> TRIG_ERROR_W {
TRIG_ERROR_W { w: self }
}
#[doc = "Bit 4 - Enables the interrupt for an ADC data acquisition completion"]
#[inline(always)]
pub fn adc_done(&mut self) -> ADC_DONE_W {
ADC_DONE_W { w: self }
}
#[doc = "Bit 3 - Enables the interrupt for a FIFO underflow"]
#[inline(always)]
pub fn fifo_uflow(&mut self) -> FIFO_UFLOW_W {
FIFO_UFLOW_W { w: self }
}
#[doc = "Bit 2 - Enables the interrupt for a FIFO overflow"]
#[inline(always)]
pub fn fifo_oflow(&mut self) -> FIFO_OFLOW_W {
FIFO_OFLOW_W { w: self }
}
#[doc = "Bit 1 - Enables the interrupt for FIFO full"]
#[inline(always)]
pub fn fifo_full(&mut self) -> FIFO_FULL_W {
FIFO_FULL_W { w: self }
}
#[doc = "Bit 0 - Enables the interrupt for FIFO empty"]
#[inline(always)]
pub fn fifo_empty(&mut self) -> FIFO_EMPTY_W {
FIFO_EMPTY_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Interrupt Enable\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_enb](index.html) module"]
pub struct IRQ_ENB_SPEC;
impl crate::RegisterSpec for IRQ_ENB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [irq_enb::R](R) reader structure"]
impl crate::Readable for IRQ_ENB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [irq_enb::W](W) writer structure"]
impl crate::Writable for IRQ_ENB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets IRQ_ENB to value 0"]
impl crate::Resettable for IRQ_ENB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

173
src/adc/irq_end.rs Normal file
View File

@ -0,0 +1,173 @@
#[doc = "Register `IRQ_END` reader"]
pub struct R(crate::R<IRQ_END_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<IRQ_END_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<IRQ_END_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<IRQ_END_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Indicates the interrupt for the FIFO entry count meets or exceeds the trigger level"]
pub struct FIFO_DEPTH_TRIG_R(crate::FieldReader<bool, bool>);
impl FIFO_DEPTH_TRIG_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_DEPTH_TRIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_DEPTH_TRIG_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TRIG_ERROR` reader - Indicates a manual or external trigger occurred when the ADC was BUSY doing a conversion and the interrupt is enabled"]
pub struct TRIG_ERROR_R(crate::FieldReader<bool, bool>);
impl TRIG_ERROR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TRIG_ERROR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TRIG_ERROR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ADC_DONE` reader - Indicates that a ADC conversion is done and the interrupt is enabled"]
pub struct ADC_DONE_R(crate::FieldReader<bool, bool>);
impl ADC_DONE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ADC_DONE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_DONE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_UFLOW` reader - Indicates a FIFO underflow occurred and the interrupt is enabled"]
pub struct FIFO_UFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_UFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_UFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_UFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_OFLOW` reader - Indicates a FIFO overflow occurred and the interrupt is enabled"]
pub struct FIFO_OFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_OFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_OFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_OFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_FULL` reader - Indicates the FIFO is full and the interrupt is enabled"]
pub struct FIFO_FULL_R(crate::FieldReader<bool, bool>);
impl FIFO_FULL_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_FULL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_FULL_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_EMPTY` reader - Indicates the FIFO is empty and the interrupt is enabled"]
pub struct FIFO_EMPTY_R(crate::FieldReader<bool, bool>);
impl FIFO_EMPTY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_EMPTY_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_EMPTY_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 6 - Indicates the interrupt for the FIFO entry count meets or exceeds the trigger level"]
#[inline(always)]
pub fn fifo_depth_trig(&self) -> FIFO_DEPTH_TRIG_R {
FIFO_DEPTH_TRIG_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Indicates a manual or external trigger occurred when the ADC was BUSY doing a conversion and the interrupt is enabled"]
#[inline(always)]
pub fn trig_error(&self) -> TRIG_ERROR_R {
TRIG_ERROR_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Indicates that a ADC conversion is done and the interrupt is enabled"]
#[inline(always)]
pub fn adc_done(&self) -> ADC_DONE_R {
ADC_DONE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Indicates a FIFO underflow occurred and the interrupt is enabled"]
#[inline(always)]
pub fn fifo_uflow(&self) -> FIFO_UFLOW_R {
FIFO_UFLOW_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Indicates a FIFO overflow occurred and the interrupt is enabled"]
#[inline(always)]
pub fn fifo_oflow(&self) -> FIFO_OFLOW_R {
FIFO_OFLOW_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Indicates the FIFO is full and the interrupt is enabled"]
#[inline(always)]
pub fn fifo_full(&self) -> FIFO_FULL_R {
FIFO_FULL_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Indicates the FIFO is empty and the interrupt is enabled"]
#[inline(always)]
pub fn fifo_empty(&self) -> FIFO_EMPTY_R {
FIFO_EMPTY_R::new((self.bits & 0x01) != 0)
}
}
#[doc = "Enabled Interrupt Status\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 [irq_end](index.html) module"]
pub struct IRQ_END_SPEC;
impl crate::RegisterSpec for IRQ_END_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [irq_end::R](R) reader structure"]
impl crate::Readable for IRQ_END_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets IRQ_END to value 0"]
impl crate::Resettable for IRQ_END_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

173
src/adc/irq_raw.rs Normal file
View File

@ -0,0 +1,173 @@
#[doc = "Register `IRQ_RAW` reader"]
pub struct R(crate::R<IRQ_RAW_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<IRQ_RAW_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<IRQ_RAW_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<IRQ_RAW_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Indicates the interrupt for the FIFO entry count meets or exceeds the trigger level"]
pub struct FIFO_DEPTH_TRIG_R(crate::FieldReader<bool, bool>);
impl FIFO_DEPTH_TRIG_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_DEPTH_TRIG_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_DEPTH_TRIG_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TRIG_ERROR` reader - Indicates a manual or external trigger occurred when the ADC was BUSY doing a conversion"]
pub struct TRIG_ERROR_R(crate::FieldReader<bool, bool>);
impl TRIG_ERROR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TRIG_ERROR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TRIG_ERROR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ADC_DONE` reader - Indicates that a ADC conversion is done"]
pub struct ADC_DONE_R(crate::FieldReader<bool, bool>);
impl ADC_DONE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ADC_DONE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_DONE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_UFLOW` reader - Indicates data was unavailable when a new trigger for ADC update is received"]
pub struct FIFO_UFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_UFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_UFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_UFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_OFLOW` reader - Indicates a FIFO overflow occurred (FIFO was full when new data was written)"]
pub struct FIFO_OFLOW_R(crate::FieldReader<bool, bool>);
impl FIFO_OFLOW_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_OFLOW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_OFLOW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_FULL` reader - Indicates the FIFO is full"]
pub struct FIFO_FULL_R(crate::FieldReader<bool, bool>);
impl FIFO_FULL_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_FULL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_FULL_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_EMPTY` reader - Indicates the FIFO is empty"]
pub struct FIFO_EMPTY_R(crate::FieldReader<bool, bool>);
impl FIFO_EMPTY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_EMPTY_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_EMPTY_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 6 - Indicates the interrupt for the FIFO entry count meets or exceeds the trigger level"]
#[inline(always)]
pub fn fifo_depth_trig(&self) -> FIFO_DEPTH_TRIG_R {
FIFO_DEPTH_TRIG_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Indicates a manual or external trigger occurred when the ADC was BUSY doing a conversion"]
#[inline(always)]
pub fn trig_error(&self) -> TRIG_ERROR_R {
TRIG_ERROR_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Indicates that a ADC conversion is done"]
#[inline(always)]
pub fn adc_done(&self) -> ADC_DONE_R {
ADC_DONE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Indicates data was unavailable when a new trigger for ADC update is received"]
#[inline(always)]
pub fn fifo_uflow(&self) -> FIFO_UFLOW_R {
FIFO_UFLOW_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Indicates a FIFO overflow occurred (FIFO was full when new data was written)"]
#[inline(always)]
pub fn fifo_oflow(&self) -> FIFO_OFLOW_R {
FIFO_OFLOW_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Indicates the FIFO is full"]
#[inline(always)]
pub fn fifo_full(&self) -> FIFO_FULL_R {
FIFO_FULL_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Indicates the FIFO is empty"]
#[inline(always)]
pub fn fifo_empty(&self) -> FIFO_EMPTY_R {
FIFO_EMPTY_R::new((self.bits & 0x01) != 0)
}
}
#[doc = "Raw Interrupt Status\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 [irq_raw](index.html) module"]
pub struct IRQ_RAW_SPEC;
impl crate::RegisterSpec for IRQ_RAW_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [irq_raw::R](R) reader structure"]
impl crate::Readable for IRQ_RAW_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets IRQ_RAW to value 0x01"]
impl crate::Resettable for IRQ_RAW_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}

31
src/adc/perid.rs Normal file
View File

@ -0,0 +1,31 @@
#[doc = "Register `PERID` reader"]
pub struct R(crate::R<PERID_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PERID_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PERID_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PERID_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Peripheral ID Register\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 [perid](index.html) module"]
pub struct PERID_SPEC;
impl crate::RegisterSpec for PERID_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [perid::R](R) reader structure"]
impl crate::Readable for PERID_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PERID to value 0x0019_07e9"]
impl crate::Resettable for PERID_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0019_07e9
}
}

103
src/adc/rxfifoirqtrg.rs Normal file
View File

@ -0,0 +1,103 @@
#[doc = "Register `RXFIFOIRQTRG` reader"]
pub struct R(crate::R<RXFIFOIRQTRG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXFIFOIRQTRG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXFIFOIRQTRG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXFIFOIRQTRG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RXFIFOIRQTRG` writer"]
pub struct W(crate::W<RXFIFOIRQTRG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RXFIFOIRQTRG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<RXFIFOIRQTRG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RXFIFOIRQTRG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LEVEL` reader - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
pub struct LEVEL_R(crate::FieldReader<u8, u8>);
impl LEVEL_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
LEVEL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LEVEL_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LEVEL` writer - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
pub struct LEVEL_W<'a> {
w: &'a mut W,
}
impl<'a> LEVEL_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f);
self.w
}
}
impl R {
#[doc = "Bits 0:4 - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
#[inline(always)]
pub fn level(&self) -> LEVEL_R {
LEVEL_R::new((self.bits & 0x1f) as u8)
}
}
impl W {
#[doc = "Bits 0:4 - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
#[inline(always)]
pub fn level(&mut self) -> LEVEL_W {
LEVEL_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Receive FIFO Interrupt Trigger Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxfifoirqtrg](index.html) module"]
pub struct RXFIFOIRQTRG_SPEC;
impl crate::RegisterSpec for RXFIFOIRQTRG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxfifoirqtrg::R](R) reader structure"]
impl crate::Readable for RXFIFOIRQTRG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rxfifoirqtrg::W](W) writer structure"]
impl crate::Writable for RXFIFOIRQTRG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RXFIFOIRQTRG to value 0x10"]
impl crate::Resettable for RXFIFOIRQTRG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x10
}
}

73
src/adc/status.rs Normal file
View File

@ -0,0 +1,73 @@
#[doc = "Register `STATUS` reader"]
pub struct R(crate::R<STATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<STATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<STATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<STATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ADC_BUSY` reader - Indicates an ADC data acquisition is in process"]
pub struct ADC_BUSY_R(crate::FieldReader<bool, bool>);
impl ADC_BUSY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ADC_BUSY_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_BUSY_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFO_ENTRY_CNT` reader - Indicates the number of entries in the FIFO"]
pub struct FIFO_ENTRY_CNT_R(crate::FieldReader<u8, u8>);
impl FIFO_ENTRY_CNT_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
FIFO_ENTRY_CNT_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFO_ENTRY_CNT_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 7 - Indicates an ADC data acquisition is in process"]
#[inline(always)]
pub fn adc_busy(&self) -> ADC_BUSY_R {
ADC_BUSY_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bits 0:5 - Indicates the number of entries in the FIFO"]
#[inline(always)]
pub fn fifo_entry_cnt(&self) -> FIFO_ENTRY_CNT_R {
FIFO_ENTRY_CNT_R::new((self.bits & 0x3f) as u8)
}
}
#[doc = "Status\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 [status](index.html) module"]
pub struct STATUS_SPEC;
impl crate::RegisterSpec for STATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [status::R](R) reader structure"]
impl crate::Readable for STATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets STATUS to value 0"]
impl crate::Resettable for STATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

856
src/can0.rs Normal file
View File

@ -0,0 +1,856 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Buffer Status / Control Register"]
pub cnstat_cmb0: crate::Reg<cnstat_cmb0::CNSTAT_CMB0_SPEC>,
#[doc = "0x04 - CAN Frame Timestamp"]
pub tstp_cmb0: crate::Reg<tstp_cmb0::TSTP_CMB0_SPEC>,
#[doc = "0x08 - CAN Frame Data Word 3"]
pub data3_cmb0: crate::Reg<data3_cmb0::DATA3_CMB0_SPEC>,
#[doc = "0x0c - CAN Frame Data Word 2"]
pub data2_cmb0: crate::Reg<data2_cmb0::DATA2_CMB0_SPEC>,
#[doc = "0x10 - CAN Frame Data Word 1"]
pub data1_cmb0: crate::Reg<data1_cmb0::DATA1_CMB0_SPEC>,
#[doc = "0x14 - CAN Frame Data Word 0"]
pub data0_cmb0: crate::Reg<data0_cmb0::DATA0_CMB0_SPEC>,
#[doc = "0x18 - CAN Frame Identifier Word 0"]
pub id0_cmb0: crate::Reg<id0_cmb0::ID0_CMB0_SPEC>,
#[doc = "0x1c - CAN Frame Identifier Word 1"]
pub id1_cmb0: crate::Reg<id1_cmb0::ID1_CMB0_SPEC>,
#[doc = "0x20 - Buffer Status / Control Register"]
pub cnstat_cmb1: crate::Reg<cnstat_cmb1::CNSTAT_CMB1_SPEC>,
#[doc = "0x24 - CAN Frame Timestamp"]
pub tstp_cmb1: crate::Reg<tstp_cmb1::TSTP_CMB1_SPEC>,
#[doc = "0x28 - CAN Frame Data Word 3"]
pub data3_cmb1: crate::Reg<data3_cmb1::DATA3_CMB1_SPEC>,
#[doc = "0x2c - CAN Frame Data Word 2"]
pub data2_cmb1: crate::Reg<data2_cmb1::DATA2_CMB1_SPEC>,
#[doc = "0x30 - CAN Frame Data Word 2"]
pub data1_cmb1: crate::Reg<data1_cmb1::DATA1_CMB1_SPEC>,
#[doc = "0x34 - CAN Frame Data Word 0"]
pub data0_cmb1: crate::Reg<data0_cmb1::DATA0_CMB1_SPEC>,
#[doc = "0x38 - CAN Frame Identifier Word 0"]
pub id0_cmb1: crate::Reg<id0_cmb1::ID0_CMB1_SPEC>,
#[doc = "0x3c - CAN Frame Identifier Word 1"]
pub id1_cmb1: crate::Reg<id1_cmb1::ID1_CMB1_SPEC>,
#[doc = "0x40 - Buffer Status / Control Register"]
pub cnstat_cmb2: crate::Reg<cnstat_cmb2::CNSTAT_CMB2_SPEC>,
#[doc = "0x44 - CAN Frame Timestamp"]
pub tstp_cmb2: crate::Reg<tstp_cmb2::TSTP_CMB2_SPEC>,
#[doc = "0x48 - CAN Frame Data Word 3"]
pub data3_cmb2: crate::Reg<data3_cmb2::DATA3_CMB2_SPEC>,
#[doc = "0x4c - CAN Frame Data Word 2"]
pub data2_cmb2: crate::Reg<data2_cmb2::DATA2_CMB2_SPEC>,
#[doc = "0x50 - CAN Frame Data Word 2"]
pub data1_cmb2: crate::Reg<data1_cmb2::DATA1_CMB2_SPEC>,
#[doc = "0x54 - CAN Frame Data Word 0"]
pub data0_cmb2: crate::Reg<data0_cmb2::DATA0_CMB2_SPEC>,
#[doc = "0x58 - CAN Frame Identifier Word 0"]
pub id0_cmb2: crate::Reg<id0_cmb2::ID0_CMB2_SPEC>,
#[doc = "0x5c - CAN Frame Identifier Word 1"]
pub id1_cmb2: crate::Reg<id1_cmb2::ID1_CMB2_SPEC>,
#[doc = "0x60 - Buffer Status / Control Register"]
pub cnstat_cmb3: crate::Reg<cnstat_cmb3::CNSTAT_CMB3_SPEC>,
#[doc = "0x64 - CAN Frame Timestamp"]
pub tstp_cmb3: crate::Reg<tstp_cmb3::TSTP_CMB3_SPEC>,
#[doc = "0x68 - CAN Frame Data Word 3"]
pub data3_cmb3: crate::Reg<data3_cmb3::DATA3_CMB3_SPEC>,
#[doc = "0x6c - CAN Frame Data Word 2"]
pub data2_cmb3: crate::Reg<data2_cmb3::DATA2_CMB3_SPEC>,
#[doc = "0x70 - CAN Frame Data Word 2"]
pub data1_cmb3: crate::Reg<data1_cmb3::DATA1_CMB3_SPEC>,
#[doc = "0x74 - CAN Frame Data Word 0"]
pub data0_cmb3: crate::Reg<data0_cmb3::DATA0_CMB3_SPEC>,
#[doc = "0x78 - CAN Frame Identifier Word 0"]
pub id0_cmb3: crate::Reg<id0_cmb3::ID0_CMB3_SPEC>,
#[doc = "0x7c - CAN Frame Identifier Word 1"]
pub id1_cmb3: crate::Reg<id1_cmb3::ID1_CMB3_SPEC>,
#[doc = "0x80 - Buffer Status / Control Register"]
pub cnstat_cmb4: crate::Reg<cnstat_cmb4::CNSTAT_CMB4_SPEC>,
#[doc = "0x84 - CAN Frame Timestamp"]
pub tstp_cmb4: crate::Reg<tstp_cmb4::TSTP_CMB4_SPEC>,
#[doc = "0x88 - CAN Frame Data Word 3"]
pub data3_cmb4: crate::Reg<data3_cmb4::DATA3_CMB4_SPEC>,
#[doc = "0x8c - CAN Frame Data Word 2"]
pub data2_cmb4: crate::Reg<data2_cmb4::DATA2_CMB4_SPEC>,
#[doc = "0x90 - CAN Frame Data Word 2"]
pub data1_cmb4: crate::Reg<data1_cmb4::DATA1_CMB4_SPEC>,
#[doc = "0x94 - CAN Frame Data Word 0"]
pub data0_cmb4: crate::Reg<data0_cmb4::DATA0_CMB4_SPEC>,
#[doc = "0x98 - CAN Frame Identifier Word 0"]
pub id0_cmb4: crate::Reg<id0_cmb4::ID0_CMB4_SPEC>,
#[doc = "0x9c - CAN Frame Identifier Word 1"]
pub id1_cmb4: crate::Reg<id1_cmb4::ID1_CMB4_SPEC>,
#[doc = "0xa0 - Buffer Status / Control Register"]
pub cnstat_cmb5: crate::Reg<cnstat_cmb5::CNSTAT_CMB5_SPEC>,
#[doc = "0xa4 - CAN Frame Timestamp"]
pub tstp_cmb5: crate::Reg<tstp_cmb5::TSTP_CMB5_SPEC>,
#[doc = "0xa8 - CAN Frame Data Word 3"]
pub data3_cmb5: crate::Reg<data3_cmb5::DATA3_CMB5_SPEC>,
#[doc = "0xac - CAN Frame Data Word 2"]
pub data2_cmb5: crate::Reg<data2_cmb5::DATA2_CMB5_SPEC>,
#[doc = "0xb0 - CAN Frame Data Word 2"]
pub data1_cmb5: crate::Reg<data1_cmb5::DATA1_CMB5_SPEC>,
#[doc = "0xb4 - CAN Frame Data Word 0"]
pub data0_cmb5: crate::Reg<data0_cmb5::DATA0_CMB5_SPEC>,
#[doc = "0xb8 - CAN Frame Identifier Word 0"]
pub id0_cmb5: crate::Reg<id0_cmb5::ID0_CMB5_SPEC>,
#[doc = "0xbc - CAN Frame Identifier Word 1"]
pub id1_cmb5: crate::Reg<id1_cmb5::ID1_CMB5_SPEC>,
#[doc = "0xc0 - Buffer Status / Control Register"]
pub cnstat_cmb6: crate::Reg<cnstat_cmb6::CNSTAT_CMB6_SPEC>,
#[doc = "0xc4 - CAN Frame Timestamp"]
pub tstp_cmb6: crate::Reg<tstp_cmb6::TSTP_CMB6_SPEC>,
#[doc = "0xc8 - CAN Frame Data Word 3"]
pub data3_cmb6: crate::Reg<data3_cmb6::DATA3_CMB6_SPEC>,
#[doc = "0xcc - CAN Frame Data Word 2"]
pub data2_cmb6: crate::Reg<data2_cmb6::DATA2_CMB6_SPEC>,
#[doc = "0xd0 - CAN Frame Data Word 2"]
pub data1_cmb6: crate::Reg<data1_cmb6::DATA1_CMB6_SPEC>,
#[doc = "0xd4 - CAN Frame Data Word 0"]
pub data0_cmb6: crate::Reg<data0_cmb6::DATA0_CMB6_SPEC>,
#[doc = "0xd8 - CAN Frame Identifier Word 0"]
pub id0_cmb6: crate::Reg<id0_cmb6::ID0_CMB6_SPEC>,
#[doc = "0xdc - CAN Frame Identifier Word 1"]
pub id1_cmb6: crate::Reg<id1_cmb6::ID1_CMB6_SPEC>,
#[doc = "0xe0 - Buffer Status / Control Register"]
pub cnstat_cmb7: crate::Reg<cnstat_cmb7::CNSTAT_CMB7_SPEC>,
#[doc = "0xe4 - CAN Frame Timestamp"]
pub tstp_cmb7: crate::Reg<tstp_cmb7::TSTP_CMB7_SPEC>,
#[doc = "0xe8 - CAN Frame Data Word 3"]
pub data3_cmb7: crate::Reg<data3_cmb7::DATA3_CMB7_SPEC>,
#[doc = "0xec - CAN Frame Data Word 2"]
pub data2_cmb7: crate::Reg<data2_cmb7::DATA2_CMB7_SPEC>,
#[doc = "0xf0 - CAN Frame Data Word 2"]
pub data1_cmb7: crate::Reg<data1_cmb7::DATA1_CMB7_SPEC>,
#[doc = "0xf4 - CAN Frame Data Word 0"]
pub data0_cmb7: crate::Reg<data0_cmb7::DATA0_CMB7_SPEC>,
#[doc = "0xf8 - CAN Frame Identifier Word 0"]
pub id0_cmb7: crate::Reg<id0_cmb7::ID0_CMB7_SPEC>,
#[doc = "0xfc - CAN Frame Identifier Word 1"]
pub id1_cmb7: crate::Reg<id1_cmb7::ID1_CMB7_SPEC>,
#[doc = "0x100 - Buffer Status / Control Register"]
pub cnstat_cmb8: crate::Reg<cnstat_cmb8::CNSTAT_CMB8_SPEC>,
#[doc = "0x104 - CAN Frame Timestamp"]
pub tstp_cmb8: crate::Reg<tstp_cmb8::TSTP_CMB8_SPEC>,
#[doc = "0x108 - CAN Frame Data Word 3"]
pub data3_cmb8: crate::Reg<data3_cmb8::DATA3_CMB8_SPEC>,
#[doc = "0x10c - CAN Frame Data Word 2"]
pub data2_cmb8: crate::Reg<data2_cmb8::DATA2_CMB8_SPEC>,
#[doc = "0x110 - CAN Frame Data Word 2"]
pub data1_cmb8: crate::Reg<data1_cmb8::DATA1_CMB8_SPEC>,
#[doc = "0x114 - CAN Frame Data Word 0"]
pub data0_cmb8: crate::Reg<data0_cmb8::DATA0_CMB8_SPEC>,
#[doc = "0x118 - CAN Frame Identifier Word 0"]
pub id0_cmb8: crate::Reg<id0_cmb8::ID0_CMB8_SPEC>,
#[doc = "0x11c - CAN Frame Identifier Word 1"]
pub id1_cmb8: crate::Reg<id1_cmb8::ID1_CMB8_SPEC>,
#[doc = "0x120 - Buffer Status / Control Register"]
pub cnstat_cmb9: crate::Reg<cnstat_cmb9::CNSTAT_CMB9_SPEC>,
#[doc = "0x124 - CAN Frame Timestamp"]
pub tstp_cmb9: crate::Reg<tstp_cmb9::TSTP_CMB9_SPEC>,
#[doc = "0x128 - CAN Frame Data Word 3"]
pub data3_cmb9: crate::Reg<data3_cmb9::DATA3_CMB9_SPEC>,
#[doc = "0x12c - CAN Frame Data Word 2"]
pub data2_cmb9: crate::Reg<data2_cmb9::DATA2_CMB9_SPEC>,
#[doc = "0x130 - CAN Frame Data Word 2"]
pub data1_cmb9: crate::Reg<data1_cmb9::DATA1_CMB9_SPEC>,
#[doc = "0x134 - CAN Frame Data Word 0"]
pub data0_cmb9: crate::Reg<data0_cmb9::DATA0_CMB9_SPEC>,
#[doc = "0x138 - CAN Frame Identifier Word 0"]
pub id0_cmb9: crate::Reg<id0_cmb9::ID0_CMB9_SPEC>,
#[doc = "0x13c - CAN Frame Identifier Word 1"]
pub id1_cmb9: crate::Reg<id1_cmb9::ID1_CMB9_SPEC>,
#[doc = "0x140 - Buffer Status / Control Register"]
pub cnstat_cmb10: crate::Reg<cnstat_cmb10::CNSTAT_CMB10_SPEC>,
#[doc = "0x144 - CAN Frame Timestamp"]
pub tstp_cmb10: crate::Reg<tstp_cmb10::TSTP_CMB10_SPEC>,
#[doc = "0x148 - CAN Frame Data Word 3"]
pub data3_cmb10: crate::Reg<data3_cmb10::DATA3_CMB10_SPEC>,
#[doc = "0x14c - CAN Frame Data Word 2"]
pub data2_cmb10: crate::Reg<data2_cmb10::DATA2_CMB10_SPEC>,
#[doc = "0x150 - CAN Frame Data Word 2"]
pub data1_cmb10: crate::Reg<data1_cmb10::DATA1_CMB10_SPEC>,
#[doc = "0x154 - CAN Frame Data Word 0"]
pub data0_cmb10: crate::Reg<data0_cmb10::DATA0_CMB10_SPEC>,
#[doc = "0x158 - CAN Frame Identifier Word 0"]
pub id0_cmb10: crate::Reg<id0_cmb10::ID0_CMB10_SPEC>,
#[doc = "0x15c - CAN Frame Identifier Word 1"]
pub id1_cmb10: crate::Reg<id1_cmb10::ID1_CMB10_SPEC>,
#[doc = "0x160 - Buffer Status / Control Register"]
pub cnstat_cmb11: crate::Reg<cnstat_cmb11::CNSTAT_CMB11_SPEC>,
#[doc = "0x164 - CAN Frame Timestamp"]
pub tstp_cmb11: crate::Reg<tstp_cmb11::TSTP_CMB11_SPEC>,
#[doc = "0x168 - CAN Frame Data Word 3"]
pub data3_cmb11: crate::Reg<data3_cmb11::DATA3_CMB11_SPEC>,
#[doc = "0x16c - CAN Frame Data Word 2"]
pub data2_cmb11: crate::Reg<data2_cmb11::DATA2_CMB11_SPEC>,
#[doc = "0x170 - CAN Frame Data Word 2"]
pub data1_cmb11: crate::Reg<data1_cmb11::DATA1_CMB11_SPEC>,
#[doc = "0x174 - CAN Frame Data Word 0"]
pub data0_cmb11: crate::Reg<data0_cmb11::DATA0_CMB11_SPEC>,
#[doc = "0x178 - CAN Frame Identifier Word 0"]
pub id0_cmb11: crate::Reg<id0_cmb11::ID0_CMB11_SPEC>,
#[doc = "0x17c - CAN Frame Identifier Word 1"]
pub id1_cmb11: crate::Reg<id1_cmb11::ID1_CMB11_SPEC>,
#[doc = "0x180 - Buffer Status / Control Register"]
pub cnstat_cmb12: crate::Reg<cnstat_cmb12::CNSTAT_CMB12_SPEC>,
#[doc = "0x184 - CAN Frame Timestamp"]
pub tstp_cmb12: crate::Reg<tstp_cmb12::TSTP_CMB12_SPEC>,
#[doc = "0x188 - CAN Frame Data Word 3"]
pub data3_cmb12: crate::Reg<data3_cmb12::DATA3_CMB12_SPEC>,
#[doc = "0x18c - CAN Frame Data Word 2"]
pub data2_cmb12: crate::Reg<data2_cmb12::DATA2_CMB12_SPEC>,
#[doc = "0x190 - CAN Frame Data Word 2"]
pub data1_cmb12: crate::Reg<data1_cmb12::DATA1_CMB12_SPEC>,
#[doc = "0x194 - CAN Frame Data Word 0"]
pub data0_cmb12: crate::Reg<data0_cmb12::DATA0_CMB12_SPEC>,
#[doc = "0x198 - CAN Frame Identifier Word 0"]
pub id0_cmb12: crate::Reg<id0_cmb12::ID0_CMB12_SPEC>,
#[doc = "0x19c - CAN Frame Identifier Word 1"]
pub id1_cmb12: crate::Reg<id1_cmb12::ID1_CMB12_SPEC>,
#[doc = "0x1a0 - Buffer Status / Control Register"]
pub cnstat_cmb13: crate::Reg<cnstat_cmb13::CNSTAT_CMB13_SPEC>,
#[doc = "0x1a4 - CAN Frame Timestamp"]
pub tstp_cmb13: crate::Reg<tstp_cmb13::TSTP_CMB13_SPEC>,
#[doc = "0x1a8 - CAN Frame Data Word 3"]
pub data3_cmb13: crate::Reg<data3_cmb13::DATA3_CMB13_SPEC>,
#[doc = "0x1ac - CAN Frame Data Word 2"]
pub data2_cmb13: crate::Reg<data2_cmb13::DATA2_CMB13_SPEC>,
#[doc = "0x1b0 - CAN Frame Data Word 2"]
pub data1_cmb13: crate::Reg<data1_cmb13::DATA1_CMB13_SPEC>,
#[doc = "0x1b4 - CAN Frame Data Word 0"]
pub data0_cmb13: crate::Reg<data0_cmb13::DATA0_CMB13_SPEC>,
#[doc = "0x1b8 - CAN Frame Identifier Word 0"]
pub id0_cmb13: crate::Reg<id0_cmb13::ID0_CMB13_SPEC>,
#[doc = "0x1bc - CAN Frame Identifier Word 1"]
pub id1_cmb13: crate::Reg<id1_cmb13::ID1_CMB13_SPEC>,
#[doc = "0x1c0 - Buffer Status / Control Register"]
pub cnstat_cmb14: crate::Reg<cnstat_cmb14::CNSTAT_CMB14_SPEC>,
#[doc = "0x1c4 - CAN Frame Timestamp"]
pub tstp_cmb14: crate::Reg<tstp_cmb14::TSTP_CMB14_SPEC>,
#[doc = "0x1c8 - CAN Frame Data Word 3"]
pub data3_cmb14: crate::Reg<data3_cmb14::DATA3_CMB14_SPEC>,
#[doc = "0x1cc - CAN Frame Data Word 2"]
pub data2_cmb14: crate::Reg<data2_cmb14::DATA2_CMB14_SPEC>,
#[doc = "0x1d0 - CAN Frame Data Word 2"]
pub data1_cmb14: crate::Reg<data1_cmb14::DATA1_CMB14_SPEC>,
#[doc = "0x1d4 - CAN Frame Data Word 0"]
pub data0_cmb14: crate::Reg<data0_cmb14::DATA0_CMB14_SPEC>,
#[doc = "0x1d8 - CAN Frame Identifier Word 0"]
pub id0_cmb14: crate::Reg<id0_cmb14::ID0_CMB14_SPEC>,
#[doc = "0x1dc - CAN Frame Identifier Word 1"]
pub id1_cmb14: crate::Reg<id1_cmb14::ID1_CMB14_SPEC>,
#[doc = "0x1e0 - Buffer Status / Control Register"]
pub cnstat_hcmb: crate::Reg<cnstat_hcmb::CNSTAT_HCMB_SPEC>,
#[doc = "0x1e4 - CAN Frame Timestamp"]
pub tstp_hcmb: crate::Reg<tstp_hcmb::TSTP_HCMB_SPEC>,
#[doc = "0x1e8 - CAN Frame Data Word 3"]
pub data3_hcmb: crate::Reg<data3_hcmb::DATA3_HCMB_SPEC>,
#[doc = "0x1ec - CAN Frame Data Word 2"]
pub data2_hcmb: crate::Reg<data2_hcmb::DATA2_HCMB_SPEC>,
#[doc = "0x1f0 - CAN Frame Data Word 2"]
pub data1_hcmb: crate::Reg<data1_hcmb::DATA1_HCMB_SPEC>,
#[doc = "0x1f4 - CAN Frame Data Word 0"]
pub data0_hcmb: crate::Reg<data0_hcmb::DATA0_HCMB_SPEC>,
#[doc = "0x1f8 - CAN Frame Identifier Word 0"]
pub id0_hcmb: crate::Reg<id0_hcmb::ID0_HCMB_SPEC>,
#[doc = "0x1fc - CAN Frame Identifier Word 1"]
pub id1_hcmb: crate::Reg<id1_hcmb::ID1_HCMB_SPEC>,
#[doc = "0x200 - CAN Global Configuration Register"]
pub cgcr: crate::Reg<cgcr::CGCR_SPEC>,
#[doc = "0x204 - CAN Timing Register"]
pub ctim: crate::Reg<ctim::CTIM_SPEC>,
#[doc = "0x208 - CAN Global Mask Extension"]
pub gmskx: crate::Reg<gmskx::GMSKX_SPEC>,
#[doc = "0x20c - CAN Global Mask Base"]
pub gmskb: crate::Reg<gmskb::GMSKB_SPEC>,
#[doc = "0x210 - CAN Basic Mask Extension"]
pub bmskx: crate::Reg<bmskx::BMSKX_SPEC>,
#[doc = "0x214 - CAN Basic Mask Base"]
pub bmskb: crate::Reg<bmskb::BMSKB_SPEC>,
#[doc = "0x218 - CAN Interrupt Enable Register"]
pub cien: crate::Reg<cien::CIEN_SPEC>,
#[doc = "0x21c - CAN Interrupt Pending Register"]
pub cipnd: crate::Reg<cipnd::CIPND_SPEC>,
#[doc = "0x220 - CAN Interrupt Clear Register"]
pub ciclr: crate::Reg<ciclr::CICLR_SPEC>,
#[doc = "0x224 - CAN Interrupt Code Enable Register"]
pub cicen: crate::Reg<cicen::CICEN_SPEC>,
#[doc = "0x228 - CAN Status Pending Register"]
pub cstpnd: crate::Reg<cstpnd::CSTPND_SPEC>,
#[doc = "0x22c - CAN Error Counter Register"]
pub canec: crate::Reg<canec::CANEC_SPEC>,
#[doc = "0x230 - CAN Error Diagnostic Register"]
pub cediag: crate::Reg<cediag::CEDIAG_SPEC>,
#[doc = "0x234 - CAN Timer Register"]
pub ctmr: crate::Reg<ctmr::CTMR_SPEC>,
}
#[doc = "CNSTAT_CMB0 register accessor: an alias for `Reg<CNSTAT_CMB0_SPEC>`"]
pub type CNSTAT_CMB0 = crate::Reg<cnstat_cmb0::CNSTAT_CMB0_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb0;
#[doc = "TSTP_CMB0 register accessor: an alias for `Reg<TSTP_CMB0_SPEC>`"]
pub type TSTP_CMB0 = crate::Reg<tstp_cmb0::TSTP_CMB0_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb0;
#[doc = "DATA3_CMB0 register accessor: an alias for `Reg<DATA3_CMB0_SPEC>`"]
pub type DATA3_CMB0 = crate::Reg<data3_cmb0::DATA3_CMB0_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb0;
#[doc = "DATA2_CMB0 register accessor: an alias for `Reg<DATA2_CMB0_SPEC>`"]
pub type DATA2_CMB0 = crate::Reg<data2_cmb0::DATA2_CMB0_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb0;
#[doc = "DATA1_CMB0 register accessor: an alias for `Reg<DATA1_CMB0_SPEC>`"]
pub type DATA1_CMB0 = crate::Reg<data1_cmb0::DATA1_CMB0_SPEC>;
#[doc = "CAN Frame Data Word 1"]
pub mod data1_cmb0;
#[doc = "DATA0_CMB0 register accessor: an alias for `Reg<DATA0_CMB0_SPEC>`"]
pub type DATA0_CMB0 = crate::Reg<data0_cmb0::DATA0_CMB0_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb0;
#[doc = "ID0_CMB0 register accessor: an alias for `Reg<ID0_CMB0_SPEC>`"]
pub type ID0_CMB0 = crate::Reg<id0_cmb0::ID0_CMB0_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb0;
#[doc = "ID1_CMB0 register accessor: an alias for `Reg<ID1_CMB0_SPEC>`"]
pub type ID1_CMB0 = crate::Reg<id1_cmb0::ID1_CMB0_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb0;
#[doc = "CNSTAT_CMB1 register accessor: an alias for `Reg<CNSTAT_CMB1_SPEC>`"]
pub type CNSTAT_CMB1 = crate::Reg<cnstat_cmb1::CNSTAT_CMB1_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb1;
#[doc = "TSTP_CMB1 register accessor: an alias for `Reg<TSTP_CMB1_SPEC>`"]
pub type TSTP_CMB1 = crate::Reg<tstp_cmb1::TSTP_CMB1_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb1;
#[doc = "DATA3_CMB1 register accessor: an alias for `Reg<DATA3_CMB1_SPEC>`"]
pub type DATA3_CMB1 = crate::Reg<data3_cmb1::DATA3_CMB1_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb1;
#[doc = "DATA2_CMB1 register accessor: an alias for `Reg<DATA2_CMB1_SPEC>`"]
pub type DATA2_CMB1 = crate::Reg<data2_cmb1::DATA2_CMB1_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb1;
#[doc = "DATA1_CMB1 register accessor: an alias for `Reg<DATA1_CMB1_SPEC>`"]
pub type DATA1_CMB1 = crate::Reg<data1_cmb1::DATA1_CMB1_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb1;
#[doc = "DATA0_CMB1 register accessor: an alias for `Reg<DATA0_CMB1_SPEC>`"]
pub type DATA0_CMB1 = crate::Reg<data0_cmb1::DATA0_CMB1_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb1;
#[doc = "ID0_CMB1 register accessor: an alias for `Reg<ID0_CMB1_SPEC>`"]
pub type ID0_CMB1 = crate::Reg<id0_cmb1::ID0_CMB1_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb1;
#[doc = "ID1_CMB1 register accessor: an alias for `Reg<ID1_CMB1_SPEC>`"]
pub type ID1_CMB1 = crate::Reg<id1_cmb1::ID1_CMB1_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb1;
#[doc = "CNSTAT_CMB2 register accessor: an alias for `Reg<CNSTAT_CMB2_SPEC>`"]
pub type CNSTAT_CMB2 = crate::Reg<cnstat_cmb2::CNSTAT_CMB2_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb2;
#[doc = "TSTP_CMB2 register accessor: an alias for `Reg<TSTP_CMB2_SPEC>`"]
pub type TSTP_CMB2 = crate::Reg<tstp_cmb2::TSTP_CMB2_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb2;
#[doc = "DATA3_CMB2 register accessor: an alias for `Reg<DATA3_CMB2_SPEC>`"]
pub type DATA3_CMB2 = crate::Reg<data3_cmb2::DATA3_CMB2_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb2;
#[doc = "DATA2_CMB2 register accessor: an alias for `Reg<DATA2_CMB2_SPEC>`"]
pub type DATA2_CMB2 = crate::Reg<data2_cmb2::DATA2_CMB2_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb2;
#[doc = "DATA1_CMB2 register accessor: an alias for `Reg<DATA1_CMB2_SPEC>`"]
pub type DATA1_CMB2 = crate::Reg<data1_cmb2::DATA1_CMB2_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb2;
#[doc = "DATA0_CMB2 register accessor: an alias for `Reg<DATA0_CMB2_SPEC>`"]
pub type DATA0_CMB2 = crate::Reg<data0_cmb2::DATA0_CMB2_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb2;
#[doc = "ID0_CMB2 register accessor: an alias for `Reg<ID0_CMB2_SPEC>`"]
pub type ID0_CMB2 = crate::Reg<id0_cmb2::ID0_CMB2_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb2;
#[doc = "ID1_CMB2 register accessor: an alias for `Reg<ID1_CMB2_SPEC>`"]
pub type ID1_CMB2 = crate::Reg<id1_cmb2::ID1_CMB2_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb2;
#[doc = "CNSTAT_CMB3 register accessor: an alias for `Reg<CNSTAT_CMB3_SPEC>`"]
pub type CNSTAT_CMB3 = crate::Reg<cnstat_cmb3::CNSTAT_CMB3_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb3;
#[doc = "TSTP_CMB3 register accessor: an alias for `Reg<TSTP_CMB3_SPEC>`"]
pub type TSTP_CMB3 = crate::Reg<tstp_cmb3::TSTP_CMB3_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb3;
#[doc = "DATA3_CMB3 register accessor: an alias for `Reg<DATA3_CMB3_SPEC>`"]
pub type DATA3_CMB3 = crate::Reg<data3_cmb3::DATA3_CMB3_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb3;
#[doc = "DATA2_CMB3 register accessor: an alias for `Reg<DATA2_CMB3_SPEC>`"]
pub type DATA2_CMB3 = crate::Reg<data2_cmb3::DATA2_CMB3_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb3;
#[doc = "DATA1_CMB3 register accessor: an alias for `Reg<DATA1_CMB3_SPEC>`"]
pub type DATA1_CMB3 = crate::Reg<data1_cmb3::DATA1_CMB3_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb3;
#[doc = "DATA0_CMB3 register accessor: an alias for `Reg<DATA0_CMB3_SPEC>`"]
pub type DATA0_CMB3 = crate::Reg<data0_cmb3::DATA0_CMB3_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb3;
#[doc = "ID0_CMB3 register accessor: an alias for `Reg<ID0_CMB3_SPEC>`"]
pub type ID0_CMB3 = crate::Reg<id0_cmb3::ID0_CMB3_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb3;
#[doc = "ID1_CMB3 register accessor: an alias for `Reg<ID1_CMB3_SPEC>`"]
pub type ID1_CMB3 = crate::Reg<id1_cmb3::ID1_CMB3_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb3;
#[doc = "CNSTAT_CMB4 register accessor: an alias for `Reg<CNSTAT_CMB4_SPEC>`"]
pub type CNSTAT_CMB4 = crate::Reg<cnstat_cmb4::CNSTAT_CMB4_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb4;
#[doc = "TSTP_CMB4 register accessor: an alias for `Reg<TSTP_CMB4_SPEC>`"]
pub type TSTP_CMB4 = crate::Reg<tstp_cmb4::TSTP_CMB4_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb4;
#[doc = "DATA3_CMB4 register accessor: an alias for `Reg<DATA3_CMB4_SPEC>`"]
pub type DATA3_CMB4 = crate::Reg<data3_cmb4::DATA3_CMB4_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb4;
#[doc = "DATA2_CMB4 register accessor: an alias for `Reg<DATA2_CMB4_SPEC>`"]
pub type DATA2_CMB4 = crate::Reg<data2_cmb4::DATA2_CMB4_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb4;
#[doc = "DATA1_CMB4 register accessor: an alias for `Reg<DATA1_CMB4_SPEC>`"]
pub type DATA1_CMB4 = crate::Reg<data1_cmb4::DATA1_CMB4_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb4;
#[doc = "DATA0_CMB4 register accessor: an alias for `Reg<DATA0_CMB4_SPEC>`"]
pub type DATA0_CMB4 = crate::Reg<data0_cmb4::DATA0_CMB4_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb4;
#[doc = "ID0_CMB4 register accessor: an alias for `Reg<ID0_CMB4_SPEC>`"]
pub type ID0_CMB4 = crate::Reg<id0_cmb4::ID0_CMB4_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb4;
#[doc = "ID1_CMB4 register accessor: an alias for `Reg<ID1_CMB4_SPEC>`"]
pub type ID1_CMB4 = crate::Reg<id1_cmb4::ID1_CMB4_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb4;
#[doc = "CNSTAT_CMB5 register accessor: an alias for `Reg<CNSTAT_CMB5_SPEC>`"]
pub type CNSTAT_CMB5 = crate::Reg<cnstat_cmb5::CNSTAT_CMB5_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb5;
#[doc = "TSTP_CMB5 register accessor: an alias for `Reg<TSTP_CMB5_SPEC>`"]
pub type TSTP_CMB5 = crate::Reg<tstp_cmb5::TSTP_CMB5_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb5;
#[doc = "DATA3_CMB5 register accessor: an alias for `Reg<DATA3_CMB5_SPEC>`"]
pub type DATA3_CMB5 = crate::Reg<data3_cmb5::DATA3_CMB5_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb5;
#[doc = "DATA2_CMB5 register accessor: an alias for `Reg<DATA2_CMB5_SPEC>`"]
pub type DATA2_CMB5 = crate::Reg<data2_cmb5::DATA2_CMB5_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb5;
#[doc = "DATA1_CMB5 register accessor: an alias for `Reg<DATA1_CMB5_SPEC>`"]
pub type DATA1_CMB5 = crate::Reg<data1_cmb5::DATA1_CMB5_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb5;
#[doc = "DATA0_CMB5 register accessor: an alias for `Reg<DATA0_CMB5_SPEC>`"]
pub type DATA0_CMB5 = crate::Reg<data0_cmb5::DATA0_CMB5_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb5;
#[doc = "ID0_CMB5 register accessor: an alias for `Reg<ID0_CMB5_SPEC>`"]
pub type ID0_CMB5 = crate::Reg<id0_cmb5::ID0_CMB5_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb5;
#[doc = "ID1_CMB5 register accessor: an alias for `Reg<ID1_CMB5_SPEC>`"]
pub type ID1_CMB5 = crate::Reg<id1_cmb5::ID1_CMB5_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb5;
#[doc = "CNSTAT_CMB6 register accessor: an alias for `Reg<CNSTAT_CMB6_SPEC>`"]
pub type CNSTAT_CMB6 = crate::Reg<cnstat_cmb6::CNSTAT_CMB6_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb6;
#[doc = "TSTP_CMB6 register accessor: an alias for `Reg<TSTP_CMB6_SPEC>`"]
pub type TSTP_CMB6 = crate::Reg<tstp_cmb6::TSTP_CMB6_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb6;
#[doc = "DATA3_CMB6 register accessor: an alias for `Reg<DATA3_CMB6_SPEC>`"]
pub type DATA3_CMB6 = crate::Reg<data3_cmb6::DATA3_CMB6_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb6;
#[doc = "DATA2_CMB6 register accessor: an alias for `Reg<DATA2_CMB6_SPEC>`"]
pub type DATA2_CMB6 = crate::Reg<data2_cmb6::DATA2_CMB6_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb6;
#[doc = "DATA1_CMB6 register accessor: an alias for `Reg<DATA1_CMB6_SPEC>`"]
pub type DATA1_CMB6 = crate::Reg<data1_cmb6::DATA1_CMB6_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb6;
#[doc = "DATA0_CMB6 register accessor: an alias for `Reg<DATA0_CMB6_SPEC>`"]
pub type DATA0_CMB6 = crate::Reg<data0_cmb6::DATA0_CMB6_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb6;
#[doc = "ID0_CMB6 register accessor: an alias for `Reg<ID0_CMB6_SPEC>`"]
pub type ID0_CMB6 = crate::Reg<id0_cmb6::ID0_CMB6_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb6;
#[doc = "ID1_CMB6 register accessor: an alias for `Reg<ID1_CMB6_SPEC>`"]
pub type ID1_CMB6 = crate::Reg<id1_cmb6::ID1_CMB6_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb6;
#[doc = "CNSTAT_CMB7 register accessor: an alias for `Reg<CNSTAT_CMB7_SPEC>`"]
pub type CNSTAT_CMB7 = crate::Reg<cnstat_cmb7::CNSTAT_CMB7_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb7;
#[doc = "TSTP_CMB7 register accessor: an alias for `Reg<TSTP_CMB7_SPEC>`"]
pub type TSTP_CMB7 = crate::Reg<tstp_cmb7::TSTP_CMB7_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb7;
#[doc = "DATA3_CMB7 register accessor: an alias for `Reg<DATA3_CMB7_SPEC>`"]
pub type DATA3_CMB7 = crate::Reg<data3_cmb7::DATA3_CMB7_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb7;
#[doc = "DATA2_CMB7 register accessor: an alias for `Reg<DATA2_CMB7_SPEC>`"]
pub type DATA2_CMB7 = crate::Reg<data2_cmb7::DATA2_CMB7_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb7;
#[doc = "DATA1_CMB7 register accessor: an alias for `Reg<DATA1_CMB7_SPEC>`"]
pub type DATA1_CMB7 = crate::Reg<data1_cmb7::DATA1_CMB7_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb7;
#[doc = "DATA0_CMB7 register accessor: an alias for `Reg<DATA0_CMB7_SPEC>`"]
pub type DATA0_CMB7 = crate::Reg<data0_cmb7::DATA0_CMB7_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb7;
#[doc = "ID0_CMB7 register accessor: an alias for `Reg<ID0_CMB7_SPEC>`"]
pub type ID0_CMB7 = crate::Reg<id0_cmb7::ID0_CMB7_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb7;
#[doc = "ID1_CMB7 register accessor: an alias for `Reg<ID1_CMB7_SPEC>`"]
pub type ID1_CMB7 = crate::Reg<id1_cmb7::ID1_CMB7_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb7;
#[doc = "CNSTAT_CMB8 register accessor: an alias for `Reg<CNSTAT_CMB8_SPEC>`"]
pub type CNSTAT_CMB8 = crate::Reg<cnstat_cmb8::CNSTAT_CMB8_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb8;
#[doc = "TSTP_CMB8 register accessor: an alias for `Reg<TSTP_CMB8_SPEC>`"]
pub type TSTP_CMB8 = crate::Reg<tstp_cmb8::TSTP_CMB8_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb8;
#[doc = "DATA3_CMB8 register accessor: an alias for `Reg<DATA3_CMB8_SPEC>`"]
pub type DATA3_CMB8 = crate::Reg<data3_cmb8::DATA3_CMB8_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb8;
#[doc = "DATA2_CMB8 register accessor: an alias for `Reg<DATA2_CMB8_SPEC>`"]
pub type DATA2_CMB8 = crate::Reg<data2_cmb8::DATA2_CMB8_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb8;
#[doc = "DATA1_CMB8 register accessor: an alias for `Reg<DATA1_CMB8_SPEC>`"]
pub type DATA1_CMB8 = crate::Reg<data1_cmb8::DATA1_CMB8_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb8;
#[doc = "DATA0_CMB8 register accessor: an alias for `Reg<DATA0_CMB8_SPEC>`"]
pub type DATA0_CMB8 = crate::Reg<data0_cmb8::DATA0_CMB8_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb8;
#[doc = "ID0_CMB8 register accessor: an alias for `Reg<ID0_CMB8_SPEC>`"]
pub type ID0_CMB8 = crate::Reg<id0_cmb8::ID0_CMB8_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb8;
#[doc = "ID1_CMB8 register accessor: an alias for `Reg<ID1_CMB8_SPEC>`"]
pub type ID1_CMB8 = crate::Reg<id1_cmb8::ID1_CMB8_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb8;
#[doc = "CNSTAT_CMB9 register accessor: an alias for `Reg<CNSTAT_CMB9_SPEC>`"]
pub type CNSTAT_CMB9 = crate::Reg<cnstat_cmb9::CNSTAT_CMB9_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb9;
#[doc = "TSTP_CMB9 register accessor: an alias for `Reg<TSTP_CMB9_SPEC>`"]
pub type TSTP_CMB9 = crate::Reg<tstp_cmb9::TSTP_CMB9_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb9;
#[doc = "DATA3_CMB9 register accessor: an alias for `Reg<DATA3_CMB9_SPEC>`"]
pub type DATA3_CMB9 = crate::Reg<data3_cmb9::DATA3_CMB9_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb9;
#[doc = "DATA2_CMB9 register accessor: an alias for `Reg<DATA2_CMB9_SPEC>`"]
pub type DATA2_CMB9 = crate::Reg<data2_cmb9::DATA2_CMB9_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb9;
#[doc = "DATA1_CMB9 register accessor: an alias for `Reg<DATA1_CMB9_SPEC>`"]
pub type DATA1_CMB9 = crate::Reg<data1_cmb9::DATA1_CMB9_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb9;
#[doc = "DATA0_CMB9 register accessor: an alias for `Reg<DATA0_CMB9_SPEC>`"]
pub type DATA0_CMB9 = crate::Reg<data0_cmb9::DATA0_CMB9_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb9;
#[doc = "ID0_CMB9 register accessor: an alias for `Reg<ID0_CMB9_SPEC>`"]
pub type ID0_CMB9 = crate::Reg<id0_cmb9::ID0_CMB9_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb9;
#[doc = "ID1_CMB9 register accessor: an alias for `Reg<ID1_CMB9_SPEC>`"]
pub type ID1_CMB9 = crate::Reg<id1_cmb9::ID1_CMB9_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb9;
#[doc = "CNSTAT_CMB10 register accessor: an alias for `Reg<CNSTAT_CMB10_SPEC>`"]
pub type CNSTAT_CMB10 = crate::Reg<cnstat_cmb10::CNSTAT_CMB10_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb10;
#[doc = "TSTP_CMB10 register accessor: an alias for `Reg<TSTP_CMB10_SPEC>`"]
pub type TSTP_CMB10 = crate::Reg<tstp_cmb10::TSTP_CMB10_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb10;
#[doc = "DATA3_CMB10 register accessor: an alias for `Reg<DATA3_CMB10_SPEC>`"]
pub type DATA3_CMB10 = crate::Reg<data3_cmb10::DATA3_CMB10_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb10;
#[doc = "DATA2_CMB10 register accessor: an alias for `Reg<DATA2_CMB10_SPEC>`"]
pub type DATA2_CMB10 = crate::Reg<data2_cmb10::DATA2_CMB10_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb10;
#[doc = "DATA1_CMB10 register accessor: an alias for `Reg<DATA1_CMB10_SPEC>`"]
pub type DATA1_CMB10 = crate::Reg<data1_cmb10::DATA1_CMB10_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb10;
#[doc = "DATA0_CMB10 register accessor: an alias for `Reg<DATA0_CMB10_SPEC>`"]
pub type DATA0_CMB10 = crate::Reg<data0_cmb10::DATA0_CMB10_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb10;
#[doc = "ID0_CMB10 register accessor: an alias for `Reg<ID0_CMB10_SPEC>`"]
pub type ID0_CMB10 = crate::Reg<id0_cmb10::ID0_CMB10_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb10;
#[doc = "ID1_CMB10 register accessor: an alias for `Reg<ID1_CMB10_SPEC>`"]
pub type ID1_CMB10 = crate::Reg<id1_cmb10::ID1_CMB10_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb10;
#[doc = "CNSTAT_CMB11 register accessor: an alias for `Reg<CNSTAT_CMB11_SPEC>`"]
pub type CNSTAT_CMB11 = crate::Reg<cnstat_cmb11::CNSTAT_CMB11_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb11;
#[doc = "TSTP_CMB11 register accessor: an alias for `Reg<TSTP_CMB11_SPEC>`"]
pub type TSTP_CMB11 = crate::Reg<tstp_cmb11::TSTP_CMB11_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb11;
#[doc = "DATA3_CMB11 register accessor: an alias for `Reg<DATA3_CMB11_SPEC>`"]
pub type DATA3_CMB11 = crate::Reg<data3_cmb11::DATA3_CMB11_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb11;
#[doc = "DATA2_CMB11 register accessor: an alias for `Reg<DATA2_CMB11_SPEC>`"]
pub type DATA2_CMB11 = crate::Reg<data2_cmb11::DATA2_CMB11_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb11;
#[doc = "DATA1_CMB11 register accessor: an alias for `Reg<DATA1_CMB11_SPEC>`"]
pub type DATA1_CMB11 = crate::Reg<data1_cmb11::DATA1_CMB11_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb11;
#[doc = "DATA0_CMB11 register accessor: an alias for `Reg<DATA0_CMB11_SPEC>`"]
pub type DATA0_CMB11 = crate::Reg<data0_cmb11::DATA0_CMB11_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb11;
#[doc = "ID0_CMB11 register accessor: an alias for `Reg<ID0_CMB11_SPEC>`"]
pub type ID0_CMB11 = crate::Reg<id0_cmb11::ID0_CMB11_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb11;
#[doc = "ID1_CMB11 register accessor: an alias for `Reg<ID1_CMB11_SPEC>`"]
pub type ID1_CMB11 = crate::Reg<id1_cmb11::ID1_CMB11_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb11;
#[doc = "CNSTAT_CMB12 register accessor: an alias for `Reg<CNSTAT_CMB12_SPEC>`"]
pub type CNSTAT_CMB12 = crate::Reg<cnstat_cmb12::CNSTAT_CMB12_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb12;
#[doc = "TSTP_CMB12 register accessor: an alias for `Reg<TSTP_CMB12_SPEC>`"]
pub type TSTP_CMB12 = crate::Reg<tstp_cmb12::TSTP_CMB12_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb12;
#[doc = "DATA3_CMB12 register accessor: an alias for `Reg<DATA3_CMB12_SPEC>`"]
pub type DATA3_CMB12 = crate::Reg<data3_cmb12::DATA3_CMB12_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb12;
#[doc = "DATA2_CMB12 register accessor: an alias for `Reg<DATA2_CMB12_SPEC>`"]
pub type DATA2_CMB12 = crate::Reg<data2_cmb12::DATA2_CMB12_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb12;
#[doc = "DATA1_CMB12 register accessor: an alias for `Reg<DATA1_CMB12_SPEC>`"]
pub type DATA1_CMB12 = crate::Reg<data1_cmb12::DATA1_CMB12_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb12;
#[doc = "DATA0_CMB12 register accessor: an alias for `Reg<DATA0_CMB12_SPEC>`"]
pub type DATA0_CMB12 = crate::Reg<data0_cmb12::DATA0_CMB12_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb12;
#[doc = "ID0_CMB12 register accessor: an alias for `Reg<ID0_CMB12_SPEC>`"]
pub type ID0_CMB12 = crate::Reg<id0_cmb12::ID0_CMB12_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb12;
#[doc = "ID1_CMB12 register accessor: an alias for `Reg<ID1_CMB12_SPEC>`"]
pub type ID1_CMB12 = crate::Reg<id1_cmb12::ID1_CMB12_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb12;
#[doc = "CNSTAT_CMB13 register accessor: an alias for `Reg<CNSTAT_CMB13_SPEC>`"]
pub type CNSTAT_CMB13 = crate::Reg<cnstat_cmb13::CNSTAT_CMB13_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb13;
#[doc = "TSTP_CMB13 register accessor: an alias for `Reg<TSTP_CMB13_SPEC>`"]
pub type TSTP_CMB13 = crate::Reg<tstp_cmb13::TSTP_CMB13_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb13;
#[doc = "DATA3_CMB13 register accessor: an alias for `Reg<DATA3_CMB13_SPEC>`"]
pub type DATA3_CMB13 = crate::Reg<data3_cmb13::DATA3_CMB13_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb13;
#[doc = "DATA2_CMB13 register accessor: an alias for `Reg<DATA2_CMB13_SPEC>`"]
pub type DATA2_CMB13 = crate::Reg<data2_cmb13::DATA2_CMB13_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb13;
#[doc = "DATA1_CMB13 register accessor: an alias for `Reg<DATA1_CMB13_SPEC>`"]
pub type DATA1_CMB13 = crate::Reg<data1_cmb13::DATA1_CMB13_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb13;
#[doc = "DATA0_CMB13 register accessor: an alias for `Reg<DATA0_CMB13_SPEC>`"]
pub type DATA0_CMB13 = crate::Reg<data0_cmb13::DATA0_CMB13_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb13;
#[doc = "ID0_CMB13 register accessor: an alias for `Reg<ID0_CMB13_SPEC>`"]
pub type ID0_CMB13 = crate::Reg<id0_cmb13::ID0_CMB13_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb13;
#[doc = "ID1_CMB13 register accessor: an alias for `Reg<ID1_CMB13_SPEC>`"]
pub type ID1_CMB13 = crate::Reg<id1_cmb13::ID1_CMB13_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb13;
#[doc = "CNSTAT_CMB14 register accessor: an alias for `Reg<CNSTAT_CMB14_SPEC>`"]
pub type CNSTAT_CMB14 = crate::Reg<cnstat_cmb14::CNSTAT_CMB14_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_cmb14;
#[doc = "TSTP_CMB14 register accessor: an alias for `Reg<TSTP_CMB14_SPEC>`"]
pub type TSTP_CMB14 = crate::Reg<tstp_cmb14::TSTP_CMB14_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_cmb14;
#[doc = "DATA3_CMB14 register accessor: an alias for `Reg<DATA3_CMB14_SPEC>`"]
pub type DATA3_CMB14 = crate::Reg<data3_cmb14::DATA3_CMB14_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_cmb14;
#[doc = "DATA2_CMB14 register accessor: an alias for `Reg<DATA2_CMB14_SPEC>`"]
pub type DATA2_CMB14 = crate::Reg<data2_cmb14::DATA2_CMB14_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_cmb14;
#[doc = "DATA1_CMB14 register accessor: an alias for `Reg<DATA1_CMB14_SPEC>`"]
pub type DATA1_CMB14 = crate::Reg<data1_cmb14::DATA1_CMB14_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_cmb14;
#[doc = "DATA0_CMB14 register accessor: an alias for `Reg<DATA0_CMB14_SPEC>`"]
pub type DATA0_CMB14 = crate::Reg<data0_cmb14::DATA0_CMB14_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_cmb14;
#[doc = "ID0_CMB14 register accessor: an alias for `Reg<ID0_CMB14_SPEC>`"]
pub type ID0_CMB14 = crate::Reg<id0_cmb14::ID0_CMB14_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_cmb14;
#[doc = "ID1_CMB14 register accessor: an alias for `Reg<ID1_CMB14_SPEC>`"]
pub type ID1_CMB14 = crate::Reg<id1_cmb14::ID1_CMB14_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_cmb14;
#[doc = "CNSTAT_HCMB register accessor: an alias for `Reg<CNSTAT_HCMB_SPEC>`"]
pub type CNSTAT_HCMB = crate::Reg<cnstat_hcmb::CNSTAT_HCMB_SPEC>;
#[doc = "Buffer Status / Control Register"]
pub mod cnstat_hcmb;
#[doc = "TSTP_HCMB register accessor: an alias for `Reg<TSTP_HCMB_SPEC>`"]
pub type TSTP_HCMB = crate::Reg<tstp_hcmb::TSTP_HCMB_SPEC>;
#[doc = "CAN Frame Timestamp"]
pub mod tstp_hcmb;
#[doc = "DATA3_HCMB register accessor: an alias for `Reg<DATA3_HCMB_SPEC>`"]
pub type DATA3_HCMB = crate::Reg<data3_hcmb::DATA3_HCMB_SPEC>;
#[doc = "CAN Frame Data Word 3"]
pub mod data3_hcmb;
#[doc = "DATA2_HCMB register accessor: an alias for `Reg<DATA2_HCMB_SPEC>`"]
pub type DATA2_HCMB = crate::Reg<data2_hcmb::DATA2_HCMB_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data2_hcmb;
#[doc = "DATA1_HCMB register accessor: an alias for `Reg<DATA1_HCMB_SPEC>`"]
pub type DATA1_HCMB = crate::Reg<data1_hcmb::DATA1_HCMB_SPEC>;
#[doc = "CAN Frame Data Word 2"]
pub mod data1_hcmb;
#[doc = "DATA0_HCMB register accessor: an alias for `Reg<DATA0_HCMB_SPEC>`"]
pub type DATA0_HCMB = crate::Reg<data0_hcmb::DATA0_HCMB_SPEC>;
#[doc = "CAN Frame Data Word 0"]
pub mod data0_hcmb;
#[doc = "ID0_HCMB register accessor: an alias for `Reg<ID0_HCMB_SPEC>`"]
pub type ID0_HCMB = crate::Reg<id0_hcmb::ID0_HCMB_SPEC>;
#[doc = "CAN Frame Identifier Word 0"]
pub mod id0_hcmb;
#[doc = "ID1_HCMB register accessor: an alias for `Reg<ID1_HCMB_SPEC>`"]
pub type ID1_HCMB = crate::Reg<id1_hcmb::ID1_HCMB_SPEC>;
#[doc = "CAN Frame Identifier Word 1"]
pub mod id1_hcmb;
#[doc = "CGCR register accessor: an alias for `Reg<CGCR_SPEC>`"]
pub type CGCR = crate::Reg<cgcr::CGCR_SPEC>;
#[doc = "CAN Global Configuration Register"]
pub mod cgcr;
#[doc = "CTIM register accessor: an alias for `Reg<CTIM_SPEC>`"]
pub type CTIM = crate::Reg<ctim::CTIM_SPEC>;
#[doc = "CAN Timing Register"]
pub mod ctim;
#[doc = "GMSKX register accessor: an alias for `Reg<GMSKX_SPEC>`"]
pub type GMSKX = crate::Reg<gmskx::GMSKX_SPEC>;
#[doc = "CAN Global Mask Extension"]
pub mod gmskx;
#[doc = "GMSKB register accessor: an alias for `Reg<GMSKB_SPEC>`"]
pub type GMSKB = crate::Reg<gmskb::GMSKB_SPEC>;
#[doc = "CAN Global Mask Base"]
pub mod gmskb;
#[doc = "BMSKX register accessor: an alias for `Reg<BMSKX_SPEC>`"]
pub type BMSKX = crate::Reg<bmskx::BMSKX_SPEC>;
#[doc = "CAN Basic Mask Extension"]
pub mod bmskx;
#[doc = "BMSKB register accessor: an alias for `Reg<BMSKB_SPEC>`"]
pub type BMSKB = crate::Reg<bmskb::BMSKB_SPEC>;
#[doc = "CAN Basic Mask Base"]
pub mod bmskb;
#[doc = "CIEN register accessor: an alias for `Reg<CIEN_SPEC>`"]
pub type CIEN = crate::Reg<cien::CIEN_SPEC>;
#[doc = "CAN Interrupt Enable Register"]
pub mod cien;
#[doc = "CIPND register accessor: an alias for `Reg<CIPND_SPEC>`"]
pub type CIPND = crate::Reg<cipnd::CIPND_SPEC>;
#[doc = "CAN Interrupt Pending Register"]
pub mod cipnd;
#[doc = "CICLR register accessor: an alias for `Reg<CICLR_SPEC>`"]
pub type CICLR = crate::Reg<ciclr::CICLR_SPEC>;
#[doc = "CAN Interrupt Clear Register"]
pub mod ciclr;
#[doc = "CICEN register accessor: an alias for `Reg<CICEN_SPEC>`"]
pub type CICEN = crate::Reg<cicen::CICEN_SPEC>;
#[doc = "CAN Interrupt Code Enable Register"]
pub mod cicen;
#[doc = "CSTPND register accessor: an alias for `Reg<CSTPND_SPEC>`"]
pub type CSTPND = crate::Reg<cstpnd::CSTPND_SPEC>;
#[doc = "CAN Status Pending Register"]
pub mod cstpnd;
#[doc = "CANEC register accessor: an alias for `Reg<CANEC_SPEC>`"]
pub type CANEC = crate::Reg<canec::CANEC_SPEC>;
#[doc = "CAN Error Counter Register"]
pub mod canec;
#[doc = "CEDIAG register accessor: an alias for `Reg<CEDIAG_SPEC>`"]
pub type CEDIAG = crate::Reg<cediag::CEDIAG_SPEC>;
#[doc = "CAN Error Diagnostic Register"]
pub mod cediag;
#[doc = "CTMR register accessor: an alias for `Reg<CTMR_SPEC>`"]
pub type CTMR = crate::Reg<ctmr::CTMR_SPEC>;
#[doc = "CAN Timer Register"]
pub mod ctmr;

254
src/can0/bmskb.rs Normal file
View File

@ -0,0 +1,254 @@
#[doc = "Register `BMSKB` reader"]
pub struct R(crate::R<BMSKB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BMSKB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BMSKB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BMSKB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BMSKB` writer"]
pub struct W(crate::W<BMSKB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BMSKB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<BMSKB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BMSKB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BM1` reader - BM\\[28:18\\]
- ID\\[10:0\\]
in standard, ID\\[28:18\\]
in extended"]
pub struct BM1_R(crate::FieldReader<u16, u16>);
impl BM1_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
BM1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BM1_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BM1` writer - BM\\[28:18\\]
- ID\\[10:0\\]
in standard, ID\\[28:18\\]
in extended"]
pub struct BM1_W<'a> {
w: &'a mut W,
}
impl<'a> BM1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07ff << 5)) | ((value as u32 & 0x07ff) << 5);
self.w
}
}
#[doc = "Field `RTR` reader - Remote Transmission Request in Standard, Substitute Remote Request (SRR) in extended"]
pub struct RTR_R(crate::FieldReader<bool, bool>);
impl RTR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
RTR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RTR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RTR` writer - Remote Transmission Request in Standard, Substitute Remote Request (SRR) in extended"]
pub struct RTR_W<'a> {
w: &'a mut W,
}
impl<'a> RTR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `IDE` reader - Identifier Extension Bit"]
pub struct IDE_R(crate::FieldReader<bool, bool>);
impl IDE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
IDE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IDE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IDE` writer - Identifier Extension Bit"]
pub struct IDE_W<'a> {
w: &'a mut W,
}
impl<'a> IDE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `BM0` reader - BM\\[17:15\\]
- Unused in standard, ID\\[17:15\\]
in extended"]
pub struct BM0_R(crate::FieldReader<u8, u8>);
impl BM0_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BM0_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BM0_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BM0` writer - BM\\[17:15\\]
- Unused in standard, ID\\[17:15\\]
in extended"]
pub struct BM0_W<'a> {
w: &'a mut W,
}
impl<'a> BM0_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07);
self.w
}
}
impl R {
#[doc = "Bits 5:15 - BM\\[28:18\\]
- ID\\[10:0\\]
in standard, ID\\[28:18\\]
in extended"]
#[inline(always)]
pub fn bm1(&self) -> BM1_R {
BM1_R::new(((self.bits >> 5) & 0x07ff) as u16)
}
#[doc = "Bit 4 - Remote Transmission Request in Standard, Substitute Remote Request (SRR) in extended"]
#[inline(always)]
pub fn rtr(&self) -> RTR_R {
RTR_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Identifier Extension Bit"]
#[inline(always)]
pub fn ide(&self) -> IDE_R {
IDE_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bits 0:2 - BM\\[17:15\\]
- Unused in standard, ID\\[17:15\\]
in extended"]
#[inline(always)]
pub fn bm0(&self) -> BM0_R {
BM0_R::new((self.bits & 0x07) as u8)
}
}
impl W {
#[doc = "Bits 5:15 - BM\\[28:18\\]
- ID\\[10:0\\]
in standard, ID\\[28:18\\]
in extended"]
#[inline(always)]
pub fn bm1(&mut self) -> BM1_W {
BM1_W { w: self }
}
#[doc = "Bit 4 - Remote Transmission Request in Standard, Substitute Remote Request (SRR) in extended"]
#[inline(always)]
pub fn rtr(&mut self) -> RTR_W {
RTR_W { w: self }
}
#[doc = "Bit 3 - Identifier Extension Bit"]
#[inline(always)]
pub fn ide(&mut self) -> IDE_W {
IDE_W { w: self }
}
#[doc = "Bits 0:2 - BM\\[17:15\\]
- Unused in standard, ID\\[17:15\\]
in extended"]
#[inline(always)]
pub fn bm0(&mut self) -> BM0_W {
BM0_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Basic Mask Base\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [bmskb](index.html) module"]
pub struct BMSKB_SPEC;
impl crate::RegisterSpec for BMSKB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bmskb::R](R) reader structure"]
impl crate::Readable for BMSKB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bmskb::W](W) writer structure"]
impl crate::Writable for BMSKB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BMSKB to value 0"]
impl crate::Resettable for BMSKB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

158
src/can0/bmskx.rs Normal file
View File

@ -0,0 +1,158 @@
#[doc = "Register `BMSKX` reader"]
pub struct R(crate::R<BMSKX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BMSKX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BMSKX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BMSKX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BMSKX` writer"]
pub struct W(crate::W<BMSKX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BMSKX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<BMSKX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BMSKX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BM` reader - BM\\[14:0\\]
used when an extended frame is received. ID\\[14:0\\]
in extended, unused standard"]
pub struct BM_R(crate::FieldReader<u16, u16>);
impl BM_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
BM_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BM_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BM` writer - BM\\[14:0\\]
used when an extended frame is received. ID\\[14:0\\]
in extended, unused standard"]
pub struct BM_W<'a> {
w: &'a mut W,
}
impl<'a> BM_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x7fff << 1)) | ((value as u32 & 0x7fff) << 1);
self.w
}
}
#[doc = "Field `XRTR` reader - Extended Remote transmission Request Bit"]
pub struct XRTR_R(crate::FieldReader<bool, bool>);
impl XRTR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
XRTR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for XRTR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `XRTR` writer - Extended Remote transmission Request Bit"]
pub struct XRTR_W<'a> {
w: &'a mut W,
}
impl<'a> XRTR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl R {
#[doc = "Bits 1:15 - BM\\[14:0\\]
used when an extended frame is received. ID\\[14:0\\]
in extended, unused standard"]
#[inline(always)]
pub fn bm(&self) -> BM_R {
BM_R::new(((self.bits >> 1) & 0x7fff) as u16)
}
#[doc = "Bit 0 - Extended Remote transmission Request Bit"]
#[inline(always)]
pub fn xrtr(&self) -> XRTR_R {
XRTR_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bits 1:15 - BM\\[14:0\\]
used when an extended frame is received. ID\\[14:0\\]
in extended, unused standard"]
#[inline(always)]
pub fn bm(&mut self) -> BM_W {
BM_W { w: self }
}
#[doc = "Bit 0 - Extended Remote transmission Request Bit"]
#[inline(always)]
pub fn xrtr(&mut self) -> XRTR_W {
XRTR_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Basic Mask Extension\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [bmskx](index.html) module"]
pub struct BMSKX_SPEC;
impl crate::RegisterSpec for BMSKX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bmskx::R](R) reader structure"]
impl crate::Readable for BMSKX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bmskx::W](W) writer structure"]
impl crate::Writable for BMSKX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BMSKX to value 0"]
impl crate::Resettable for BMSKX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/canec.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `CANEC` reader"]
pub struct R(crate::R<CANEC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CANEC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CANEC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CANEC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CANEC` writer"]
pub struct W(crate::W<CANEC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CANEC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CANEC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CANEC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `REC` reader - Receive Error Counter"]
pub struct REC_R(crate::FieldReader<u8, u8>);
impl REC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
REC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for REC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `REC` writer - Receive Error Counter"]
pub struct REC_W<'a> {
w: &'a mut W,
}
impl<'a> REC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `TEC` reader - Transmit Error Counter"]
pub struct TEC_R(crate::FieldReader<u8, u8>);
impl TEC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
TEC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TEC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TEC` writer - Transmit Error Counter"]
pub struct TEC_W<'a> {
w: &'a mut W,
}
impl<'a> TEC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Receive Error Counter"]
#[inline(always)]
pub fn rec(&self) -> REC_R {
REC_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Transmit Error Counter"]
#[inline(always)]
pub fn tec(&self) -> TEC_R {
TEC_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Receive Error Counter"]
#[inline(always)]
pub fn rec(&mut self) -> REC_W {
REC_W { w: self }
}
#[doc = "Bits 0:7 - Transmit Error Counter"]
#[inline(always)]
pub fn tec(&mut self) -> TEC_W {
TEC_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Error Counter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [canec](index.html) module"]
pub struct CANEC_SPEC;
impl crate::RegisterSpec for CANEC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [canec::R](R) reader structure"]
impl crate::Readable for CANEC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [canec::W](W) writer structure"]
impl crate::Writable for CANEC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CANEC to value 0"]
impl crate::Resettable for CANEC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

375
src/can0/cediag.rs Normal file
View File

@ -0,0 +1,375 @@
#[doc = "Register `CEDIAG` reader"]
pub struct R(crate::R<CEDIAG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CEDIAG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CEDIAG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CEDIAG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CEDIAG` writer"]
pub struct W(crate::W<CEDIAG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CEDIAG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CEDIAG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CEDIAG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DRIVE` reader - Drive"]
pub struct DRIVE_R(crate::FieldReader<bool, bool>);
impl DRIVE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DRIVE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DRIVE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DRIVE` writer - Drive"]
pub struct DRIVE_W<'a> {
w: &'a mut W,
}
impl<'a> DRIVE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
#[doc = "Field `MON` reader - Monitor"]
pub struct MON_R(crate::FieldReader<bool, bool>);
impl MON_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
MON_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MON_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MON` writer - Monitor"]
pub struct MON_W<'a> {
w: &'a mut W,
}
impl<'a> MON_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
self.w
}
}
#[doc = "Field `CRC` reader - CRC"]
pub struct CRC_R(crate::FieldReader<bool, bool>);
impl CRC_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
CRC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CRC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CRC` writer - CRC"]
pub struct CRC_W<'a> {
w: &'a mut W,
}
impl<'a> CRC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
self.w
}
}
#[doc = "Field `STUFF` reader - Stuff Error"]
pub struct STUFF_R(crate::FieldReader<bool, bool>);
impl STUFF_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
STUFF_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for STUFF_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `STUFF` writer - Stuff Error"]
pub struct STUFF_W<'a> {
w: &'a mut W,
}
impl<'a> STUFF_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Field `TXE` reader - Transmit Error"]
pub struct TXE_R(crate::FieldReader<bool, bool>);
impl TXE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TXE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TXE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TXE` writer - Transmit Error"]
pub struct TXE_W<'a> {
w: &'a mut W,
}
impl<'a> TXE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Field `EBID` reader - Error Bit Identifier"]
pub struct EBID_R(crate::FieldReader<u8, u8>);
impl EBID_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
EBID_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EBID_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EBID` writer - Error Bit Identifier"]
pub struct EBID_W<'a> {
w: &'a mut W,
}
impl<'a> EBID_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x3f << 4)) | ((value as u32 & 0x3f) << 4);
self.w
}
}
#[doc = "Field `EFID` reader - Error Field Identifier"]
pub struct EFID_R(crate::FieldReader<u8, u8>);
impl EFID_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
EFID_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EFID_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EFID` writer - Error Field Identifier"]
pub struct EFID_W<'a> {
w: &'a mut W,
}
impl<'a> EFID_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bit 14 - Drive"]
#[inline(always)]
pub fn drive(&self) -> DRIVE_R {
DRIVE_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 13 - Monitor"]
#[inline(always)]
pub fn mon(&self) -> MON_R {
MON_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 12 - CRC"]
#[inline(always)]
pub fn crc(&self) -> CRC_R {
CRC_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11 - Stuff Error"]
#[inline(always)]
pub fn stuff(&self) -> STUFF_R {
STUFF_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Transmit Error"]
#[inline(always)]
pub fn txe(&self) -> TXE_R {
TXE_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bits 4:9 - Error Bit Identifier"]
#[inline(always)]
pub fn ebid(&self) -> EBID_R {
EBID_R::new(((self.bits >> 4) & 0x3f) as u8)
}
#[doc = "Bits 0:3 - Error Field Identifier"]
#[inline(always)]
pub fn efid(&self) -> EFID_R {
EFID_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bit 14 - Drive"]
#[inline(always)]
pub fn drive(&mut self) -> DRIVE_W {
DRIVE_W { w: self }
}
#[doc = "Bit 13 - Monitor"]
#[inline(always)]
pub fn mon(&mut self) -> MON_W {
MON_W { w: self }
}
#[doc = "Bit 12 - CRC"]
#[inline(always)]
pub fn crc(&mut self) -> CRC_W {
CRC_W { w: self }
}
#[doc = "Bit 11 - Stuff Error"]
#[inline(always)]
pub fn stuff(&mut self) -> STUFF_W {
STUFF_W { w: self }
}
#[doc = "Bit 10 - Transmit Error"]
#[inline(always)]
pub fn txe(&mut self) -> TXE_W {
TXE_W { w: self }
}
#[doc = "Bits 4:9 - Error Bit Identifier"]
#[inline(always)]
pub fn ebid(&mut self) -> EBID_W {
EBID_W { w: self }
}
#[doc = "Bits 0:3 - Error Field Identifier"]
#[inline(always)]
pub fn efid(&mut self) -> EFID_W {
EFID_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Error Diagnostic Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cediag](index.html) module"]
pub struct CEDIAG_SPEC;
impl crate::RegisterSpec for CEDIAG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cediag::R](R) reader structure"]
impl crate::Readable for CEDIAG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cediag::W](W) writer structure"]
impl crate::Writable for CEDIAG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CEDIAG to value 0"]
impl crate::Resettable for CEDIAG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

630
src/can0/cgcr.rs Normal file
View File

@ -0,0 +1,630 @@
#[doc = "Register `CGCR` reader"]
pub struct R(crate::R<CGCR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CGCR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CGCR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CGCR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CGCR` writer"]
pub struct W(crate::W<CGCR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CGCR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CGCR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CGCR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EIT` reader - Error Interrupt Type"]
pub struct EIT_R(crate::FieldReader<bool, bool>);
impl EIT_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EIT_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EIT_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EIT` writer - Error Interrupt Type"]
pub struct EIT_W<'a> {
w: &'a mut W,
}
impl<'a> EIT_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Field `DIAGEN` reader - Diagnostic Enable"]
pub struct DIAGEN_R(crate::FieldReader<bool, bool>);
impl DIAGEN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DIAGEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DIAGEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DIAGEN` writer - Diagnostic Enable"]
pub struct DIAGEN_W<'a> {
w: &'a mut W,
}
impl<'a> DIAGEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Field `INTERNAL` reader - Internal"]
pub struct INTERNAL_R(crate::FieldReader<bool, bool>);
impl INTERNAL_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
INTERNAL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for INTERNAL_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `INTERNAL` writer - Internal"]
pub struct INTERNAL_W<'a> {
w: &'a mut W,
}
impl<'a> INTERNAL_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Field `LOOPBACK` reader - Loopback"]
pub struct LOOPBACK_R(crate::FieldReader<bool, bool>);
impl LOOPBACK_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
LOOPBACK_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LOOPBACK_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LOOPBACK` writer - Loopback"]
pub struct LOOPBACK_W<'a> {
w: &'a mut W,
}
impl<'a> LOOPBACK_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "Field `IGNACK` reader - Ignore Acknowledge"]
pub struct IGNACK_R(crate::FieldReader<bool, bool>);
impl IGNACK_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
IGNACK_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IGNACK_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IGNACK` writer - Ignore Acknowledge"]
pub struct IGNACK_W<'a> {
w: &'a mut W,
}
impl<'a> IGNACK_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
self.w
}
}
#[doc = "Field `LO` reader - Listen Only"]
pub struct LO_R(crate::FieldReader<bool, bool>);
impl LO_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
LO_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LO_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LO` writer - Listen Only"]
pub struct LO_W<'a> {
w: &'a mut W,
}
impl<'a> LO_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `DDIR` reader - Data Direction"]
pub struct DDIR_R(crate::FieldReader<bool, bool>);
impl DDIR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DDIR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DDIR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DDIR` writer - Data Direction"]
pub struct DDIR_W<'a> {
w: &'a mut W,
}
impl<'a> DDIR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `TSTPEN` reader - Time Sync Enable"]
pub struct TSTPEN_R(crate::FieldReader<bool, bool>);
impl TSTPEN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TSTPEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TSTPEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TSTPEN` writer - Time Sync Enable"]
pub struct TSTPEN_W<'a> {
w: &'a mut W,
}
impl<'a> TSTPEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `BUFFLOCK` reader - Buffer Lock"]
pub struct BUFFLOCK_R(crate::FieldReader<bool, bool>);
impl BUFFLOCK_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
BUFFLOCK_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BUFFLOCK_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BUFFLOCK` writer - Buffer Lock"]
pub struct BUFFLOCK_W<'a> {
w: &'a mut W,
}
impl<'a> BUFFLOCK_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `CTX` reader - RW,Control Transmit"]
pub struct CTX_R(crate::FieldReader<bool, bool>);
impl CTX_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
CTX_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CTX_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CTX` writer - RW,Control Transmit"]
pub struct CTX_W<'a> {
w: &'a mut W,
}
impl<'a> CTX_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `CRX` reader - RW,Control Receive"]
pub struct CRX_R(crate::FieldReader<bool, bool>);
impl CRX_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
CRX_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CRX_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CRX` writer - RW,Control Receive"]
pub struct CRX_W<'a> {
w: &'a mut W,
}
impl<'a> CRX_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `CANEN` reader - CAN Enable"]
pub struct CANEN_R(crate::FieldReader<bool, bool>);
impl CANEN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
CANEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CANEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CANEN` writer - CAN Enable"]
pub struct CANEN_W<'a> {
w: &'a mut W,
}
impl<'a> CANEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl R {
#[doc = "Bit 11 - Error Interrupt Type"]
#[inline(always)]
pub fn eit(&self) -> EIT_R {
EIT_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Diagnostic Enable"]
#[inline(always)]
pub fn diagen(&self) -> DIAGEN_R {
DIAGEN_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Internal"]
#[inline(always)]
pub fn internal(&self) -> INTERNAL_R {
INTERNAL_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - Loopback"]
#[inline(always)]
pub fn loopback(&self) -> LOOPBACK_R {
LOOPBACK_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - Ignore Acknowledge"]
#[inline(always)]
pub fn ignack(&self) -> IGNACK_R {
IGNACK_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - Listen Only"]
#[inline(always)]
pub fn lo(&self) -> LO_R {
LO_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Data Direction"]
#[inline(always)]
pub fn ddir(&self) -> DDIR_R {
DDIR_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Time Sync Enable"]
#[inline(always)]
pub fn tstpen(&self) -> TSTPEN_R {
TSTPEN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Buffer Lock"]
#[inline(always)]
pub fn bufflock(&self) -> BUFFLOCK_R {
BUFFLOCK_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - RW,Control Transmit"]
#[inline(always)]
pub fn ctx(&self) -> CTX_R {
CTX_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - RW,Control Receive"]
#[inline(always)]
pub fn crx(&self) -> CRX_R {
CRX_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - CAN Enable"]
#[inline(always)]
pub fn canen(&self) -> CANEN_R {
CANEN_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 11 - Error Interrupt Type"]
#[inline(always)]
pub fn eit(&mut self) -> EIT_W {
EIT_W { w: self }
}
#[doc = "Bit 10 - Diagnostic Enable"]
#[inline(always)]
pub fn diagen(&mut self) -> DIAGEN_W {
DIAGEN_W { w: self }
}
#[doc = "Bit 9 - Internal"]
#[inline(always)]
pub fn internal(&mut self) -> INTERNAL_W {
INTERNAL_W { w: self }
}
#[doc = "Bit 8 - Loopback"]
#[inline(always)]
pub fn loopback(&mut self) -> LOOPBACK_W {
LOOPBACK_W { w: self }
}
#[doc = "Bit 7 - Ignore Acknowledge"]
#[inline(always)]
pub fn ignack(&mut self) -> IGNACK_W {
IGNACK_W { w: self }
}
#[doc = "Bit 6 - Listen Only"]
#[inline(always)]
pub fn lo(&mut self) -> LO_W {
LO_W { w: self }
}
#[doc = "Bit 5 - Data Direction"]
#[inline(always)]
pub fn ddir(&mut self) -> DDIR_W {
DDIR_W { w: self }
}
#[doc = "Bit 4 - Time Sync Enable"]
#[inline(always)]
pub fn tstpen(&mut self) -> TSTPEN_W {
TSTPEN_W { w: self }
}
#[doc = "Bit 3 - Buffer Lock"]
#[inline(always)]
pub fn bufflock(&mut self) -> BUFFLOCK_W {
BUFFLOCK_W { w: self }
}
#[doc = "Bit 2 - RW,Control Transmit"]
#[inline(always)]
pub fn ctx(&mut self) -> CTX_W {
CTX_W { w: self }
}
#[doc = "Bit 1 - RW,Control Receive"]
#[inline(always)]
pub fn crx(&mut self) -> CRX_W {
CRX_W { w: self }
}
#[doc = "Bit 0 - CAN Enable"]
#[inline(always)]
pub fn canen(&mut self) -> CANEN_W {
CANEN_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Global Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cgcr](index.html) module"]
pub struct CGCR_SPEC;
impl crate::RegisterSpec for CGCR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cgcr::R](R) reader structure"]
impl crate::Readable for CGCR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cgcr::W](W) writer structure"]
impl crate::Writable for CGCR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CGCR to value 0"]
impl crate::Resettable for CGCR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

150
src/can0/cicen.rs Normal file
View File

@ -0,0 +1,150 @@
#[doc = "Register `CICEN` reader"]
pub struct R(crate::R<CICEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CICEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CICEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CICEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CICEN` writer"]
pub struct W(crate::W<CICEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CICEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CICEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CICEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EICEN` reader - Error Interrupt Code Enable"]
pub struct EICEN_R(crate::FieldReader<bool, bool>);
impl EICEN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EICEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EICEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EICEN` writer - Error Interrupt Code Enable"]
pub struct EICEN_W<'a> {
w: &'a mut W,
}
impl<'a> EICEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `ICEN` reader - Buffer Interrupt Code Enable\\[14:0\\]"]
pub struct ICEN_R(crate::FieldReader<u16, u16>);
impl ICEN_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
ICEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ICEN_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ICEN` writer - Buffer Interrupt Code Enable\\[14:0\\]"]
pub struct ICEN_W<'a> {
w: &'a mut W,
}
impl<'a> ICEN_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0x7fff) | (value as u32 & 0x7fff);
self.w
}
}
impl R {
#[doc = "Bit 15 - Error Interrupt Code Enable"]
#[inline(always)]
pub fn eicen(&self) -> EICEN_R {
EICEN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bits 0:14 - Buffer Interrupt Code Enable\\[14:0\\]"]
#[inline(always)]
pub fn icen(&self) -> ICEN_R {
ICEN_R::new((self.bits & 0x7fff) as u16)
}
}
impl W {
#[doc = "Bit 15 - Error Interrupt Code Enable"]
#[inline(always)]
pub fn eicen(&mut self) -> EICEN_W {
EICEN_W { w: self }
}
#[doc = "Bits 0:14 - Buffer Interrupt Code Enable\\[14:0\\]"]
#[inline(always)]
pub fn icen(&mut self) -> ICEN_W {
ICEN_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Interrupt Code Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cicen](index.html) module"]
pub struct CICEN_SPEC;
impl crate::RegisterSpec for CICEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cicen::R](R) reader structure"]
impl crate::Readable for CICEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cicen::W](W) writer structure"]
impl crate::Writable for CICEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CICEN to value 0"]
impl crate::Resettable for CICEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

150
src/can0/ciclr.rs Normal file
View File

@ -0,0 +1,150 @@
#[doc = "Register `CICLR` reader"]
pub struct R(crate::R<CICLR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CICLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CICLR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CICLR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CICLR` writer"]
pub struct W(crate::W<CICLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CICLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CICLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CICLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EICLR` reader - Error Interrupt Clear"]
pub struct EICLR_R(crate::FieldReader<bool, bool>);
impl EICLR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EICLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EICLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EICLR` writer - Error Interrupt Clear"]
pub struct EICLR_W<'a> {
w: &'a mut W,
}
impl<'a> EICLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `ICLR` reader - Buffer Interrupt Clear\\[14:0\\]"]
pub struct ICLR_R(crate::FieldReader<u16, u16>);
impl ICLR_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
ICLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ICLR_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ICLR` writer - Buffer Interrupt Clear\\[14:0\\]"]
pub struct ICLR_W<'a> {
w: &'a mut W,
}
impl<'a> ICLR_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0x7fff) | (value as u32 & 0x7fff);
self.w
}
}
impl R {
#[doc = "Bit 15 - Error Interrupt Clear"]
#[inline(always)]
pub fn eiclr(&self) -> EICLR_R {
EICLR_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bits 0:14 - Buffer Interrupt Clear\\[14:0\\]"]
#[inline(always)]
pub fn iclr(&self) -> ICLR_R {
ICLR_R::new((self.bits & 0x7fff) as u16)
}
}
impl W {
#[doc = "Bit 15 - Error Interrupt Clear"]
#[inline(always)]
pub fn eiclr(&mut self) -> EICLR_W {
EICLR_W { w: self }
}
#[doc = "Bits 0:14 - Buffer Interrupt Clear\\[14:0\\]"]
#[inline(always)]
pub fn iclr(&mut self) -> ICLR_W {
ICLR_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Interrupt Clear Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ciclr](index.html) module"]
pub struct CICLR_SPEC;
impl crate::RegisterSpec for CICLR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ciclr::R](R) reader structure"]
impl crate::Readable for CICLR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ciclr::W](W) writer structure"]
impl crate::Writable for CICLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CICLR to value 0"]
impl crate::Resettable for CICLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

150
src/can0/cien.rs Normal file
View File

@ -0,0 +1,150 @@
#[doc = "Register `CIEN` reader"]
pub struct R(crate::R<CIEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CIEN` writer"]
pub struct W(crate::W<CIEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CIEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CIEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CIEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EIEN` reader - Error Interrupt Enable"]
pub struct EIEN_R(crate::FieldReader<bool, bool>);
impl EIEN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EIEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EIEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EIEN` writer - Error Interrupt Enable"]
pub struct EIEN_W<'a> {
w: &'a mut W,
}
impl<'a> EIEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `IEN` reader - Buffer Interrupt Enable\\[14:0\\]"]
pub struct IEN_R(crate::FieldReader<u16, u16>);
impl IEN_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
IEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IEN_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IEN` writer - Buffer Interrupt Enable\\[14:0\\]"]
pub struct IEN_W<'a> {
w: &'a mut W,
}
impl<'a> IEN_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0x7fff) | (value as u32 & 0x7fff);
self.w
}
}
impl R {
#[doc = "Bit 15 - Error Interrupt Enable"]
#[inline(always)]
pub fn eien(&self) -> EIEN_R {
EIEN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bits 0:14 - Buffer Interrupt Enable\\[14:0\\]"]
#[inline(always)]
pub fn ien(&self) -> IEN_R {
IEN_R::new((self.bits & 0x7fff) as u16)
}
}
impl W {
#[doc = "Bit 15 - Error Interrupt Enable"]
#[inline(always)]
pub fn eien(&mut self) -> EIEN_W {
EIEN_W { w: self }
}
#[doc = "Bits 0:14 - Buffer Interrupt Enable\\[14:0\\]"]
#[inline(always)]
pub fn ien(&mut self) -> IEN_W {
IEN_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cien](index.html) module"]
pub struct CIEN_SPEC;
impl crate::RegisterSpec for CIEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cien::R](R) reader structure"]
impl crate::Readable for CIEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cien::W](W) writer structure"]
impl crate::Writable for CIEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CIEN to value 0"]
impl crate::Resettable for CIEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

150
src/can0/cipnd.rs Normal file
View File

@ -0,0 +1,150 @@
#[doc = "Register `CIPND` reader"]
pub struct R(crate::R<CIPND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CIPND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CIPND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CIPND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CIPND` writer"]
pub struct W(crate::W<CIPND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CIPND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CIPND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CIPND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EIPND` reader - Error Interrupt Pending"]
pub struct EIPND_R(crate::FieldReader<bool, bool>);
impl EIPND_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EIPND_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EIPND_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EIPND` writer - Error Interrupt Pending"]
pub struct EIPND_W<'a> {
w: &'a mut W,
}
impl<'a> EIPND_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `IPND` reader - Buffer Interrupt Pending\\[14:0\\]"]
pub struct IPND_R(crate::FieldReader<u16, u16>);
impl IPND_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
IPND_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IPND_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IPND` writer - Buffer Interrupt Pending\\[14:0\\]"]
pub struct IPND_W<'a> {
w: &'a mut W,
}
impl<'a> IPND_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0x7fff) | (value as u32 & 0x7fff);
self.w
}
}
impl R {
#[doc = "Bit 15 - Error Interrupt Pending"]
#[inline(always)]
pub fn eipnd(&self) -> EIPND_R {
EIPND_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bits 0:14 - Buffer Interrupt Pending\\[14:0\\]"]
#[inline(always)]
pub fn ipnd(&self) -> IPND_R {
IPND_R::new((self.bits & 0x7fff) as u16)
}
}
impl W {
#[doc = "Bit 15 - Error Interrupt Pending"]
#[inline(always)]
pub fn eipnd(&mut self) -> EIPND_W {
EIPND_W { w: self }
}
#[doc = "Bits 0:14 - Buffer Interrupt Pending\\[14:0\\]"]
#[inline(always)]
pub fn ipnd(&mut self) -> IPND_W {
IPND_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cipnd](index.html) module"]
pub struct CIPND_SPEC;
impl crate::RegisterSpec for CIPND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cipnd::R](R) reader structure"]
impl crate::Readable for CIPND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cipnd::W](W) writer structure"]
impl crate::Writable for CIPND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CIPND to value 0"]
impl crate::Resettable for CIPND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb0.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB0` reader"]
pub struct R(crate::R<CNSTAT_CMB0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB0` writer"]
pub struct W(crate::W<CNSTAT_CMB0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb0](index.html) module"]
pub struct CNSTAT_CMB0_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb0::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb0::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB0 to value 0"]
impl crate::Resettable for CNSTAT_CMB0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb1.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB1` reader"]
pub struct R(crate::R<CNSTAT_CMB1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB1` writer"]
pub struct W(crate::W<CNSTAT_CMB1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb1](index.html) module"]
pub struct CNSTAT_CMB1_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb1::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb1::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB1 to value 0"]
impl crate::Resettable for CNSTAT_CMB1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb10.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB10` reader"]
pub struct R(crate::R<CNSTAT_CMB10_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB10_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB10_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB10` writer"]
pub struct W(crate::W<CNSTAT_CMB10_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB10_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB10_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb10](index.html) module"]
pub struct CNSTAT_CMB10_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB10_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb10::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB10_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb10::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB10_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB10 to value 0"]
impl crate::Resettable for CNSTAT_CMB10_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb11.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB11` reader"]
pub struct R(crate::R<CNSTAT_CMB11_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB11_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB11_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB11` writer"]
pub struct W(crate::W<CNSTAT_CMB11_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB11_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB11_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb11](index.html) module"]
pub struct CNSTAT_CMB11_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB11_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb11::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB11_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb11::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB11_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB11 to value 0"]
impl crate::Resettable for CNSTAT_CMB11_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb12.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB12` reader"]
pub struct R(crate::R<CNSTAT_CMB12_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB12_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB12_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB12` writer"]
pub struct W(crate::W<CNSTAT_CMB12_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB12_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB12_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb12](index.html) module"]
pub struct CNSTAT_CMB12_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB12_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb12::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB12_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb12::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB12_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB12 to value 0"]
impl crate::Resettable for CNSTAT_CMB12_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb13.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB13` reader"]
pub struct R(crate::R<CNSTAT_CMB13_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB13_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB13_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB13` writer"]
pub struct W(crate::W<CNSTAT_CMB13_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB13_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB13_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb13](index.html) module"]
pub struct CNSTAT_CMB13_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB13_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb13::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB13_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb13::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB13_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB13 to value 0"]
impl crate::Resettable for CNSTAT_CMB13_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb14.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB14` reader"]
pub struct R(crate::R<CNSTAT_CMB14_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB14_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB14_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB14` writer"]
pub struct W(crate::W<CNSTAT_CMB14_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB14_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB14_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb14](index.html) module"]
pub struct CNSTAT_CMB14_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB14_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb14::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB14_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb14::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB14_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB14 to value 0"]
impl crate::Resettable for CNSTAT_CMB14_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb2.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB2` reader"]
pub struct R(crate::R<CNSTAT_CMB2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB2` writer"]
pub struct W(crate::W<CNSTAT_CMB2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb2](index.html) module"]
pub struct CNSTAT_CMB2_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb2::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb2::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB2 to value 0"]
impl crate::Resettable for CNSTAT_CMB2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb3.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB3` reader"]
pub struct R(crate::R<CNSTAT_CMB3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB3` writer"]
pub struct W(crate::W<CNSTAT_CMB3_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB3_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB3_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb3](index.html) module"]
pub struct CNSTAT_CMB3_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb3::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB3_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb3::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB3_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB3 to value 0"]
impl crate::Resettable for CNSTAT_CMB3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb4.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB4` reader"]
pub struct R(crate::R<CNSTAT_CMB4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB4` writer"]
pub struct W(crate::W<CNSTAT_CMB4_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB4_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB4_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb4](index.html) module"]
pub struct CNSTAT_CMB4_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb4::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB4_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb4::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB4_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB4 to value 0"]
impl crate::Resettable for CNSTAT_CMB4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb5.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB5` reader"]
pub struct R(crate::R<CNSTAT_CMB5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB5_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB5` writer"]
pub struct W(crate::W<CNSTAT_CMB5_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB5_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB5_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb5](index.html) module"]
pub struct CNSTAT_CMB5_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb5::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB5_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb5::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB5_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB5 to value 0"]
impl crate::Resettable for CNSTAT_CMB5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb6.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB6` reader"]
pub struct R(crate::R<CNSTAT_CMB6_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB6_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB6_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB6` writer"]
pub struct W(crate::W<CNSTAT_CMB6_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB6_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB6_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb6](index.html) module"]
pub struct CNSTAT_CMB6_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB6_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb6::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB6_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb6::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB6_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB6 to value 0"]
impl crate::Resettable for CNSTAT_CMB6_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb7.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB7` reader"]
pub struct R(crate::R<CNSTAT_CMB7_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB7_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB7_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB7` writer"]
pub struct W(crate::W<CNSTAT_CMB7_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB7_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB7_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb7](index.html) module"]
pub struct CNSTAT_CMB7_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB7_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb7::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB7_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb7::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB7_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB7 to value 0"]
impl crate::Resettable for CNSTAT_CMB7_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb8.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB8` reader"]
pub struct R(crate::R<CNSTAT_CMB8_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB8_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB8_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB8` writer"]
pub struct W(crate::W<CNSTAT_CMB8_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB8_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB8_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb8](index.html) module"]
pub struct CNSTAT_CMB8_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB8_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb8::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB8_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb8::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB8_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB8 to value 0"]
impl crate::Resettable for CNSTAT_CMB8_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_cmb9.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_CMB9` reader"]
pub struct R(crate::R<CNSTAT_CMB9_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_CMB9_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_CMB9_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_CMB9` writer"]
pub struct W(crate::W<CNSTAT_CMB9_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_CMB9_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_CMB9_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_cmb9](index.html) module"]
pub struct CNSTAT_CMB9_SPEC;
impl crate::RegisterSpec for CNSTAT_CMB9_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_cmb9::R](R) reader structure"]
impl crate::Readable for CNSTAT_CMB9_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_cmb9::W](W) writer structure"]
impl crate::Writable for CNSTAT_CMB9_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_CMB9 to value 0"]
impl crate::Resettable for CNSTAT_CMB9_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

177
src/can0/cnstat_hcmb.rs Normal file
View File

@ -0,0 +1,177 @@
#[doc = "Register `CNSTAT_HCMB` reader"]
pub struct R(crate::R<CNSTAT_HCMB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CNSTAT_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CNSTAT_HCMB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CNSTAT_HCMB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CNSTAT_HCMB` writer"]
pub struct W(crate::W<CNSTAT_HCMB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CNSTAT_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CNSTAT_HCMB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CNSTAT_HCMB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DLC` reader - Data Length Code"]
pub struct DLC_R(crate::FieldReader<u8, u8>);
impl DLC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
DLC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DLC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DLC` writer - Data Length Code"]
pub struct DLC_W<'a> {
w: &'a mut W,
}
impl<'a> DLC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Field `PRI` reader - Transmit Priority Code"]
pub struct PRI_R(crate::FieldReader<u8, u8>);
impl PRI_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PRI_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PRI_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PRI` writer - Transmit Priority Code"]
pub struct PRI_W<'a> {
w: &'a mut W,
}
impl<'a> PRI_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Field `ST` reader - Buffer Status"]
pub struct ST_R(crate::FieldReader<u8, u8>);
impl ST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
ST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ST` writer - Buffer Status"]
pub struct ST_W<'a> {
w: &'a mut W,
}
impl<'a> ST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&self) -> DLC_R {
DLC_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&self) -> PRI_R {
PRI_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 12:15 - Data Length Code"]
#[inline(always)]
pub fn dlc(&mut self) -> DLC_W {
DLC_W { w: self }
}
#[doc = "Bits 4:7 - Transmit Priority Code"]
#[inline(always)]
pub fn pri(&mut self) -> PRI_W {
PRI_W { w: self }
}
#[doc = "Bits 0:3 - Buffer Status"]
#[inline(always)]
pub fn st(&mut self) -> ST_W {
ST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Buffer Status / Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnstat_hcmb](index.html) module"]
pub struct CNSTAT_HCMB_SPEC;
impl crate::RegisterSpec for CNSTAT_HCMB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cnstat_hcmb::R](R) reader structure"]
impl crate::Readable for CNSTAT_HCMB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cnstat_hcmb::W](W) writer structure"]
impl crate::Writable for CNSTAT_HCMB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CNSTAT_HCMB to value 0"]
impl crate::Resettable for CNSTAT_HCMB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

187
src/can0/cstpnd.rs Normal file
View File

@ -0,0 +1,187 @@
#[doc = "Register `CSTPND` reader"]
pub struct R(crate::R<CSTPND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CSTPND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CSTPND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CSTPND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CSTPND` writer"]
pub struct W(crate::W<CSTPND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CSTPND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CSTPND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CSTPND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `NS` reader - CAN Node Status"]
pub struct NS_R(crate::FieldReader<u8, u8>);
impl NS_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
NS_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for NS_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `NS` writer - CAN Node Status"]
pub struct NS_W<'a> {
w: &'a mut W,
}
impl<'a> NS_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 5)) | ((value as u32 & 0x07) << 5);
self.w
}
}
#[doc = "Field `IRQ` reader - Interrupt Request portion of Interrupt Code"]
pub struct IRQ_R(crate::FieldReader<bool, bool>);
impl IRQ_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
IRQ_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IRQ_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IRQ` writer - Interrupt Request portion of Interrupt Code"]
pub struct IRQ_W<'a> {
w: &'a mut W,
}
impl<'a> IRQ_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `IST` reader - Interrupt Source portion of Interrupt Code"]
pub struct IST_R(crate::FieldReader<u8, u8>);
impl IST_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
IST_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IST_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IST` writer - Interrupt Source portion of Interrupt Code"]
pub struct IST_W<'a> {
w: &'a mut W,
}
impl<'a> IST_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 5:7 - CAN Node Status"]
#[inline(always)]
pub fn ns(&self) -> NS_R {
NS_R::new(((self.bits >> 5) & 0x07) as u8)
}
#[doc = "Bit 4 - Interrupt Request portion of Interrupt Code"]
#[inline(always)]
pub fn irq(&self) -> IRQ_R {
IRQ_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bits 0:3 - Interrupt Source portion of Interrupt Code"]
#[inline(always)]
pub fn ist(&self) -> IST_R {
IST_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 5:7 - CAN Node Status"]
#[inline(always)]
pub fn ns(&mut self) -> NS_W {
NS_W { w: self }
}
#[doc = "Bit 4 - Interrupt Request portion of Interrupt Code"]
#[inline(always)]
pub fn irq(&mut self) -> IRQ_W {
IRQ_W { w: self }
}
#[doc = "Bits 0:3 - Interrupt Source portion of Interrupt Code"]
#[inline(always)]
pub fn ist(&mut self) -> IST_W {
IST_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Status Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cstpnd](index.html) module"]
pub struct CSTPND_SPEC;
impl crate::RegisterSpec for CSTPND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cstpnd::R](R) reader structure"]
impl crate::Readable for CSTPND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cstpnd::W](W) writer structure"]
impl crate::Writable for CSTPND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CSTPND to value 0"]
impl crate::Resettable for CSTPND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

214
src/can0/ctim.rs Normal file
View File

@ -0,0 +1,214 @@
#[doc = "Register `CTIM` reader"]
pub struct R(crate::R<CTIM_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTIM_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTIM_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTIM_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTIM` writer"]
pub struct W(crate::W<CTIM_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTIM_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CTIM_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTIM_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PSC` reader - Prescaler Configuration"]
pub struct PSC_R(crate::FieldReader<u8, u8>);
impl PSC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
PSC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PSC_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PSC` writer - Prescaler Configuration"]
pub struct PSC_W<'a> {
w: &'a mut W,
}
impl<'a> PSC_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x7f << 9)) | ((value as u32 & 0x7f) << 9);
self.w
}
}
#[doc = "Field `SJW` reader - Synchronization Jump Width"]
pub struct SJW_R(crate::FieldReader<u8, u8>);
impl SJW_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
SJW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SJW_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SJW` writer - Synchronization Jump Width"]
pub struct SJW_W<'a> {
w: &'a mut W,
}
impl<'a> SJW_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x03 << 7)) | ((value as u32 & 0x03) << 7);
self.w
}
}
#[doc = "Field `TSEG1` reader - Time Segment 1"]
pub struct TSEG1_R(crate::FieldReader<u8, u8>);
impl TSEG1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
TSEG1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TSEG1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TSEG1` writer - Time Segment 1"]
pub struct TSEG1_W<'a> {
w: &'a mut W,
}
impl<'a> TSEG1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 3)) | ((value as u32 & 0x0f) << 3);
self.w
}
}
#[doc = "Field `TSEG2` reader - Time Segment 2"]
pub struct TSEG2_R(crate::FieldReader<u8, u8>);
impl TSEG2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
TSEG2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TSEG2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TSEG2` writer - Time Segment 2"]
pub struct TSEG2_W<'a> {
w: &'a mut W,
}
impl<'a> TSEG2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07);
self.w
}
}
impl R {
#[doc = "Bits 9:15 - Prescaler Configuration"]
#[inline(always)]
pub fn psc(&self) -> PSC_R {
PSC_R::new(((self.bits >> 9) & 0x7f) as u8)
}
#[doc = "Bits 7:8 - Synchronization Jump Width"]
#[inline(always)]
pub fn sjw(&self) -> SJW_R {
SJW_R::new(((self.bits >> 7) & 0x03) as u8)
}
#[doc = "Bits 3:6 - Time Segment 1"]
#[inline(always)]
pub fn tseg1(&self) -> TSEG1_R {
TSEG1_R::new(((self.bits >> 3) & 0x0f) as u8)
}
#[doc = "Bits 0:2 - Time Segment 2"]
#[inline(always)]
pub fn tseg2(&self) -> TSEG2_R {
TSEG2_R::new((self.bits & 0x07) as u8)
}
}
impl W {
#[doc = "Bits 9:15 - Prescaler Configuration"]
#[inline(always)]
pub fn psc(&mut self) -> PSC_W {
PSC_W { w: self }
}
#[doc = "Bits 7:8 - Synchronization Jump Width"]
#[inline(always)]
pub fn sjw(&mut self) -> SJW_W {
SJW_W { w: self }
}
#[doc = "Bits 3:6 - Time Segment 1"]
#[inline(always)]
pub fn tseg1(&mut self) -> TSEG1_W {
TSEG1_W { w: self }
}
#[doc = "Bits 0:2 - Time Segment 2"]
#[inline(always)]
pub fn tseg2(&mut self) -> TSEG2_W {
TSEG2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Timing Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctim](index.html) module"]
pub struct CTIM_SPEC;
impl crate::RegisterSpec for CTIM_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctim::R](R) reader structure"]
impl crate::Readable for CTIM_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ctim::W](W) writer structure"]
impl crate::Writable for CTIM_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTIM to value 0"]
impl crate::Resettable for CTIM_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

53
src/can0/ctmr.rs Normal file
View File

@ -0,0 +1,53 @@
#[doc = "Register `CTMR` reader"]
pub struct R(crate::R<CTMR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTMR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTMR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTMR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CTMR` reader - Time Stamp Counter"]
pub struct CTMR_R(crate::FieldReader<u16, u16>);
impl CTMR_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
CTMR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CTMR_R {
type Target = crate::FieldReader<u16, u16>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bits 0:15 - Time Stamp Counter"]
#[inline(always)]
pub fn ctmr(&self) -> CTMR_R {
CTMR_R::new((self.bits & 0xffff) as u16)
}
}
#[doc = "CAN Timer Register\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 [ctmr](index.html) module"]
pub struct CTMR_SPEC;
impl crate::RegisterSpec for CTMR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctmr::R](R) reader structure"]
impl crate::Readable for CTMR_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CTMR to value 0"]
impl crate::Resettable for CTMR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb0.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB0` reader"]
pub struct R(crate::R<DATA0_CMB0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB0` writer"]
pub struct W(crate::W<DATA0_CMB0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb0](index.html) module"]
pub struct DATA0_CMB0_SPEC;
impl crate::RegisterSpec for DATA0_CMB0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb0::R](R) reader structure"]
impl crate::Readable for DATA0_CMB0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb0::W](W) writer structure"]
impl crate::Writable for DATA0_CMB0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB0 to value 0"]
impl crate::Resettable for DATA0_CMB0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb1.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB1` reader"]
pub struct R(crate::R<DATA0_CMB1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB1` writer"]
pub struct W(crate::W<DATA0_CMB1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb1](index.html) module"]
pub struct DATA0_CMB1_SPEC;
impl crate::RegisterSpec for DATA0_CMB1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb1::R](R) reader structure"]
impl crate::Readable for DATA0_CMB1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb1::W](W) writer structure"]
impl crate::Writable for DATA0_CMB1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB1 to value 0"]
impl crate::Resettable for DATA0_CMB1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb10.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB10` reader"]
pub struct R(crate::R<DATA0_CMB10_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB10_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB10_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB10` writer"]
pub struct W(crate::W<DATA0_CMB10_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB10_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB10_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb10](index.html) module"]
pub struct DATA0_CMB10_SPEC;
impl crate::RegisterSpec for DATA0_CMB10_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb10::R](R) reader structure"]
impl crate::Readable for DATA0_CMB10_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb10::W](W) writer structure"]
impl crate::Writable for DATA0_CMB10_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB10 to value 0"]
impl crate::Resettable for DATA0_CMB10_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb11.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB11` reader"]
pub struct R(crate::R<DATA0_CMB11_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB11_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB11_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB11` writer"]
pub struct W(crate::W<DATA0_CMB11_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB11_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB11_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb11](index.html) module"]
pub struct DATA0_CMB11_SPEC;
impl crate::RegisterSpec for DATA0_CMB11_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb11::R](R) reader structure"]
impl crate::Readable for DATA0_CMB11_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb11::W](W) writer structure"]
impl crate::Writable for DATA0_CMB11_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB11 to value 0"]
impl crate::Resettable for DATA0_CMB11_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb12.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB12` reader"]
pub struct R(crate::R<DATA0_CMB12_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB12_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB12_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB12` writer"]
pub struct W(crate::W<DATA0_CMB12_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB12_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB12_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb12](index.html) module"]
pub struct DATA0_CMB12_SPEC;
impl crate::RegisterSpec for DATA0_CMB12_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb12::R](R) reader structure"]
impl crate::Readable for DATA0_CMB12_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb12::W](W) writer structure"]
impl crate::Writable for DATA0_CMB12_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB12 to value 0"]
impl crate::Resettable for DATA0_CMB12_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb13.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB13` reader"]
pub struct R(crate::R<DATA0_CMB13_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB13_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB13_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB13` writer"]
pub struct W(crate::W<DATA0_CMB13_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB13_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB13_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb13](index.html) module"]
pub struct DATA0_CMB13_SPEC;
impl crate::RegisterSpec for DATA0_CMB13_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb13::R](R) reader structure"]
impl crate::Readable for DATA0_CMB13_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb13::W](W) writer structure"]
impl crate::Writable for DATA0_CMB13_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB13 to value 0"]
impl crate::Resettable for DATA0_CMB13_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb14.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB14` reader"]
pub struct R(crate::R<DATA0_CMB14_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB14_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB14_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB14` writer"]
pub struct W(crate::W<DATA0_CMB14_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB14_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB14_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb14](index.html) module"]
pub struct DATA0_CMB14_SPEC;
impl crate::RegisterSpec for DATA0_CMB14_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb14::R](R) reader structure"]
impl crate::Readable for DATA0_CMB14_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb14::W](W) writer structure"]
impl crate::Writable for DATA0_CMB14_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB14 to value 0"]
impl crate::Resettable for DATA0_CMB14_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb2.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB2` reader"]
pub struct R(crate::R<DATA0_CMB2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB2` writer"]
pub struct W(crate::W<DATA0_CMB2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb2](index.html) module"]
pub struct DATA0_CMB2_SPEC;
impl crate::RegisterSpec for DATA0_CMB2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb2::R](R) reader structure"]
impl crate::Readable for DATA0_CMB2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb2::W](W) writer structure"]
impl crate::Writable for DATA0_CMB2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB2 to value 0"]
impl crate::Resettable for DATA0_CMB2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb3.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB3` reader"]
pub struct R(crate::R<DATA0_CMB3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB3` writer"]
pub struct W(crate::W<DATA0_CMB3_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB3_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB3_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb3](index.html) module"]
pub struct DATA0_CMB3_SPEC;
impl crate::RegisterSpec for DATA0_CMB3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb3::R](R) reader structure"]
impl crate::Readable for DATA0_CMB3_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb3::W](W) writer structure"]
impl crate::Writable for DATA0_CMB3_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB3 to value 0"]
impl crate::Resettable for DATA0_CMB3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb4.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB4` reader"]
pub struct R(crate::R<DATA0_CMB4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB4` writer"]
pub struct W(crate::W<DATA0_CMB4_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB4_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB4_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb4](index.html) module"]
pub struct DATA0_CMB4_SPEC;
impl crate::RegisterSpec for DATA0_CMB4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb4::R](R) reader structure"]
impl crate::Readable for DATA0_CMB4_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb4::W](W) writer structure"]
impl crate::Writable for DATA0_CMB4_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB4 to value 0"]
impl crate::Resettable for DATA0_CMB4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb5.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB5` reader"]
pub struct R(crate::R<DATA0_CMB5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB5_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB5` writer"]
pub struct W(crate::W<DATA0_CMB5_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB5_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB5_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb5](index.html) module"]
pub struct DATA0_CMB5_SPEC;
impl crate::RegisterSpec for DATA0_CMB5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb5::R](R) reader structure"]
impl crate::Readable for DATA0_CMB5_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb5::W](W) writer structure"]
impl crate::Writable for DATA0_CMB5_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB5 to value 0"]
impl crate::Resettable for DATA0_CMB5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb6.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB6` reader"]
pub struct R(crate::R<DATA0_CMB6_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB6_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB6_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB6` writer"]
pub struct W(crate::W<DATA0_CMB6_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB6_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB6_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb6](index.html) module"]
pub struct DATA0_CMB6_SPEC;
impl crate::RegisterSpec for DATA0_CMB6_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb6::R](R) reader structure"]
impl crate::Readable for DATA0_CMB6_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb6::W](W) writer structure"]
impl crate::Writable for DATA0_CMB6_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB6 to value 0"]
impl crate::Resettable for DATA0_CMB6_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb7.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB7` reader"]
pub struct R(crate::R<DATA0_CMB7_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB7_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB7_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB7` writer"]
pub struct W(crate::W<DATA0_CMB7_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB7_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB7_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb7](index.html) module"]
pub struct DATA0_CMB7_SPEC;
impl crate::RegisterSpec for DATA0_CMB7_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb7::R](R) reader structure"]
impl crate::Readable for DATA0_CMB7_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb7::W](W) writer structure"]
impl crate::Writable for DATA0_CMB7_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB7 to value 0"]
impl crate::Resettable for DATA0_CMB7_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb8.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB8` reader"]
pub struct R(crate::R<DATA0_CMB8_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB8_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB8_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB8` writer"]
pub struct W(crate::W<DATA0_CMB8_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB8_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB8_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb8](index.html) module"]
pub struct DATA0_CMB8_SPEC;
impl crate::RegisterSpec for DATA0_CMB8_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb8::R](R) reader structure"]
impl crate::Readable for DATA0_CMB8_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb8::W](W) writer structure"]
impl crate::Writable for DATA0_CMB8_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB8 to value 0"]
impl crate::Resettable for DATA0_CMB8_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_cmb9.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_CMB9` reader"]
pub struct R(crate::R<DATA0_CMB9_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_CMB9_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_CMB9_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_CMB9` writer"]
pub struct W(crate::W<DATA0_CMB9_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_CMB9_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_CMB9_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_cmb9](index.html) module"]
pub struct DATA0_CMB9_SPEC;
impl crate::RegisterSpec for DATA0_CMB9_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_cmb9::R](R) reader structure"]
impl crate::Readable for DATA0_CMB9_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_cmb9::W](W) writer structure"]
impl crate::Writable for DATA0_CMB9_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_CMB9 to value 0"]
impl crate::Resettable for DATA0_CMB9_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data0_hcmb.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA0_HCMB` reader"]
pub struct R(crate::R<DATA0_HCMB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA0_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA0_HCMB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA0_HCMB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA0_HCMB` writer"]
pub struct W(crate::W<DATA0_HCMB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA0_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA0_HCMB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA0_HCMB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE1` reader - Data Byte 1"]
pub struct BYTE1_R(crate::FieldReader<u8, u8>);
impl BYTE1_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE1_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE1` writer - Data Byte 1"]
pub struct BYTE1_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE1_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE2` reader - Data Byte 2"]
pub struct BYTE2_R(crate::FieldReader<u8, u8>);
impl BYTE2_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE2_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE2` writer - Data Byte 2"]
pub struct BYTE2_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE2_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 1"]
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W {
BYTE1_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 2"]
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W {
BYTE2_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data0_hcmb](index.html) module"]
pub struct DATA0_HCMB_SPEC;
impl crate::RegisterSpec for DATA0_HCMB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data0_hcmb::R](R) reader structure"]
impl crate::Readable for DATA0_HCMB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data0_hcmb::W](W) writer structure"]
impl crate::Writable for DATA0_HCMB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA0_HCMB to value 0"]
impl crate::Resettable for DATA0_HCMB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb0.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB0` reader"]
pub struct R(crate::R<DATA1_CMB0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB0` writer"]
pub struct W(crate::W<DATA1_CMB0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb0](index.html) module"]
pub struct DATA1_CMB0_SPEC;
impl crate::RegisterSpec for DATA1_CMB0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb0::R](R) reader structure"]
impl crate::Readable for DATA1_CMB0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb0::W](W) writer structure"]
impl crate::Writable for DATA1_CMB0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB0 to value 0"]
impl crate::Resettable for DATA1_CMB0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb1.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB1` reader"]
pub struct R(crate::R<DATA1_CMB1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB1` writer"]
pub struct W(crate::W<DATA1_CMB1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb1](index.html) module"]
pub struct DATA1_CMB1_SPEC;
impl crate::RegisterSpec for DATA1_CMB1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb1::R](R) reader structure"]
impl crate::Readable for DATA1_CMB1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb1::W](W) writer structure"]
impl crate::Writable for DATA1_CMB1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB1 to value 0"]
impl crate::Resettable for DATA1_CMB1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb10.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB10` reader"]
pub struct R(crate::R<DATA1_CMB10_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB10_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB10_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB10` writer"]
pub struct W(crate::W<DATA1_CMB10_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB10_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB10_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb10](index.html) module"]
pub struct DATA1_CMB10_SPEC;
impl crate::RegisterSpec for DATA1_CMB10_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb10::R](R) reader structure"]
impl crate::Readable for DATA1_CMB10_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb10::W](W) writer structure"]
impl crate::Writable for DATA1_CMB10_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB10 to value 0"]
impl crate::Resettable for DATA1_CMB10_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb11.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB11` reader"]
pub struct R(crate::R<DATA1_CMB11_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB11_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB11_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB11` writer"]
pub struct W(crate::W<DATA1_CMB11_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB11_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB11_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb11](index.html) module"]
pub struct DATA1_CMB11_SPEC;
impl crate::RegisterSpec for DATA1_CMB11_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb11::R](R) reader structure"]
impl crate::Readable for DATA1_CMB11_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb11::W](W) writer structure"]
impl crate::Writable for DATA1_CMB11_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB11 to value 0"]
impl crate::Resettable for DATA1_CMB11_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb12.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB12` reader"]
pub struct R(crate::R<DATA1_CMB12_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB12_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB12_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB12` writer"]
pub struct W(crate::W<DATA1_CMB12_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB12_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB12_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb12](index.html) module"]
pub struct DATA1_CMB12_SPEC;
impl crate::RegisterSpec for DATA1_CMB12_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb12::R](R) reader structure"]
impl crate::Readable for DATA1_CMB12_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb12::W](W) writer structure"]
impl crate::Writable for DATA1_CMB12_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB12 to value 0"]
impl crate::Resettable for DATA1_CMB12_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb13.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB13` reader"]
pub struct R(crate::R<DATA1_CMB13_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB13_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB13_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB13` writer"]
pub struct W(crate::W<DATA1_CMB13_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB13_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB13_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb13](index.html) module"]
pub struct DATA1_CMB13_SPEC;
impl crate::RegisterSpec for DATA1_CMB13_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb13::R](R) reader structure"]
impl crate::Readable for DATA1_CMB13_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb13::W](W) writer structure"]
impl crate::Writable for DATA1_CMB13_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB13 to value 0"]
impl crate::Resettable for DATA1_CMB13_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb14.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB14` reader"]
pub struct R(crate::R<DATA1_CMB14_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB14_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB14_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB14` writer"]
pub struct W(crate::W<DATA1_CMB14_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB14_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB14_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb14](index.html) module"]
pub struct DATA1_CMB14_SPEC;
impl crate::RegisterSpec for DATA1_CMB14_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb14::R](R) reader structure"]
impl crate::Readable for DATA1_CMB14_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb14::W](W) writer structure"]
impl crate::Writable for DATA1_CMB14_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB14 to value 0"]
impl crate::Resettable for DATA1_CMB14_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb2.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB2` reader"]
pub struct R(crate::R<DATA1_CMB2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB2` writer"]
pub struct W(crate::W<DATA1_CMB2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb2](index.html) module"]
pub struct DATA1_CMB2_SPEC;
impl crate::RegisterSpec for DATA1_CMB2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb2::R](R) reader structure"]
impl crate::Readable for DATA1_CMB2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb2::W](W) writer structure"]
impl crate::Writable for DATA1_CMB2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB2 to value 0"]
impl crate::Resettable for DATA1_CMB2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb3.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB3` reader"]
pub struct R(crate::R<DATA1_CMB3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB3` writer"]
pub struct W(crate::W<DATA1_CMB3_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB3_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB3_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb3](index.html) module"]
pub struct DATA1_CMB3_SPEC;
impl crate::RegisterSpec for DATA1_CMB3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb3::R](R) reader structure"]
impl crate::Readable for DATA1_CMB3_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb3::W](W) writer structure"]
impl crate::Writable for DATA1_CMB3_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB3 to value 0"]
impl crate::Resettable for DATA1_CMB3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb4.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB4` reader"]
pub struct R(crate::R<DATA1_CMB4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB4` writer"]
pub struct W(crate::W<DATA1_CMB4_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB4_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB4_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb4](index.html) module"]
pub struct DATA1_CMB4_SPEC;
impl crate::RegisterSpec for DATA1_CMB4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb4::R](R) reader structure"]
impl crate::Readable for DATA1_CMB4_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb4::W](W) writer structure"]
impl crate::Writable for DATA1_CMB4_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB4 to value 0"]
impl crate::Resettable for DATA1_CMB4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb5.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB5` reader"]
pub struct R(crate::R<DATA1_CMB5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB5_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB5` writer"]
pub struct W(crate::W<DATA1_CMB5_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB5_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB5_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb5](index.html) module"]
pub struct DATA1_CMB5_SPEC;
impl crate::RegisterSpec for DATA1_CMB5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb5::R](R) reader structure"]
impl crate::Readable for DATA1_CMB5_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb5::W](W) writer structure"]
impl crate::Writable for DATA1_CMB5_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB5 to value 0"]
impl crate::Resettable for DATA1_CMB5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb6.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB6` reader"]
pub struct R(crate::R<DATA1_CMB6_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB6_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB6_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB6` writer"]
pub struct W(crate::W<DATA1_CMB6_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB6_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB6_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb6](index.html) module"]
pub struct DATA1_CMB6_SPEC;
impl crate::RegisterSpec for DATA1_CMB6_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb6::R](R) reader structure"]
impl crate::Readable for DATA1_CMB6_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb6::W](W) writer structure"]
impl crate::Writable for DATA1_CMB6_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB6 to value 0"]
impl crate::Resettable for DATA1_CMB6_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb7.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB7` reader"]
pub struct R(crate::R<DATA1_CMB7_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB7_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB7_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB7` writer"]
pub struct W(crate::W<DATA1_CMB7_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB7_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB7_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb7](index.html) module"]
pub struct DATA1_CMB7_SPEC;
impl crate::RegisterSpec for DATA1_CMB7_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb7::R](R) reader structure"]
impl crate::Readable for DATA1_CMB7_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb7::W](W) writer structure"]
impl crate::Writable for DATA1_CMB7_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB7 to value 0"]
impl crate::Resettable for DATA1_CMB7_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb8.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB8` reader"]
pub struct R(crate::R<DATA1_CMB8_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB8_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB8_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB8` writer"]
pub struct W(crate::W<DATA1_CMB8_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB8_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB8_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb8](index.html) module"]
pub struct DATA1_CMB8_SPEC;
impl crate::RegisterSpec for DATA1_CMB8_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb8::R](R) reader structure"]
impl crate::Readable for DATA1_CMB8_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb8::W](W) writer structure"]
impl crate::Writable for DATA1_CMB8_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB8 to value 0"]
impl crate::Resettable for DATA1_CMB8_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_cmb9.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_CMB9` reader"]
pub struct R(crate::R<DATA1_CMB9_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_CMB9_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_CMB9_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_CMB9` writer"]
pub struct W(crate::W<DATA1_CMB9_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_CMB9_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_CMB9_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_cmb9](index.html) module"]
pub struct DATA1_CMB9_SPEC;
impl crate::RegisterSpec for DATA1_CMB9_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_cmb9::R](R) reader structure"]
impl crate::Readable for DATA1_CMB9_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_cmb9::W](W) writer structure"]
impl crate::Writable for DATA1_CMB9_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_CMB9 to value 0"]
impl crate::Resettable for DATA1_CMB9_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data1_hcmb.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA1_HCMB` reader"]
pub struct R(crate::R<DATA1_HCMB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA1_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA1_HCMB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA1_HCMB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA1_HCMB` writer"]
pub struct W(crate::W<DATA1_HCMB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA1_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA1_HCMB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA1_HCMB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE3` reader - Data Byte 3"]
pub struct BYTE3_R(crate::FieldReader<u8, u8>);
impl BYTE3_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE3_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE3` writer - Data Byte 3"]
pub struct BYTE3_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE3_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE4` reader - Data Byte 4"]
pub struct BYTE4_R(crate::FieldReader<u8, u8>);
impl BYTE4_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE4_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE4` writer - Data Byte 4"]
pub struct BYTE4_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE4_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&self) -> BYTE4_R {
BYTE4_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 3"]
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W {
BYTE3_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 4"]
#[inline(always)]
pub fn byte4(&mut self) -> BYTE4_W {
BYTE4_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data1_hcmb](index.html) module"]
pub struct DATA1_HCMB_SPEC;
impl crate::RegisterSpec for DATA1_HCMB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data1_hcmb::R](R) reader structure"]
impl crate::Readable for DATA1_HCMB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data1_hcmb::W](W) writer structure"]
impl crate::Writable for DATA1_HCMB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA1_HCMB to value 0"]
impl crate::Resettable for DATA1_HCMB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb0.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB0` reader"]
pub struct R(crate::R<DATA2_CMB0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB0` writer"]
pub struct W(crate::W<DATA2_CMB0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb0](index.html) module"]
pub struct DATA2_CMB0_SPEC;
impl crate::RegisterSpec for DATA2_CMB0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb0::R](R) reader structure"]
impl crate::Readable for DATA2_CMB0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb0::W](W) writer structure"]
impl crate::Writable for DATA2_CMB0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB0 to value 0"]
impl crate::Resettable for DATA2_CMB0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb1.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB1` reader"]
pub struct R(crate::R<DATA2_CMB1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB1` writer"]
pub struct W(crate::W<DATA2_CMB1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb1](index.html) module"]
pub struct DATA2_CMB1_SPEC;
impl crate::RegisterSpec for DATA2_CMB1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb1::R](R) reader structure"]
impl crate::Readable for DATA2_CMB1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb1::W](W) writer structure"]
impl crate::Writable for DATA2_CMB1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB1 to value 0"]
impl crate::Resettable for DATA2_CMB1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb10.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB10` reader"]
pub struct R(crate::R<DATA2_CMB10_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB10_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB10_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB10` writer"]
pub struct W(crate::W<DATA2_CMB10_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB10_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB10_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb10](index.html) module"]
pub struct DATA2_CMB10_SPEC;
impl crate::RegisterSpec for DATA2_CMB10_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb10::R](R) reader structure"]
impl crate::Readable for DATA2_CMB10_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb10::W](W) writer structure"]
impl crate::Writable for DATA2_CMB10_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB10 to value 0"]
impl crate::Resettable for DATA2_CMB10_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb11.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB11` reader"]
pub struct R(crate::R<DATA2_CMB11_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB11_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB11_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB11` writer"]
pub struct W(crate::W<DATA2_CMB11_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB11_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB11_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb11](index.html) module"]
pub struct DATA2_CMB11_SPEC;
impl crate::RegisterSpec for DATA2_CMB11_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb11::R](R) reader structure"]
impl crate::Readable for DATA2_CMB11_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb11::W](W) writer structure"]
impl crate::Writable for DATA2_CMB11_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB11 to value 0"]
impl crate::Resettable for DATA2_CMB11_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb12.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB12` reader"]
pub struct R(crate::R<DATA2_CMB12_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB12_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB12_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB12` writer"]
pub struct W(crate::W<DATA2_CMB12_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB12_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB12_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb12](index.html) module"]
pub struct DATA2_CMB12_SPEC;
impl crate::RegisterSpec for DATA2_CMB12_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb12::R](R) reader structure"]
impl crate::Readable for DATA2_CMB12_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb12::W](W) writer structure"]
impl crate::Writable for DATA2_CMB12_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB12 to value 0"]
impl crate::Resettable for DATA2_CMB12_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb13.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB13` reader"]
pub struct R(crate::R<DATA2_CMB13_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB13_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB13_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB13` writer"]
pub struct W(crate::W<DATA2_CMB13_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB13_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB13_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb13](index.html) module"]
pub struct DATA2_CMB13_SPEC;
impl crate::RegisterSpec for DATA2_CMB13_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb13::R](R) reader structure"]
impl crate::Readable for DATA2_CMB13_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb13::W](W) writer structure"]
impl crate::Writable for DATA2_CMB13_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB13 to value 0"]
impl crate::Resettable for DATA2_CMB13_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb14.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB14` reader"]
pub struct R(crate::R<DATA2_CMB14_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB14_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB14_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB14` writer"]
pub struct W(crate::W<DATA2_CMB14_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB14_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB14_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb14](index.html) module"]
pub struct DATA2_CMB14_SPEC;
impl crate::RegisterSpec for DATA2_CMB14_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb14::R](R) reader structure"]
impl crate::Readable for DATA2_CMB14_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb14::W](W) writer structure"]
impl crate::Writable for DATA2_CMB14_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB14 to value 0"]
impl crate::Resettable for DATA2_CMB14_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb2.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB2` reader"]
pub struct R(crate::R<DATA2_CMB2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB2` writer"]
pub struct W(crate::W<DATA2_CMB2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb2](index.html) module"]
pub struct DATA2_CMB2_SPEC;
impl crate::RegisterSpec for DATA2_CMB2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb2::R](R) reader structure"]
impl crate::Readable for DATA2_CMB2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb2::W](W) writer structure"]
impl crate::Writable for DATA2_CMB2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB2 to value 0"]
impl crate::Resettable for DATA2_CMB2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb3.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB3` reader"]
pub struct R(crate::R<DATA2_CMB3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB3` writer"]
pub struct W(crate::W<DATA2_CMB3_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB3_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB3_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb3](index.html) module"]
pub struct DATA2_CMB3_SPEC;
impl crate::RegisterSpec for DATA2_CMB3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb3::R](R) reader structure"]
impl crate::Readable for DATA2_CMB3_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb3::W](W) writer structure"]
impl crate::Writable for DATA2_CMB3_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB3 to value 0"]
impl crate::Resettable for DATA2_CMB3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb4.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB4` reader"]
pub struct R(crate::R<DATA2_CMB4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB4` writer"]
pub struct W(crate::W<DATA2_CMB4_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB4_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB4_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb4](index.html) module"]
pub struct DATA2_CMB4_SPEC;
impl crate::RegisterSpec for DATA2_CMB4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb4::R](R) reader structure"]
impl crate::Readable for DATA2_CMB4_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb4::W](W) writer structure"]
impl crate::Writable for DATA2_CMB4_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB4 to value 0"]
impl crate::Resettable for DATA2_CMB4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb5.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB5` reader"]
pub struct R(crate::R<DATA2_CMB5_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB5_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB5_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB5` writer"]
pub struct W(crate::W<DATA2_CMB5_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB5_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB5_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB5_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb5](index.html) module"]
pub struct DATA2_CMB5_SPEC;
impl crate::RegisterSpec for DATA2_CMB5_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb5::R](R) reader structure"]
impl crate::Readable for DATA2_CMB5_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb5::W](W) writer structure"]
impl crate::Writable for DATA2_CMB5_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB5 to value 0"]
impl crate::Resettable for DATA2_CMB5_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb6.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB6` reader"]
pub struct R(crate::R<DATA2_CMB6_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB6_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB6_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB6` writer"]
pub struct W(crate::W<DATA2_CMB6_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB6_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB6_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB6_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb6](index.html) module"]
pub struct DATA2_CMB6_SPEC;
impl crate::RegisterSpec for DATA2_CMB6_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb6::R](R) reader structure"]
impl crate::Readable for DATA2_CMB6_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb6::W](W) writer structure"]
impl crate::Writable for DATA2_CMB6_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB6 to value 0"]
impl crate::Resettable for DATA2_CMB6_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb7.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB7` reader"]
pub struct R(crate::R<DATA2_CMB7_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB7_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB7_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB7` writer"]
pub struct W(crate::W<DATA2_CMB7_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB7_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB7_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB7_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb7](index.html) module"]
pub struct DATA2_CMB7_SPEC;
impl crate::RegisterSpec for DATA2_CMB7_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb7::R](R) reader structure"]
impl crate::Readable for DATA2_CMB7_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb7::W](W) writer structure"]
impl crate::Writable for DATA2_CMB7_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB7 to value 0"]
impl crate::Resettable for DATA2_CMB7_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb8.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB8` reader"]
pub struct R(crate::R<DATA2_CMB8_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB8_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB8_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB8` writer"]
pub struct W(crate::W<DATA2_CMB8_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB8_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB8_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb8](index.html) module"]
pub struct DATA2_CMB8_SPEC;
impl crate::RegisterSpec for DATA2_CMB8_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb8::R](R) reader structure"]
impl crate::Readable for DATA2_CMB8_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb8::W](W) writer structure"]
impl crate::Writable for DATA2_CMB8_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB8 to value 0"]
impl crate::Resettable for DATA2_CMB8_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_cmb9.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_CMB9` reader"]
pub struct R(crate::R<DATA2_CMB9_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_CMB9_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_CMB9_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_CMB9` writer"]
pub struct W(crate::W<DATA2_CMB9_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_CMB9_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_CMB9_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_CMB9_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_cmb9](index.html) module"]
pub struct DATA2_CMB9_SPEC;
impl crate::RegisterSpec for DATA2_CMB9_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_cmb9::R](R) reader structure"]
impl crate::Readable for DATA2_CMB9_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_cmb9::W](W) writer structure"]
impl crate::Writable for DATA2_CMB9_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_CMB9 to value 0"]
impl crate::Resettable for DATA2_CMB9_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data2_hcmb.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA2_HCMB` reader"]
pub struct R(crate::R<DATA2_HCMB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA2_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA2_HCMB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA2_HCMB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA2_HCMB` writer"]
pub struct W(crate::W<DATA2_HCMB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA2_HCMB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA2_HCMB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA2_HCMB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE5` reader - Data Byte 5"]
pub struct BYTE5_R(crate::FieldReader<u8, u8>);
impl BYTE5_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE5_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE5_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE5` writer - Data Byte 5"]
pub struct BYTE5_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE5_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE6` reader - Data Byte 6"]
pub struct BYTE6_R(crate::FieldReader<u8, u8>);
impl BYTE6_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE6_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE6_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE6` writer - Data Byte 6"]
pub struct BYTE6_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE6_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&self) -> BYTE5_R {
BYTE5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&self) -> BYTE6_R {
BYTE6_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 5"]
#[inline(always)]
pub fn byte5(&mut self) -> BYTE5_W {
BYTE5_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 6"]
#[inline(always)]
pub fn byte6(&mut self) -> BYTE6_W {
BYTE6_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data2_hcmb](index.html) module"]
pub struct DATA2_HCMB_SPEC;
impl crate::RegisterSpec for DATA2_HCMB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data2_hcmb::R](R) reader structure"]
impl crate::Readable for DATA2_HCMB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data2_hcmb::W](W) writer structure"]
impl crate::Writable for DATA2_HCMB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA2_HCMB to value 0"]
impl crate::Resettable for DATA2_HCMB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb0.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB0` reader"]
pub struct R(crate::R<DATA3_CMB0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB0` writer"]
pub struct W(crate::W<DATA3_CMB0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb0](index.html) module"]
pub struct DATA3_CMB0_SPEC;
impl crate::RegisterSpec for DATA3_CMB0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb0::R](R) reader structure"]
impl crate::Readable for DATA3_CMB0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb0::W](W) writer structure"]
impl crate::Writable for DATA3_CMB0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB0 to value 0"]
impl crate::Resettable for DATA3_CMB0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb1.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB1` reader"]
pub struct R(crate::R<DATA3_CMB1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB1` writer"]
pub struct W(crate::W<DATA3_CMB1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb1](index.html) module"]
pub struct DATA3_CMB1_SPEC;
impl crate::RegisterSpec for DATA3_CMB1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb1::R](R) reader structure"]
impl crate::Readable for DATA3_CMB1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb1::W](W) writer structure"]
impl crate::Writable for DATA3_CMB1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB1 to value 0"]
impl crate::Resettable for DATA3_CMB1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb10.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB10` reader"]
pub struct R(crate::R<DATA3_CMB10_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB10_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB10_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB10` writer"]
pub struct W(crate::W<DATA3_CMB10_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB10_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB10_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB10_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb10](index.html) module"]
pub struct DATA3_CMB10_SPEC;
impl crate::RegisterSpec for DATA3_CMB10_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb10::R](R) reader structure"]
impl crate::Readable for DATA3_CMB10_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb10::W](W) writer structure"]
impl crate::Writable for DATA3_CMB10_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB10 to value 0"]
impl crate::Resettable for DATA3_CMB10_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb11.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB11` reader"]
pub struct R(crate::R<DATA3_CMB11_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB11_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB11_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB11` writer"]
pub struct W(crate::W<DATA3_CMB11_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB11_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB11_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB11_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb11](index.html) module"]
pub struct DATA3_CMB11_SPEC;
impl crate::RegisterSpec for DATA3_CMB11_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb11::R](R) reader structure"]
impl crate::Readable for DATA3_CMB11_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb11::W](W) writer structure"]
impl crate::Writable for DATA3_CMB11_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB11 to value 0"]
impl crate::Resettable for DATA3_CMB11_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb12.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB12` reader"]
pub struct R(crate::R<DATA3_CMB12_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB12_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB12_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB12` writer"]
pub struct W(crate::W<DATA3_CMB12_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB12_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB12_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB12_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb12](index.html) module"]
pub struct DATA3_CMB12_SPEC;
impl crate::RegisterSpec for DATA3_CMB12_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb12::R](R) reader structure"]
impl crate::Readable for DATA3_CMB12_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb12::W](W) writer structure"]
impl crate::Writable for DATA3_CMB12_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB12 to value 0"]
impl crate::Resettable for DATA3_CMB12_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb13.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB13` reader"]
pub struct R(crate::R<DATA3_CMB13_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB13_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB13_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB13` writer"]
pub struct W(crate::W<DATA3_CMB13_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB13_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB13_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB13_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb13](index.html) module"]
pub struct DATA3_CMB13_SPEC;
impl crate::RegisterSpec for DATA3_CMB13_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb13::R](R) reader structure"]
impl crate::Readable for DATA3_CMB13_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb13::W](W) writer structure"]
impl crate::Writable for DATA3_CMB13_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB13 to value 0"]
impl crate::Resettable for DATA3_CMB13_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb14.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB14` reader"]
pub struct R(crate::R<DATA3_CMB14_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB14_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB14_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB14` writer"]
pub struct W(crate::W<DATA3_CMB14_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB14_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB14_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB14_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb14](index.html) module"]
pub struct DATA3_CMB14_SPEC;
impl crate::RegisterSpec for DATA3_CMB14_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb14::R](R) reader structure"]
impl crate::Readable for DATA3_CMB14_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb14::W](W) writer structure"]
impl crate::Writable for DATA3_CMB14_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB14 to value 0"]
impl crate::Resettable for DATA3_CMB14_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

140
src/can0/data3_cmb2.rs Normal file
View File

@ -0,0 +1,140 @@
#[doc = "Register `DATA3_CMB2` reader"]
pub struct R(crate::R<DATA3_CMB2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATA3_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATA3_CMB2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATA3_CMB2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATA3_CMB2` writer"]
pub struct W(crate::W<DATA3_CMB2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATA3_CMB2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATA3_CMB2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATA3_CMB2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BYTE7` reader - Data Byte 7"]
pub struct BYTE7_R(crate::FieldReader<u8, u8>);
impl BYTE7_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE7_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE7_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE7` writer - Data Byte 7"]
pub struct BYTE7_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE7_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8);
self.w
}
}
#[doc = "Field `BYTE8` reader - Data Byte 8"]
pub struct BYTE8_R(crate::FieldReader<u8, u8>);
impl BYTE8_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
BYTE8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BYTE8_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BYTE8` writer - Data Byte 8"]
pub struct BYTE8_W<'a> {
w: &'a mut W,
}
impl<'a> BYTE8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
self.w
}
}
impl R {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&self) -> BYTE7_R {
BYTE7_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&self) -> BYTE8_R {
BYTE8_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 8:15 - Data Byte 7"]
#[inline(always)]
pub fn byte7(&mut self) -> BYTE7_W {
BYTE7_W { w: self }
}
#[doc = "Bits 0:7 - Data Byte 8"]
#[inline(always)]
pub fn byte8(&mut self) -> BYTE8_W {
BYTE8_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CAN Frame Data Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data3_cmb2](index.html) module"]
pub struct DATA3_CMB2_SPEC;
impl crate::RegisterSpec for DATA3_CMB2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [data3_cmb2::R](R) reader structure"]
impl crate::Readable for DATA3_CMB2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data3_cmb2::W](W) writer structure"]
impl crate::Writable for DATA3_CMB2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATA3_CMB2 to value 0"]
impl crate::Resettable for DATA3_CMB2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}

Some files were not shown because too many files have changed in this diff Show More