commit
9b1d333f41
@ -0,0 +1,2 @@
|
||||
/target
|
||||
Cargo.lock
|
||||
@ -0,0 +1,9 @@
|
||||
[package]
|
||||
authors = ["gnxlxnxx <gnxlxnxx@web.de>"]
|
||||
edition = "2018"
|
||||
name = "psoc4-pac"
|
||||
version = "0.1.0"
|
||||
[dependencies]
|
||||
bare-metal = "*"
|
||||
cortex-m = "*"
|
||||
vcell = "*"
|
||||
@ -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");
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
# TODO: You currently need the unreleased version of svd2rust from git for this to work:
|
||||
# i.e. cargo install --git https://github.com/rust-embedded/svd2rust.git --force svd2rust
|
||||
svd2rust -i svd/psoc4.svd
|
||||
rm -rf src
|
||||
form -i lib.rs -o src/ && rm lib.rs
|
||||
cargo fmt
|
||||
@ -0,0 +1,101 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Interrupt Status"]
|
||||
pub int_status: crate::Reg<int_status::INT_STATUS_SPEC>,
|
||||
#[doc = "0x04 - Interrupt Enable"]
|
||||
pub int_ebl: crate::Reg<int_ebl::INT_EBL_SPEC>,
|
||||
#[doc = "0x08 - RxMessage and TxMessage Buffer Status"]
|
||||
pub buffer_status: crate::Reg<buffer_status::BUFFER_STATUS_SPEC>,
|
||||
#[doc = "0x0c - CAN Error Status"]
|
||||
pub error_status: crate::Reg<error_status::ERROR_STATUS_SPEC>,
|
||||
#[doc = "0x10 - CAN Command Register"]
|
||||
pub command: crate::Reg<command::COMMAND_SPEC>,
|
||||
#[doc = "0x14 - CAN Configuration"]
|
||||
pub config: crate::Reg<config::CONFIG_SPEC>,
|
||||
#[doc = "0x18 - Error Capture Register"]
|
||||
pub ecr: crate::Reg<ecr::ECR_SPEC>,
|
||||
_reserved7: [u8; 996usize],
|
||||
#[doc = "0x400 - Control"]
|
||||
pub cntl: crate::Reg<cntl::CNTL_SPEC>,
|
||||
#[doc = "0x404 - TTCAN Level1 16-Bit local time counter"]
|
||||
pub ttcan_counter: crate::Reg<ttcan_counter::TTCAN_COUNTER_SPEC>,
|
||||
#[doc = "0x408 - TTCAN Level1 compare configuration"]
|
||||
pub ttcan_compare: crate::Reg<ttcan_compare::TTCAN_COMPARE_SPEC>,
|
||||
#[doc = "0x40c - TTCAN Level1 capture configuration"]
|
||||
pub ttcan_capture: crate::Reg<ttcan_capture::TTCAN_CAPTURE_SPEC>,
|
||||
#[doc = "0x410 - TTCAN Level1 timing configuration, duplicate of CONFIG fields"]
|
||||
pub ttcan_timing: crate::Reg<ttcan_timing::TTCAN_TIMING_SPEC>,
|
||||
#[doc = "0x414 - CAN Interrupt Cause (TTCAN + INT_STATUS Or)"]
|
||||
pub intr_can: crate::Reg<intr_can::INTR_CAN_SPEC>,
|
||||
#[doc = "0x418 - CAN Interrupt Set (TTCAN + INT_STATUS Or)"]
|
||||
pub intr_can_set: crate::Reg<intr_can_set::INTR_CAN_SET_SPEC>,
|
||||
#[doc = "0x41c - CAN Interrupt Mask (TTCAN + INT_STATUS Or)"]
|
||||
pub intr_can_mask: crate::Reg<intr_can_mask::INTR_CAN_MASK_SPEC>,
|
||||
#[doc = "0x420 - Can Interrupt Masked (TTCAN + INT_STATUS Or)"]
|
||||
pub intr_can_masked: crate::Reg<intr_can_masked::INTR_CAN_MASKED_SPEC>,
|
||||
}
|
||||
#[doc = "INT_STATUS register accessor: an alias for `Reg<INT_STATUS_SPEC>`"]
|
||||
pub type INT_STATUS = crate::Reg<int_status::INT_STATUS_SPEC>;
|
||||
#[doc = "Interrupt Status"]
|
||||
pub mod int_status;
|
||||
#[doc = "INT_EBL register accessor: an alias for `Reg<INT_EBL_SPEC>`"]
|
||||
pub type INT_EBL = crate::Reg<int_ebl::INT_EBL_SPEC>;
|
||||
#[doc = "Interrupt Enable"]
|
||||
pub mod int_ebl;
|
||||
#[doc = "BUFFER_STATUS register accessor: an alias for `Reg<BUFFER_STATUS_SPEC>`"]
|
||||
pub type BUFFER_STATUS = crate::Reg<buffer_status::BUFFER_STATUS_SPEC>;
|
||||
#[doc = "RxMessage and TxMessage Buffer Status"]
|
||||
pub mod buffer_status;
|
||||
#[doc = "ERROR_STATUS register accessor: an alias for `Reg<ERROR_STATUS_SPEC>`"]
|
||||
pub type ERROR_STATUS = crate::Reg<error_status::ERROR_STATUS_SPEC>;
|
||||
#[doc = "CAN Error Status"]
|
||||
pub mod error_status;
|
||||
#[doc = "COMMAND register accessor: an alias for `Reg<COMMAND_SPEC>`"]
|
||||
pub type COMMAND = crate::Reg<command::COMMAND_SPEC>;
|
||||
#[doc = "CAN Command Register"]
|
||||
pub mod command;
|
||||
#[doc = "CONFIG register accessor: an alias for `Reg<CONFIG_SPEC>`"]
|
||||
pub type CONFIG = crate::Reg<config::CONFIG_SPEC>;
|
||||
#[doc = "CAN Configuration"]
|
||||
pub mod config;
|
||||
#[doc = "ECR register accessor: an alias for `Reg<ECR_SPEC>`"]
|
||||
pub type ECR = crate::Reg<ecr::ECR_SPEC>;
|
||||
#[doc = "Error Capture Register"]
|
||||
pub mod ecr;
|
||||
#[doc = "CNTL register accessor: an alias for `Reg<CNTL_SPEC>`"]
|
||||
pub type CNTL = crate::Reg<cntl::CNTL_SPEC>;
|
||||
#[doc = "Control"]
|
||||
pub mod cntl;
|
||||
#[doc = "TTCAN_COUNTER register accessor: an alias for `Reg<TTCAN_COUNTER_SPEC>`"]
|
||||
pub type TTCAN_COUNTER = crate::Reg<ttcan_counter::TTCAN_COUNTER_SPEC>;
|
||||
#[doc = "TTCAN Level1 16-Bit local time counter"]
|
||||
pub mod ttcan_counter;
|
||||
#[doc = "TTCAN_COMPARE register accessor: an alias for `Reg<TTCAN_COMPARE_SPEC>`"]
|
||||
pub type TTCAN_COMPARE = crate::Reg<ttcan_compare::TTCAN_COMPARE_SPEC>;
|
||||
#[doc = "TTCAN Level1 compare configuration"]
|
||||
pub mod ttcan_compare;
|
||||
#[doc = "TTCAN_CAPTURE register accessor: an alias for `Reg<TTCAN_CAPTURE_SPEC>`"]
|
||||
pub type TTCAN_CAPTURE = crate::Reg<ttcan_capture::TTCAN_CAPTURE_SPEC>;
|
||||
#[doc = "TTCAN Level1 capture configuration"]
|
||||
pub mod ttcan_capture;
|
||||
#[doc = "TTCAN_TIMING register accessor: an alias for `Reg<TTCAN_TIMING_SPEC>`"]
|
||||
pub type TTCAN_TIMING = crate::Reg<ttcan_timing::TTCAN_TIMING_SPEC>;
|
||||
#[doc = "TTCAN Level1 timing configuration, duplicate of CONFIG fields"]
|
||||
pub mod ttcan_timing;
|
||||
#[doc = "INTR_CAN register accessor: an alias for `Reg<INTR_CAN_SPEC>`"]
|
||||
pub type INTR_CAN = crate::Reg<intr_can::INTR_CAN_SPEC>;
|
||||
#[doc = "CAN Interrupt Cause (TTCAN + INT_STATUS Or)"]
|
||||
pub mod intr_can;
|
||||
#[doc = "INTR_CAN_SET register accessor: an alias for `Reg<INTR_CAN_SET_SPEC>`"]
|
||||
pub type INTR_CAN_SET = crate::Reg<intr_can_set::INTR_CAN_SET_SPEC>;
|
||||
#[doc = "CAN Interrupt Set (TTCAN + INT_STATUS Or)"]
|
||||
pub mod intr_can_set;
|
||||
#[doc = "INTR_CAN_MASK register accessor: an alias for `Reg<INTR_CAN_MASK_SPEC>`"]
|
||||
pub type INTR_CAN_MASK = crate::Reg<intr_can_mask::INTR_CAN_MASK_SPEC>;
|
||||
#[doc = "CAN Interrupt Mask (TTCAN + INT_STATUS Or)"]
|
||||
pub mod intr_can_mask;
|
||||
#[doc = "INTR_CAN_MASKED register accessor: an alias for `Reg<INTR_CAN_MASKED_SPEC>`"]
|
||||
pub type INTR_CAN_MASKED = crate::Reg<intr_can_masked::INTR_CAN_MASKED_SPEC>;
|
||||
#[doc = "Can Interrupt Masked (TTCAN + INT_STATUS Or)"]
|
||||
pub mod intr_can_masked;
|
||||
@ -0,0 +1,519 @@
|
||||
#[doc = "Register `BUFFER_STATUS` reader"]
|
||||
pub struct R(crate::R<BUFFER_STATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<BUFFER_STATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<BUFFER_STATUS_SPEC>> for R {
|
||||
fn from(reader: crate::R<BUFFER_STATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `BUFFER_STATUS` writer"]
|
||||
pub struct W(crate::W<BUFFER_STATUS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<BUFFER_STATUS_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 core::convert::From<crate::W<BUFFER_STATUS_SPEC>> for W {
|
||||
fn from(writer: crate::W<BUFFER_STATUS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX0_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX0_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX0_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX0_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX0_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX1_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX1_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX1_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX1_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX1_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX2_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX2_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX2_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX2_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX2_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX3_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX3_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX3_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX3_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX3_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX4_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX4_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX4_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX4_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX4_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX5_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX5_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX5_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX5_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX5_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX6_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX6_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX6_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX6_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX6_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX7_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX7_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX7_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX7_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX7_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX8_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX8_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX8_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX8_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX8_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX9_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX9_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX9_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX9_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX9_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX10_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX10_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX10_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX10_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX10_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX11_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX11_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX11_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX11_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX11_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX12_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX12_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX12_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX12_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX12_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX13_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX13_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX13_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX13_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX13_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX14_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX14_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX14_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX14_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX14_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX15_MSG_AV` reader - RxMessage Buffer Status"]
|
||||
pub struct RX15_MSG_AV_R(crate::FieldReader<bool, bool>);
|
||||
impl RX15_MSG_AV_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX15_MSG_AV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX15_MSG_AV_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX0_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX0_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX0_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX0_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX0_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX1_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX1_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX1_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX1_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX1_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX2_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX2_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX2_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX2_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX2_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX3_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX3_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX3_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX3_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX3_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX4_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX4_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX4_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX4_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX4_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX5_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX5_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX5_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX5_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX5_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX6_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX6_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX6_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX6_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX6_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX7_REQ_PEND` reader - TxMessage Buffer Status"]
|
||||
pub struct TX7_REQ_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl TX7_REQ_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX7_REQ_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX7_REQ_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx0_msg_av(&self) -> RX0_MSG_AV_R {
|
||||
RX0_MSG_AV_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx1_msg_av(&self) -> RX1_MSG_AV_R {
|
||||
RX1_MSG_AV_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx2_msg_av(&self) -> RX2_MSG_AV_R {
|
||||
RX2_MSG_AV_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx3_msg_av(&self) -> RX3_MSG_AV_R {
|
||||
RX3_MSG_AV_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx4_msg_av(&self) -> RX4_MSG_AV_R {
|
||||
RX4_MSG_AV_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx5_msg_av(&self) -> RX5_MSG_AV_R {
|
||||
RX5_MSG_AV_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx6_msg_av(&self) -> RX6_MSG_AV_R {
|
||||
RX6_MSG_AV_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx7_msg_av(&self) -> RX7_MSG_AV_R {
|
||||
RX7_MSG_AV_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx8_msg_av(&self) -> RX8_MSG_AV_R {
|
||||
RX8_MSG_AV_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx9_msg_av(&self) -> RX9_MSG_AV_R {
|
||||
RX9_MSG_AV_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx10_msg_av(&self) -> RX10_MSG_AV_R {
|
||||
RX10_MSG_AV_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx11_msg_av(&self) -> RX11_MSG_AV_R {
|
||||
RX11_MSG_AV_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx12_msg_av(&self) -> RX12_MSG_AV_R {
|
||||
RX12_MSG_AV_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx13_msg_av(&self) -> RX13_MSG_AV_R {
|
||||
RX13_MSG_AV_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx14_msg_av(&self) -> RX14_MSG_AV_R {
|
||||
RX14_MSG_AV_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn rx15_msg_av(&self) -> RX15_MSG_AV_R {
|
||||
RX15_MSG_AV_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx0_req_pend(&self) -> TX0_REQ_PEND_R {
|
||||
TX0_REQ_PEND_R::new(((self.bits >> 16) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 17 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx1_req_pend(&self) -> TX1_REQ_PEND_R {
|
||||
TX1_REQ_PEND_R::new(((self.bits >> 17) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 18 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx2_req_pend(&self) -> TX2_REQ_PEND_R {
|
||||
TX2_REQ_PEND_R::new(((self.bits >> 18) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 19 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx3_req_pend(&self) -> TX3_REQ_PEND_R {
|
||||
TX3_REQ_PEND_R::new(((self.bits >> 19) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 20 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx4_req_pend(&self) -> TX4_REQ_PEND_R {
|
||||
TX4_REQ_PEND_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx5_req_pend(&self) -> TX5_REQ_PEND_R {
|
||||
TX5_REQ_PEND_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 22 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx6_req_pend(&self) -> TX6_REQ_PEND_R {
|
||||
TX6_REQ_PEND_R::new(((self.bits >> 22) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - TxMessage Buffer Status"]
|
||||
#[inline(always)]
|
||||
pub fn tx7_req_pend(&self) -> TX7_REQ_PEND_R {
|
||||
TX7_REQ_PEND_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage and TxMessage Buffer Status\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 [buffer_status](index.html) module"]
|
||||
pub struct BUFFER_STATUS_SPEC;
|
||||
impl crate::RegisterSpec for BUFFER_STATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [buffer_status::R](R) reader structure"]
|
||||
impl crate::Readable for BUFFER_STATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [buffer_status::W](W) writer structure"]
|
||||
impl crate::Writable for BUFFER_STATUS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets BUFFER_STATUS to value 0"]
|
||||
impl crate::Resettable for BUFFER_STATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,159 @@
|
||||
#[doc = "Register `CNTL` reader"]
|
||||
pub struct R(crate::R<CNTL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CNTL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CNTL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CNTL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CNTL` writer"]
|
||||
pub struct W(crate::W<CNTL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CNTL_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 core::convert::From<crate::W<CNTL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CNTL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_ENABLE` reader - TTCAN enable/disable?0=TTCAN is disabled; Interrupt_can is sourced from 3PIP.? INT_EBL.GLOBAL_INT_ENBL & (INT_EBL\\[i\\]
|
||||
& INT_STATUS\\[i\\])?1=TTCAN is enabled; Interrupt_can is sourced from INTR_CAN_MASKED."]
|
||||
pub struct TT_ENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl TT_ENABLE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TT_ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TT_ENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_ENABLE` writer - TTCAN enable/disable?0=TTCAN is disabled; Interrupt_can is sourced from 3PIP.? INT_EBL.GLOBAL_INT_ENBL & (INT_EBL\\[i\\]
|
||||
& INT_STATUS\\[i\\])?1=TTCAN is enabled; Interrupt_can is sourced from INTR_CAN_MASKED."]
|
||||
pub struct TT_ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_ENABLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IP_ENABLE` reader - IP Enable/Disable?0=IP is disabled/reset?1=IP is enabled/running"]
|
||||
pub struct IP_ENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IP_ENABLE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IP_ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IP_ENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IP_ENABLE` writer - IP Enable/Disable?0=IP is disabled/reset?1=IP is enabled/running"]
|
||||
pub struct IP_ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IP_ENABLE_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 << 31)) | ((value as u32 & 0x01) << 31);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - TTCAN enable/disable?0=TTCAN is disabled; Interrupt_can is sourced from 3PIP.? INT_EBL.GLOBAL_INT_ENBL & (INT_EBL\\[i\\]
|
||||
& INT_STATUS\\[i\\])?1=TTCAN is enabled; Interrupt_can is sourced from INTR_CAN_MASKED."]
|
||||
#[inline(always)]
|
||||
pub fn tt_enable(&self) -> TT_ENABLE_R {
|
||||
TT_ENABLE_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 31 - IP Enable/Disable?0=IP is disabled/reset?1=IP is enabled/running"]
|
||||
#[inline(always)]
|
||||
pub fn ip_enable(&self) -> IP_ENABLE_R {
|
||||
IP_ENABLE_R::new(((self.bits >> 31) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - TTCAN enable/disable?0=TTCAN is disabled; Interrupt_can is sourced from 3PIP.? INT_EBL.GLOBAL_INT_ENBL & (INT_EBL\\[i\\]
|
||||
& INT_STATUS\\[i\\])?1=TTCAN is enabled; Interrupt_can is sourced from INTR_CAN_MASKED."]
|
||||
#[inline(always)]
|
||||
pub fn tt_enable(&mut self) -> TT_ENABLE_W {
|
||||
TT_ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 31 - IP Enable/Disable?0=IP is disabled/reset?1=IP is enabled/running"]
|
||||
#[inline(always)]
|
||||
pub fn ip_enable(&mut self) -> IP_ENABLE_W {
|
||||
IP_ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Control\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 [cntl](index.html) module"]
|
||||
pub struct CNTL_SPEC;
|
||||
impl crate::RegisterSpec for CNTL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [cntl::R](R) reader structure"]
|
||||
impl crate::Readable for CNTL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [cntl::W](W) writer structure"]
|
||||
impl crate::Writable for CNTL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CNTL to value 0"]
|
||||
impl crate::Resettable for CNTL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,304 @@
|
||||
#[doc = "Register `COMMAND` reader"]
|
||||
pub struct R(crate::R<COMMAND_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<COMMAND_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<COMMAND_SPEC>> for R {
|
||||
fn from(reader: crate::R<COMMAND_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `COMMAND` writer"]
|
||||
pub struct W(crate::W<COMMAND_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<COMMAND_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 core::convert::From<crate::W<COMMAND_SPEC>> for W {
|
||||
fn from(writer: crate::W<COMMAND_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RUN` reader - Run/Stop mode:?\"0\": Sets the CAN controller into stop mode.?Stop mode can be granted only in \"bus idle\" field?Returns \"0\" when stopped.?\"1\": Sets the CAN controller into run mode.?Returns \"1\" when running."]
|
||||
pub struct RUN_R(crate::FieldReader<bool, bool>);
|
||||
impl RUN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RUN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RUN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RUN` writer - Run/Stop mode:?\"0\": Sets the CAN controller into stop mode.?Stop mode can be granted only in \"bus idle\" field?Returns \"0\" when stopped.?\"1\": Sets the CAN controller into run mode.?Returns \"1\" when running."]
|
||||
pub struct RUN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RUN_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LISTEN` reader - TEST_MODE\\[1\\]"]
|
||||
pub struct LISTEN_R(crate::FieldReader<bool, bool>);
|
||||
impl LISTEN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LISTEN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LISTEN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LISTEN` writer - TEST_MODE\\[1\\]"]
|
||||
pub struct LISTEN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LISTEN_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 `LOOPBACK_TEST` reader - TEST_MODE\\[2\\].?With TEST_MODE\\[2:1\\],?00: normal operation?01: Listen-only mode,? The output is held at \"R\" level. The CANmodule-III is only listening.?10: external loopback mode?11: internal loopback mode"]
|
||||
pub struct LOOPBACK_TEST_R(crate::FieldReader<bool, bool>);
|
||||
impl LOOPBACK_TEST_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LOOPBACK_TEST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LOOPBACK_TEST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACK_TEST` writer - TEST_MODE\\[2\\].?With TEST_MODE\\[2:1\\],?00: normal operation?01: Listen-only mode,? The output is held at \"R\" level. The CANmodule-III is only listening.?10: external loopback mode?11: internal loopback mode"]
|
||||
pub struct LOOPBACK_TEST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LOOPBACK_TEST_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 `SRAM_TEST` reader - SRAM test mode?\"0\": Normal operation?\"1\": Enable SRAM test mode?it can be set, only when the IP is stopped (COMMAND.RUN=0, and really finished transition from run mode),?this mode will not be used, so it should never be set."]
|
||||
pub struct SRAM_TEST_R(crate::FieldReader<bool, bool>);
|
||||
impl SRAM_TEST_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SRAM_TEST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SRAM_TEST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SRAM_TEST` writer - SRAM test mode?\"0\": Normal operation?\"1\": Enable SRAM test mode?it can be set, only when the IP is stopped (COMMAND.RUN=0, and really finished transition from run mode),?this mode will not be used, so it should never be set."]
|
||||
pub struct SRAM_TEST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SRAM_TEST_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 `IP_REV_NUMBER` reader - IP Revision Number"]
|
||||
pub struct IP_REV_NUMBER_R(crate::FieldReader<u8, u8>);
|
||||
impl IP_REV_NUMBER_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
IP_REV_NUMBER_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IP_REV_NUMBER_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IP_MINOR_VERSION` reader - IP Minor Version Number"]
|
||||
pub struct IP_MINOR_VERSION_R(crate::FieldReader<u8, u8>);
|
||||
impl IP_MINOR_VERSION_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
IP_MINOR_VERSION_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IP_MINOR_VERSION_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IP_MAJOR_VERSION` reader - IP Major Version Number"]
|
||||
pub struct IP_MAJOR_VERSION_R(crate::FieldReader<u8, u8>);
|
||||
impl IP_MAJOR_VERSION_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
IP_MAJOR_VERSION_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IP_MAJOR_VERSION_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Run/Stop mode:?\"0\": Sets the CAN controller into stop mode.?Stop mode can be granted only in \"bus idle\" field?Returns \"0\" when stopped.?\"1\": Sets the CAN controller into run mode.?Returns \"1\" when running."]
|
||||
#[inline(always)]
|
||||
pub fn run(&self) -> RUN_R {
|
||||
RUN_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - TEST_MODE\\[1\\]"]
|
||||
#[inline(always)]
|
||||
pub fn listen(&self) -> LISTEN_R {
|
||||
LISTEN_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - TEST_MODE\\[2\\].?With TEST_MODE\\[2:1\\],?00: normal operation?01: Listen-only mode,? The output is held at \"R\" level. The CANmodule-III is only listening.?10: external loopback mode?11: internal loopback mode"]
|
||||
#[inline(always)]
|
||||
pub fn loopback_test(&self) -> LOOPBACK_TEST_R {
|
||||
LOOPBACK_TEST_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - SRAM test mode?\"0\": Normal operation?\"1\": Enable SRAM test mode?it can be set, only when the IP is stopped (COMMAND.RUN=0, and really finished transition from run mode),?this mode will not be used, so it should never be set."]
|
||||
#[inline(always)]
|
||||
pub fn sram_test(&self) -> SRAM_TEST_R {
|
||||
SRAM_TEST_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:23 - IP Revision Number"]
|
||||
#[inline(always)]
|
||||
pub fn ip_rev_number(&self) -> IP_REV_NUMBER_R {
|
||||
IP_REV_NUMBER_R::new(((self.bits >> 16) & 0xff) as u8)
|
||||
}
|
||||
#[doc = "Bits 24:27 - IP Minor Version Number"]
|
||||
#[inline(always)]
|
||||
pub fn ip_minor_version(&self) -> IP_MINOR_VERSION_R {
|
||||
IP_MINOR_VERSION_R::new(((self.bits >> 24) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bits 28:31 - IP Major Version Number"]
|
||||
#[inline(always)]
|
||||
pub fn ip_major_version(&self) -> IP_MAJOR_VERSION_R {
|
||||
IP_MAJOR_VERSION_R::new(((self.bits >> 28) & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Run/Stop mode:?\"0\": Sets the CAN controller into stop mode.?Stop mode can be granted only in \"bus idle\" field?Returns \"0\" when stopped.?\"1\": Sets the CAN controller into run mode.?Returns \"1\" when running."]
|
||||
#[inline(always)]
|
||||
pub fn run(&mut self) -> RUN_W {
|
||||
RUN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - TEST_MODE\\[1\\]"]
|
||||
#[inline(always)]
|
||||
pub fn listen(&mut self) -> LISTEN_W {
|
||||
LISTEN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - TEST_MODE\\[2\\].?With TEST_MODE\\[2:1\\],?00: normal operation?01: Listen-only mode,? The output is held at \"R\" level. The CANmodule-III is only listening.?10: external loopback mode?11: internal loopback mode"]
|
||||
#[inline(always)]
|
||||
pub fn loopback_test(&mut self) -> LOOPBACK_TEST_W {
|
||||
LOOPBACK_TEST_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - SRAM test mode?\"0\": Normal operation?\"1\": Enable SRAM test mode?it can be set, only when the IP is stopped (COMMAND.RUN=0, and really finished transition from run mode),?this mode will not be used, so it should never be set."]
|
||||
#[inline(always)]
|
||||
pub fn sram_test(&mut self) -> SRAM_TEST_W {
|
||||
SRAM_TEST_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Command 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 [command](index.html) module"]
|
||||
pub struct COMMAND_SPEC;
|
||||
impl crate::RegisterSpec for COMMAND_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [command::R](R) reader structure"]
|
||||
impl crate::Readable for COMMAND_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [command::W](W) writer structure"]
|
||||
impl crate::Writable for COMMAND_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets COMMAND to value 0"]
|
||||
impl crate::Resettable for COMMAND_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,483 @@
|
||||
#[doc = "Register `CONFIG` reader"]
|
||||
pub struct R(crate::R<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONFIG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONFIG_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONFIG` writer"]
|
||||
pub struct W(crate::W<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONFIG_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 core::convert::From<crate::W<CONFIG_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EDGE_MODE` reader - CAN bus synchronization logic??0?: Edge from ?R? to ?D? is used for synchronization??1?: Both edges are used?Note, only ?R? to ?D? edge shall be used for synchronization per ISO-11898-1 spec, so this bit should always be set 0 (by default)"]
|
||||
pub struct EDGE_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl EDGE_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
EDGE_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for EDGE_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EDGE_MODE` writer - CAN bus synchronization logic??0?: Edge from ?R? to ?D? is used for synchronization??1?: Both edges are used?Note, only ?R? to ?D? edge shall be used for synchronization per ISO-11898-1 spec, so this bit should always be set 0 (by default)"]
|
||||
pub struct EDGE_MODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> EDGE_MODE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SAMPLING_MODE` reader - CAN bus bit sampling??0?: One sampling point is used in the receiver?path??1?: 3 sampling points with majority decision are?used"]
|
||||
pub struct SAMPLING_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl SAMPLING_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SAMPLING_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SAMPLING_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SAMPLING_MODE` writer - CAN bus bit sampling??0?: One sampling point is used in the receiver?path??1?: 3 sampling points with majority decision are?used"]
|
||||
pub struct SAMPLING_MODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SAMPLING_MODE_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 `CFG_SJW` reader - Synchronization jump width - 1?sjw = tseg1 and sjw = tseg2"]
|
||||
pub struct CFG_SJW_R(crate::FieldReader<u8, u8>);
|
||||
impl CFG_SJW_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CFG_SJW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_SJW_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_SJW` writer - Synchronization jump width - 1?sjw = tseg1 and sjw = tseg2"]
|
||||
pub struct CFG_SJW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_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 << 2)) | ((value as u32 & 0x03) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTO_RESTART` reader - ?0?: After bus-off, the CAN core must be restarted by setting ? COMMAND.RUN register. This is the recommended setting.??1?: After bus-off, the CAN core is restarting automatically ? after 128 groups of 11 recessive bits"]
|
||||
pub struct AUTO_RESTART_R(crate::FieldReader<bool, bool>);
|
||||
impl AUTO_RESTART_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
AUTO_RESTART_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for AUTO_RESTART_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTO_RESTART` writer - ?0?: After bus-off, the CAN core must be restarted by setting ? COMMAND.RUN register. This is the recommended setting.??1?: After bus-off, the CAN core is restarting automatically ? after 128 groups of 11 recessive bits"]
|
||||
pub struct AUTO_RESTART_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> AUTO_RESTART_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 `CFG_TSEG2` reader - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
pub struct CFG_TSEG2_R(crate::FieldReader<u8, u8>);
|
||||
impl CFG_TSEG2_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CFG_TSEG2_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_TSEG2_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG2` writer - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
pub struct CFG_TSEG2_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_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 << 5)) | ((value as u32 & 0x07) << 5);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG1` reader - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
pub struct CFG_TSEG1_R(crate::FieldReader<u8, u8>);
|
||||
impl CFG_TSEG1_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CFG_TSEG1_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_TSEG1_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG1` writer - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
pub struct CFG_TSEG1_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_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 << 8)) | ((value as u32 & 0x0f) << 8);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_ARBITER` reader - Transmit buffer arbiter??0?: Round robin arbitration??1?: Fixed priority arbitration"]
|
||||
pub struct CFG_ARBITER_R(crate::FieldReader<bool, bool>);
|
||||
impl CFG_ARBITER_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CFG_ARBITER_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_ARBITER_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_ARBITER` writer - Transmit buffer arbiter??0?: Round robin arbitration??1?: Fixed priority arbitration"]
|
||||
pub struct CFG_ARBITER_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_ARBITER_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 `SWAP_ENDIAN` reader - Swap Endian - the byte position of the CAN receive and transmit data fields can be modified to match the endian setting of the processor or the used CAN protocol?0: CAN data byte position is not swapped (big endian)?1: CAN data byte position is swapped (little endian)"]
|
||||
pub struct SWAP_ENDIAN_R(crate::FieldReader<bool, bool>);
|
||||
impl SWAP_ENDIAN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SWAP_ENDIAN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SWAP_ENDIAN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SWAP_ENDIAN` writer - Swap Endian - the byte position of the CAN receive and transmit data fields can be modified to match the endian setting of the processor or the used CAN protocol?0: CAN data byte position is not swapped (big endian)?1: CAN data byte position is swapped (little endian)"]
|
||||
pub struct SWAP_ENDIAN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SWAP_ENDIAN_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 `ECR_MODE` reader - Error Capture mode?0: Free running: The ECR register shows the current bit position within the CAN frame?1: Capture mode: The ecr register shows the bit position and type of the last captured CAN error."]
|
||||
pub struct ECR_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl ECR_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ECR_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ECR_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ECR_MODE` writer - Error Capture mode?0: Free running: The ECR register shows the current bit position within the CAN frame?1: Capture mode: The ecr register shows the bit position and type of the last captured CAN error."]
|
||||
pub struct ECR_MODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ECR_MODE_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 `CFG_BITRATE` reader - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
pub struct CFG_BITRATE_R(crate::FieldReader<u16, u16>);
|
||||
impl CFG_BITRATE_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
CFG_BITRATE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_BITRATE_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_BITRATE` writer - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
pub struct CFG_BITRATE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_BITRATE_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 << 16)) | ((value as u32 & 0x7fff) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - CAN bus synchronization logic??0?: Edge from ?R? to ?D? is used for synchronization??1?: Both edges are used?Note, only ?R? to ?D? edge shall be used for synchronization per ISO-11898-1 spec, so this bit should always be set 0 (by default)"]
|
||||
#[inline(always)]
|
||||
pub fn edge_mode(&self) -> EDGE_MODE_R {
|
||||
EDGE_MODE_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - CAN bus bit sampling??0?: One sampling point is used in the receiver?path??1?: 3 sampling points with majority decision are?used"]
|
||||
#[inline(always)]
|
||||
pub fn sampling_mode(&self) -> SAMPLING_MODE_R {
|
||||
SAMPLING_MODE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 2:3 - Synchronization jump width - 1?sjw = tseg1 and sjw = tseg2"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_sjw(&self) -> CFG_SJW_R {
|
||||
CFG_SJW_R::new(((self.bits >> 2) & 0x03) as u8)
|
||||
}
|
||||
#[doc = "Bit 4 - ?0?: After bus-off, the CAN core must be restarted by setting ? COMMAND.RUN register. This is the recommended setting.??1?: After bus-off, the CAN core is restarting automatically ? after 128 groups of 11 recessive bits"]
|
||||
#[inline(always)]
|
||||
pub fn auto_restart(&self) -> AUTO_RESTART_R {
|
||||
AUTO_RESTART_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 5:7 - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg2(&self) -> CFG_TSEG2_R {
|
||||
CFG_TSEG2_R::new(((self.bits >> 5) & 0x07) as u8)
|
||||
}
|
||||
#[doc = "Bits 8:11 - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg1(&self) -> CFG_TSEG1_R {
|
||||
CFG_TSEG1_R::new(((self.bits >> 8) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 12 - Transmit buffer arbiter??0?: Round robin arbitration??1?: Fixed priority arbitration"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_arbiter(&self) -> CFG_ARBITER_R {
|
||||
CFG_ARBITER_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - Swap Endian - the byte position of the CAN receive and transmit data fields can be modified to match the endian setting of the processor or the used CAN protocol?0: CAN data byte position is not swapped (big endian)?1: CAN data byte position is swapped (little endian)"]
|
||||
#[inline(always)]
|
||||
pub fn swap_endian(&self) -> SWAP_ENDIAN_R {
|
||||
SWAP_ENDIAN_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - Error Capture mode?0: Free running: The ECR register shows the current bit position within the CAN frame?1: Capture mode: The ecr register shows the bit position and type of the last captured CAN error."]
|
||||
#[inline(always)]
|
||||
pub fn ecr_mode(&self) -> ECR_MODE_R {
|
||||
ECR_MODE_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:30 - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_bitrate(&self) -> CFG_BITRATE_R {
|
||||
CFG_BITRATE_R::new(((self.bits >> 16) & 0x7fff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - CAN bus synchronization logic??0?: Edge from ?R? to ?D? is used for synchronization??1?: Both edges are used?Note, only ?R? to ?D? edge shall be used for synchronization per ISO-11898-1 spec, so this bit should always be set 0 (by default)"]
|
||||
#[inline(always)]
|
||||
pub fn edge_mode(&mut self) -> EDGE_MODE_W {
|
||||
EDGE_MODE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - CAN bus bit sampling??0?: One sampling point is used in the receiver?path??1?: 3 sampling points with majority decision are?used"]
|
||||
#[inline(always)]
|
||||
pub fn sampling_mode(&mut self) -> SAMPLING_MODE_W {
|
||||
SAMPLING_MODE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 2:3 - Synchronization jump width - 1?sjw = tseg1 and sjw = tseg2"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_sjw(&mut self) -> CFG_SJW_W {
|
||||
CFG_SJW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - ?0?: After bus-off, the CAN core must be restarted by setting ? COMMAND.RUN register. This is the recommended setting.??1?: After bus-off, the CAN core is restarting automatically ? after 128 groups of 11 recessive bits"]
|
||||
#[inline(always)]
|
||||
pub fn auto_restart(&mut self) -> AUTO_RESTART_W {
|
||||
AUTO_RESTART_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 5:7 - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg2(&mut self) -> CFG_TSEG2_W {
|
||||
CFG_TSEG2_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:11 - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg1(&mut self) -> CFG_TSEG1_W {
|
||||
CFG_TSEG1_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - Transmit buffer arbiter??0?: Round robin arbitration??1?: Fixed priority arbitration"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_arbiter(&mut self) -> CFG_ARBITER_W {
|
||||
CFG_ARBITER_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - Swap Endian - the byte position of the CAN receive and transmit data fields can be modified to match the endian setting of the processor or the used CAN protocol?0: CAN data byte position is not swapped (big endian)?1: CAN data byte position is swapped (little endian)"]
|
||||
#[inline(always)]
|
||||
pub fn swap_endian(&mut self) -> SWAP_ENDIAN_W {
|
||||
SWAP_ENDIAN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - Error Capture mode?0: Free running: The ECR register shows the current bit position within the CAN frame?1: Capture mode: The ecr register shows the bit position and type of the last captured CAN error."]
|
||||
#[inline(always)]
|
||||
pub fn ecr_mode(&mut self) -> ECR_MODE_W {
|
||||
ECR_MODE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:30 - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_bitrate(&mut self) -> CFG_BITRATE_W {
|
||||
CFG_BITRATE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Configuration\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 [config](index.html) module"]
|
||||
pub struct CONFIG_SPEC;
|
||||
impl crate::RegisterSpec for CONFIG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [config::R](R) reader structure"]
|
||||
impl crate::Readable for CONFIG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
|
||||
impl crate::Writable for CONFIG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONFIG to value 0"]
|
||||
impl crate::Resettable for CONFIG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
#[doc = "Register `ECR` reader"]
|
||||
pub struct R(crate::R<ECR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ECR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ECR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ECR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ECR` writer"]
|
||||
pub struct W(crate::W<ECR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ECR_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 core::convert::From<crate::W<ECR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ECR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ECR_STATUS` reader - ECR STATUS -?0: ECR register captured an error, or it is in free running mode?1: ECR register is armed"]
|
||||
pub struct ECR_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl ECR_STATUS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ECR_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ECR_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ECR_STATUS` writer - ECR STATUS -?0: ECR register captured an error, or it is in free running mode?1: ECR register is armed"]
|
||||
pub struct ECR_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ECR_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR_TYPE` reader - Error type -?000 : Arbitration loss?001 : Bit Error?010 : Bit Stuffing Error?011 : Acknowledge Error?100 : Form Error?101 : CRC Error?Others : N/A"]
|
||||
pub struct ERROR_TYPE_R(crate::FieldReader<u8, u8>);
|
||||
impl ERROR_TYPE_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
ERROR_TYPE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ERROR_TYPE_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_MODE` reader - RX Mode -?0: No status?1: CAN Controller is receiver"]
|
||||
pub struct RX_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX_MODE` reader - TX Mode -?0: No status?1: CAN Controller is transmitter"]
|
||||
pub struct TX_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl TX_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BIT` reader - Bit number inside of Field"]
|
||||
pub struct BIT_R(crate::FieldReader<u8, u8>);
|
||||
impl BIT_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
BIT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BIT_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `Field` reader - Field -?0x00 : Stopped?0x01 : Synchronize?0x05 : Interframe?0x06 : Bus Idle?0x07 : Start of Frame?0x08 : Arbitration?0x09 : Control?0x0A : Data?0x0B : CRC?0x0C : ACK?0x0D : End of frame?0x10 : Error flag?0x11 : Error echo?0x12 : Error delimiter?0x18 : Overload flag?0x19 : Overload echo?0x1A : Overload delimiter?Others : N/A"]
|
||||
pub struct FIELD_R(crate::FieldReader<u8, u8>);
|
||||
impl FIELD_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
FIELD_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for FIELD_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - ECR STATUS -?0: ECR register captured an error, or it is in free running mode?1: ECR register is armed"]
|
||||
#[inline(always)]
|
||||
pub fn ecr_status(&self) -> ECR_STATUS_R {
|
||||
ECR_STATUS_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 1:3 - Error type -?000 : Arbitration loss?001 : Bit Error?010 : Bit Stuffing Error?011 : Acknowledge Error?100 : Form Error?101 : CRC Error?Others : N/A"]
|
||||
#[inline(always)]
|
||||
pub fn error_type(&self) -> ERROR_TYPE_R {
|
||||
ERROR_TYPE_R::new(((self.bits >> 1) & 0x07) as u8)
|
||||
}
|
||||
#[doc = "Bit 4 - RX Mode -?0: No status?1: CAN Controller is receiver"]
|
||||
#[inline(always)]
|
||||
pub fn rx_mode(&self) -> RX_MODE_R {
|
||||
RX_MODE_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - TX Mode -?0: No status?1: CAN Controller is transmitter"]
|
||||
#[inline(always)]
|
||||
pub fn tx_mode(&self) -> TX_MODE_R {
|
||||
TX_MODE_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 6:11 - Bit number inside of Field"]
|
||||
#[inline(always)]
|
||||
pub fn bit_(&self) -> BIT_R {
|
||||
BIT_R::new(((self.bits >> 6) & 0x3f) as u8)
|
||||
}
|
||||
#[doc = "Bits 12:16 - Field -?0x00 : Stopped?0x01 : Synchronize?0x05 : Interframe?0x06 : Bus Idle?0x07 : Start of Frame?0x08 : Arbitration?0x09 : Control?0x0A : Data?0x0B : CRC?0x0C : ACK?0x0D : End of frame?0x10 : Error flag?0x11 : Error echo?0x12 : Error delimiter?0x18 : Overload flag?0x19 : Overload echo?0x1A : Overload delimiter?Others : N/A"]
|
||||
#[inline(always)]
|
||||
pub fn field(&self) -> FIELD_R {
|
||||
FIELD_R::new(((self.bits >> 12) & 0x1f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - ECR STATUS -?0: ECR register captured an error, or it is in free running mode?1: ECR register is armed"]
|
||||
#[inline(always)]
|
||||
pub fn ecr_status(&mut self) -> ECR_STATUS_W {
|
||||
ECR_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Error Capture 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 [ecr](index.html) module"]
|
||||
pub struct ECR_SPEC;
|
||||
impl crate::RegisterSpec for ECR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ecr::R](R) reader structure"]
|
||||
impl crate::Readable for ECR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ecr::W](W) writer structure"]
|
||||
impl crate::Writable for ECR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ECR to value 0"]
|
||||
impl crate::Resettable for ECR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,158 @@
|
||||
#[doc = "Register `ERROR_STATUS` reader"]
|
||||
pub struct R(crate::R<ERROR_STATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ERROR_STATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ERROR_STATUS_SPEC>> for R {
|
||||
fn from(reader: crate::R<ERROR_STATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ERROR_STATUS` writer"]
|
||||
pub struct W(crate::W<ERROR_STATUS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERROR_STATUS_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 core::convert::From<crate::W<ERROR_STATUS_SPEC>> for W {
|
||||
fn from(writer: crate::W<ERROR_STATUS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX_ERR_CNT` reader - The transmitter error counter according to the?CAN standard. When it is greater than 255,?it is fixed at 255"]
|
||||
pub struct TX_ERR_CNT_R(crate::FieldReader<u8, u8>);
|
||||
impl TX_ERR_CNT_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
TX_ERR_CNT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX_ERR_CNT_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_ERR_CNT` reader - The receive error counter according to the?CAN 2.0 specification. When in bus-off state,?this counter is used to count 128 groups of 11?recessive bits.?it is fixed at 255"]
|
||||
pub struct RX_ERR_CNT_R(crate::FieldReader<u8, u8>);
|
||||
impl RX_ERR_CNT_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
RX_ERR_CNT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_ERR_CNT_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR_STATE` reader - The error state of the CAN node:?\"00\": error active (normal operation)?\"01\": error passive?\"1x\": bus off"]
|
||||
pub struct ERROR_STATE_R(crate::FieldReader<u8, u8>);
|
||||
impl ERROR_STATE_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
ERROR_STATE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ERROR_STATE_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXGTE96` reader - The Tx error counter is greater or equal 96"]
|
||||
pub struct TXGTE96_R(crate::FieldReader<bool, bool>);
|
||||
impl TXGTE96_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXGTE96_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXGTE96_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXGTE96` reader - The Rx error counter is greater or equal 96"]
|
||||
pub struct RXGTE96_R(crate::FieldReader<bool, bool>);
|
||||
impl RXGTE96_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXGTE96_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXGTE96_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - The transmitter error counter according to the?CAN standard. When it is greater than 255,?it is fixed at 255"]
|
||||
#[inline(always)]
|
||||
pub fn tx_err_cnt(&self) -> TX_ERR_CNT_R {
|
||||
TX_ERR_CNT_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
#[doc = "Bits 8:15 - The receive error counter according to the?CAN 2.0 specification. When in bus-off state,?this counter is used to count 128 groups of 11?recessive bits.?it is fixed at 255"]
|
||||
#[inline(always)]
|
||||
pub fn rx_err_cnt(&self) -> RX_ERR_CNT_R {
|
||||
RX_ERR_CNT_R::new(((self.bits >> 8) & 0xff) as u8)
|
||||
}
|
||||
#[doc = "Bits 16:17 - The error state of the CAN node:?\"00\": error active (normal operation)?\"01\": error passive?\"1x\": bus off"]
|
||||
#[inline(always)]
|
||||
pub fn error_state(&self) -> ERROR_STATE_R {
|
||||
ERROR_STATE_R::new(((self.bits >> 16) & 0x03) as u8)
|
||||
}
|
||||
#[doc = "Bit 18 - The Tx error counter is greater or equal 96"]
|
||||
#[inline(always)]
|
||||
pub fn txgte96(&self) -> TXGTE96_R {
|
||||
TXGTE96_R::new(((self.bits >> 18) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 19 - The Rx error counter is greater or equal 96"]
|
||||
#[inline(always)]
|
||||
pub fn rxgte96(&self) -> RXGTE96_R {
|
||||
RXGTE96_R::new(((self.bits >> 19) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Error Status\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 [error_status](index.html) module"]
|
||||
pub struct ERROR_STATUS_SPEC;
|
||||
impl crate::RegisterSpec for ERROR_STATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [error_status::R](R) reader structure"]
|
||||
impl crate::Readable for ERROR_STATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [error_status::W](W) writer structure"]
|
||||
impl crate::Writable for ERROR_STATUS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERROR_STATUS to value 0"]
|
||||
impl crate::Resettable for ERROR_STATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,753 @@
|
||||
#[doc = "Register `INT_EBL` reader"]
|
||||
pub struct R(crate::R<INT_EBL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INT_EBL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INT_EBL_SPEC>> for R {
|
||||
fn from(reader: crate::R<INT_EBL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INT_EBL` writer"]
|
||||
pub struct W(crate::W<INT_EBL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INT_EBL_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 core::convert::From<crate::W<INT_EBL_SPEC>> for W {
|
||||
fn from(writer: crate::W<INT_EBL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `GLOBAL_INT_ENBL` reader - global interrupt enable flag??0?: All interrupts are disabled??1?: Enabled interrupt sources are available"]
|
||||
pub struct GLOBAL_INT_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl GLOBAL_INT_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
GLOBAL_INT_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for GLOBAL_INT_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `GLOBAL_INT_ENBL` writer - global interrupt enable flag??0?: All interrupts are disabled??1?: Enabled interrupt sources are available"]
|
||||
pub struct GLOBAL_INT_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> GLOBAL_INT_ENBL_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARB_LOSS_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct ARB_LOSS_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl ARB_LOSS_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ARB_LOSS_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ARB_LOSS_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARB_LOSS_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct ARB_LOSS_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ARB_LOSS_ENBL_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 `OVR_LOAD_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct OVR_LOAD_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl OVR_LOAD_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
OVR_LOAD_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for OVR_LOAD_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OVR_LOAD_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct OVR_LOAD_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> OVR_LOAD_ENBL_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 `BIT_ERR_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct BIT_ERR_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl BIT_ERR_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BIT_ERR_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BIT_ERR_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BIT_ERR_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct BIT_ERR_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BIT_ERR_ENBL_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 `STUFF_ERR_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct STUFF_ERR_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl STUFF_ERR_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STUFF_ERR_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STUFF_ERR_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STUFF_ERR_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct STUFF_ERR_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STUFF_ERR_ENBL_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 `ACK_ERR_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct ACK_ERR_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl ACK_ERR_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ACK_ERR_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ACK_ERR_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ACK_ERR_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct ACK_ERR_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ACK_ERR_ENBL_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 `FORM_ERR_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct FORM_ERR_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl FORM_ERR_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
FORM_ERR_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for FORM_ERR_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FORM_ERR_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct FORM_ERR_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> FORM_ERR_ENBL_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 `CRC_ERR_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct CRC_ERR_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl CRC_ERR_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CRC_ERR_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CRC_ERR_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CRC_ERR_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct CRC_ERR_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CRC_ERR_ENBL_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 `BUS_OFF_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct BUS_OFF_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl BUS_OFF_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUS_OFF_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUS_OFF_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUS_OFF_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct BUS_OFF_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUS_OFF_ENBL_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 `RX_MSG_LOSS` reader - See description in INT_STATUS"]
|
||||
pub struct RX_MSG_LOSS_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_MSG_LOSS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_MSG_LOSS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_MSG_LOSS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_MSG_LOSS` writer - See description in INT_STATUS"]
|
||||
pub struct RX_MSG_LOSS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_MSG_LOSS_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 `TX_MSG_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct TX_MSG_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl TX_MSG_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TX_MSG_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TX_MSG_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TX_MSG_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct TX_MSG_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TX_MSG_ENBL_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 `RX_MSG_ENBl` reader - See description in INT_STATUS"]
|
||||
pub struct RX_MSG_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_MSG_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_MSG_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_MSG_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_MSG_ENBl` writer - See description in INT_STATUS"]
|
||||
pub struct RX_MSG_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_MSG_ENBL_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 `RTR_MSG_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct RTR_MSG_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct RTR_MSG_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_ENBL_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 `STUCK_AT_0_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct STUCK_AT_0_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl STUCK_AT_0_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STUCK_AT_0_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STUCK_AT_0_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STUCK_AT_0_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct STUCK_AT_0_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STUCK_AT_0_ENBL_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 `SST_FAILURE_ENBL` reader - See description in INT_STATUS"]
|
||||
pub struct SST_FAILURE_ENBL_R(crate::FieldReader<bool, bool>);
|
||||
impl SST_FAILURE_ENBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SST_FAILURE_ENBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SST_FAILURE_ENBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SST_FAILURE_ENBL` writer - See description in INT_STATUS"]
|
||||
pub struct SST_FAILURE_ENBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SST_FAILURE_ENBL_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
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - global interrupt enable flag??0?: All interrupts are disabled??1?: Enabled interrupt sources are available"]
|
||||
#[inline(always)]
|
||||
pub fn global_int_enbl(&self) -> GLOBAL_INT_ENBL_R {
|
||||
GLOBAL_INT_ENBL_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn arb_loss_enbl(&self) -> ARB_LOSS_ENBL_R {
|
||||
ARB_LOSS_ENBL_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn ovr_load_enbl(&self) -> OVR_LOAD_ENBL_R {
|
||||
OVR_LOAD_ENBL_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn bit_err_enbl(&self) -> BIT_ERR_ENBL_R {
|
||||
BIT_ERR_ENBL_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn stuff_err_enbl(&self) -> STUFF_ERR_ENBL_R {
|
||||
STUFF_ERR_ENBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn ack_err_enbl(&self) -> ACK_ERR_ENBL_R {
|
||||
ACK_ERR_ENBL_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn form_err_enbl(&self) -> FORM_ERR_ENBL_R {
|
||||
FORM_ERR_ENBL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn crc_err_enbl(&self) -> CRC_ERR_ENBL_R {
|
||||
CRC_ERR_ENBL_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn bus_off_enbl(&self) -> BUS_OFF_ENBL_R {
|
||||
BUS_OFF_ENBL_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg_loss(&self) -> RX_MSG_LOSS_R {
|
||||
RX_MSG_LOSS_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn tx_msg_enbl(&self) -> TX_MSG_ENBL_R {
|
||||
TX_MSG_ENBL_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg_enbl(&self) -> RX_MSG_ENBL_R {
|
||||
RX_MSG_ENBL_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg_enbl(&self) -> RTR_MSG_ENBL_R {
|
||||
RTR_MSG_ENBL_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn stuck_at_0_enbl(&self) -> STUCK_AT_0_ENBL_R {
|
||||
STUCK_AT_0_ENBL_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn sst_failure_enbl(&self) -> SST_FAILURE_ENBL_R {
|
||||
SST_FAILURE_ENBL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - global interrupt enable flag??0?: All interrupts are disabled??1?: Enabled interrupt sources are available"]
|
||||
#[inline(always)]
|
||||
pub fn global_int_enbl(&mut self) -> GLOBAL_INT_ENBL_W {
|
||||
GLOBAL_INT_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn arb_loss_enbl(&mut self) -> ARB_LOSS_ENBL_W {
|
||||
ARB_LOSS_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn ovr_load_enbl(&mut self) -> OVR_LOAD_ENBL_W {
|
||||
OVR_LOAD_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn bit_err_enbl(&mut self) -> BIT_ERR_ENBL_W {
|
||||
BIT_ERR_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn stuff_err_enbl(&mut self) -> STUFF_ERR_ENBL_W {
|
||||
STUFF_ERR_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn ack_err_enbl(&mut self) -> ACK_ERR_ENBL_W {
|
||||
ACK_ERR_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn form_err_enbl(&mut self) -> FORM_ERR_ENBL_W {
|
||||
FORM_ERR_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn crc_err_enbl(&mut self) -> CRC_ERR_ENBL_W {
|
||||
CRC_ERR_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn bus_off_enbl(&mut self) -> BUS_OFF_ENBL_W {
|
||||
BUS_OFF_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg_loss(&mut self) -> RX_MSG_LOSS_W {
|
||||
RX_MSG_LOSS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn tx_msg_enbl(&mut self) -> TX_MSG_ENBL_W {
|
||||
TX_MSG_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg_enbl(&mut self) -> RX_MSG_ENBL_W {
|
||||
RX_MSG_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg_enbl(&mut self) -> RTR_MSG_ENBL_W {
|
||||
RTR_MSG_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn stuck_at_0_enbl(&mut self) -> STUCK_AT_0_ENBL_W {
|
||||
STUCK_AT_0_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - See description in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn sst_failure_enbl(&mut self) -> SST_FAILURE_ENBL_W {
|
||||
SST_FAILURE_ENBL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
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 [int_ebl](index.html) module"]
|
||||
pub struct INT_EBL_SPEC;
|
||||
impl crate::RegisterSpec for INT_EBL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [int_ebl::R](R) reader structure"]
|
||||
impl crate::Readable for INT_EBL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [int_ebl::W](W) writer structure"]
|
||||
impl crate::Writable for INT_EBL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INT_EBL to value 0"]
|
||||
impl crate::Resettable for INT_EBL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,439 @@
|
||||
#[doc = "Register `INT_STATUS` reader"]
|
||||
pub struct R(crate::R<INT_STATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INT_STATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INT_STATUS_SPEC>> for R {
|
||||
fn from(reader: crate::R<INT_STATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INT_STATUS` writer"]
|
||||
pub struct W(crate::W<INT_STATUS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INT_STATUS_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 core::convert::From<crate::W<INT_STATUS_SPEC>> for W {
|
||||
fn from(writer: crate::W<INT_STATUS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARB_LOSS` writer - The arbitration was lost while sending a message"]
|
||||
pub struct ARB_LOSS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ARB_LOSS_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 `OVR_LOAD` writer - An overload frame was received,?or reactive overload frame condition is detected (ISO-11898-1 section 10.11)"]
|
||||
pub struct OVR_LOAD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> OVR_LOAD_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 `BIT_ERR` writer - A bit error was detected"]
|
||||
pub struct BIT_ERR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BIT_ERR_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 `STUFF_ERR` writer - A bit stuffing error was detected"]
|
||||
pub struct STUFF_ERR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STUFF_ERR_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 `ACK_ERR` writer - An CAN message acknowledge error was detected"]
|
||||
pub struct ACK_ERR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ACK_ERR_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 `FORM_ERR` writer - A CAN message format error was detected?please ignore this interrupt, when ERROR_STATUS.ERROR_STATE=2'B1x"]
|
||||
pub struct FORM_ERR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> FORM_ERR_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 `CRC_ERR` writer - A CAN CRC error was detected"]
|
||||
pub struct CRC_ERR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CRC_ERR_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 `BUS_OFF` writer - The CAN has reached the bus off state"]
|
||||
pub struct BUS_OFF_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUS_OFF_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 `RX_MSG_LOSS` writer - when a new message arrives, but the RxMessage flag MSG_AV is set and LINK_FLAG is not set, RX_MSG_LOSS is set, and the new message is discarded."]
|
||||
pub struct RX_MSG_LOSS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_MSG_LOSS_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 `TX_MSG` writer - Indicates that a message was sent?0: Normal operation?1: A message was successfully sent from a transmit buffer?which has its TxIntEbl flag asserted."]
|
||||
pub struct TX_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TX_MSG_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 `RX_MSG` writer - Indicates that a message was received?0: Normal operation?1: A new message was successfully received and stored in a receive?buffer which has its RxIntEBL flag asserted."]
|
||||
pub struct RX_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_MSG_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 `RTR_MSG` writer - RTR auto-reply message sent?0: Normal operation?1: Indicates that a RTR auto-reply message was sent"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 `STUCK_AT_0` writer - Stuck at dominant error?0: Normal Operation?1: Indicates if the rx input remains stuack at 0 (dominant level) for?more than 16 consecutive bit times. ?The \"stuck at 0\" condition is checked, only when COMMAND.RUN is set"]
|
||||
pub struct STUCK_AT_0_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STUCK_AT_0_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 `SST_FAILURE` writer - Single shot transmission failure?0: Normal operation?1: A buffer set for single shot transmission experienced?an arbitration loss or a bus error during transmission?The sst_failure interrupt is set as well when the CAN controller is being stopped while an SST message is in the transmit buffer. user should transmit or remove respective SST messages before stopping the IP, to avoid triggering SST_FAILURE after writing COMMAND.RUN=0."]
|
||||
pub struct SST_FAILURE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SST_FAILURE_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
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 2 - The arbitration was lost while sending a message"]
|
||||
#[inline(always)]
|
||||
pub fn arb_loss(&mut self) -> ARB_LOSS_W {
|
||||
ARB_LOSS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - An overload frame was received,?or reactive overload frame condition is detected (ISO-11898-1 section 10.11)"]
|
||||
#[inline(always)]
|
||||
pub fn ovr_load(&mut self) -> OVR_LOAD_W {
|
||||
OVR_LOAD_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - A bit error was detected"]
|
||||
#[inline(always)]
|
||||
pub fn bit_err(&mut self) -> BIT_ERR_W {
|
||||
BIT_ERR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - A bit stuffing error was detected"]
|
||||
#[inline(always)]
|
||||
pub fn stuff_err(&mut self) -> STUFF_ERR_W {
|
||||
STUFF_ERR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - An CAN message acknowledge error was detected"]
|
||||
#[inline(always)]
|
||||
pub fn ack_err(&mut self) -> ACK_ERR_W {
|
||||
ACK_ERR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - A CAN message format error was detected?please ignore this interrupt, when ERROR_STATUS.ERROR_STATE=2'B1x"]
|
||||
#[inline(always)]
|
||||
pub fn form_err(&mut self) -> FORM_ERR_W {
|
||||
FORM_ERR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - A CAN CRC error was detected"]
|
||||
#[inline(always)]
|
||||
pub fn crc_err(&mut self) -> CRC_ERR_W {
|
||||
CRC_ERR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - The CAN has reached the bus off state"]
|
||||
#[inline(always)]
|
||||
pub fn bus_off(&mut self) -> BUS_OFF_W {
|
||||
BUS_OFF_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - when a new message arrives, but the RxMessage flag MSG_AV is set and LINK_FLAG is not set, RX_MSG_LOSS is set, and the new message is discarded."]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg_loss(&mut self) -> RX_MSG_LOSS_W {
|
||||
RX_MSG_LOSS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - Indicates that a message was sent?0: Normal operation?1: A message was successfully sent from a transmit buffer?which has its TxIntEbl flag asserted."]
|
||||
#[inline(always)]
|
||||
pub fn tx_msg(&mut self) -> TX_MSG_W {
|
||||
TX_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - Indicates that a message was received?0: Normal operation?1: A new message was successfully received and stored in a receive?buffer which has its RxIntEBL flag asserted."]
|
||||
#[inline(always)]
|
||||
pub fn rx_msg(&mut self) -> RX_MSG_W {
|
||||
RX_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - RTR auto-reply message sent?0: Normal operation?1: Indicates that a RTR auto-reply message was sent"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - Stuck at dominant error?0: Normal Operation?1: Indicates if the rx input remains stuack at 0 (dominant level) for?more than 16 consecutive bit times. ?The \"stuck at 0\" condition is checked, only when COMMAND.RUN is set"]
|
||||
#[inline(always)]
|
||||
pub fn stuck_at_0(&mut self) -> STUCK_AT_0_W {
|
||||
STUCK_AT_0_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - Single shot transmission failure?0: Normal operation?1: A buffer set for single shot transmission experienced?an arbitration loss or a bus error during transmission?The sst_failure interrupt is set as well when the CAN controller is being stopped while an SST message is in the transmit buffer. user should transmit or remove respective SST messages before stopping the IP, to avoid triggering SST_FAILURE after writing COMMAND.RUN=0."]
|
||||
#[inline(always)]
|
||||
pub fn sst_failure(&mut self) -> SST_FAILURE_W {
|
||||
SST_FAILURE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt Status\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 [int_status](index.html) module"]
|
||||
pub struct INT_STATUS_SPEC;
|
||||
impl crate::RegisterSpec for INT_STATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [int_status::R](R) reader structure"]
|
||||
impl crate::Readable for INT_STATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [int_status::W](W) writer structure"]
|
||||
impl crate::Writable for INT_STATUS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INT_STATUS to value 0"]
|
||||
impl crate::Resettable for INT_STATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,142 @@
|
||||
#[doc = "Register `INTR_CAN` reader"]
|
||||
pub struct R(crate::R<INTR_CAN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTR_CAN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INTR_CAN_SPEC>> for R {
|
||||
fn from(reader: crate::R<INTR_CAN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTR_CAN` writer"]
|
||||
pub struct W(crate::W<INTR_CAN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTR_CAN_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 core::convert::From<crate::W<INTR_CAN_SPEC>> for W {
|
||||
fn from(writer: crate::W<INTR_CAN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT_STATUS` writer - Triggers when any enabled (INT_EBL) interrupt are set in INT_STATUS"]
|
||||
pub struct INT_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> INT_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_COMPARE` writer - Triggers when LOCAL_TIME is equal to TT_COMPARE"]
|
||||
pub struct TT_COMPARE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_COMPARE_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 `TT_CAPTURE` writer - Triggers when LOCAL_TIME is saved to TT_CAPTURE, on SOF detection"]
|
||||
pub struct TT_CAPTURE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_CAPTURE_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
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Triggers when any enabled (INT_EBL) interrupt are set in INT_STATUS"]
|
||||
#[inline(always)]
|
||||
pub fn int_status(&mut self) -> INT_STATUS_W {
|
||||
INT_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Triggers when LOCAL_TIME is equal to TT_COMPARE"]
|
||||
#[inline(always)]
|
||||
pub fn tt_compare(&mut self) -> TT_COMPARE_W {
|
||||
TT_COMPARE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Triggers when LOCAL_TIME is saved to TT_CAPTURE, on SOF detection"]
|
||||
#[inline(always)]
|
||||
pub fn tt_capture(&mut self) -> TT_CAPTURE_W {
|
||||
TT_CAPTURE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Interrupt Cause (TTCAN + INT_STATUS Or)\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 [intr_can](index.html) module"]
|
||||
pub struct INTR_CAN_SPEC;
|
||||
impl crate::RegisterSpec for INTR_CAN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intr_can::R](R) reader structure"]
|
||||
impl crate::Readable for INTR_CAN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intr_can::W](W) writer structure"]
|
||||
impl crate::Writable for INTR_CAN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTR_CAN to value 0"]
|
||||
impl crate::Resettable for INTR_CAN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,201 @@
|
||||
#[doc = "Register `INTR_CAN_MASK` reader"]
|
||||
pub struct R(crate::R<INTR_CAN_MASK_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTR_CAN_MASK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INTR_CAN_MASK_SPEC>> for R {
|
||||
fn from(reader: crate::R<INTR_CAN_MASK_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTR_CAN_MASK` writer"]
|
||||
pub struct W(crate::W<INTR_CAN_MASK_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTR_CAN_MASK_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 core::convert::From<crate::W<INTR_CAN_MASK_SPEC>> for W {
|
||||
fn from(writer: crate::W<INTR_CAN_MASK_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT_STATUS` reader - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct INT_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl INT_STATUS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
INT_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for INT_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT_STATUS` writer - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct INT_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> INT_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_COMPARE` reader - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct TT_COMPARE_R(crate::FieldReader<bool, bool>);
|
||||
impl TT_COMPARE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TT_COMPARE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TT_COMPARE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_COMPARE` writer - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct TT_COMPARE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_COMPARE_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 `TT_CAPTURE` reader - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct TT_CAPTURE_R(crate::FieldReader<bool, bool>);
|
||||
impl TT_CAPTURE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TT_CAPTURE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TT_CAPTURE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_CAPTURE` writer - Mask bit for corresponding bit in interrupt request register."]
|
||||
pub struct TT_CAPTURE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_CAPTURE_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
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn int_status(&self) -> INT_STATUS_R {
|
||||
INT_STATUS_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_compare(&self) -> TT_COMPARE_R {
|
||||
TT_COMPARE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_capture(&self) -> TT_CAPTURE_R {
|
||||
TT_CAPTURE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn int_status(&mut self) -> INT_STATUS_W {
|
||||
INT_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_compare(&mut self) -> TT_COMPARE_W {
|
||||
TT_COMPARE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Mask bit for corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_capture(&mut self) -> TT_CAPTURE_W {
|
||||
TT_CAPTURE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Interrupt Mask (TTCAN + INT_STATUS Or)\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 [intr_can_mask](index.html) module"]
|
||||
pub struct INTR_CAN_MASK_SPEC;
|
||||
impl crate::RegisterSpec for INTR_CAN_MASK_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intr_can_mask::R](R) reader structure"]
|
||||
impl crate::Readable for INTR_CAN_MASK_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intr_can_mask::W](W) writer structure"]
|
||||
impl crate::Writable for INTR_CAN_MASK_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTR_CAN_MASK to value 0"]
|
||||
impl crate::Resettable for INTR_CAN_MASK_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
#[doc = "Register `INTR_CAN_MASKED` reader"]
|
||||
pub struct R(crate::R<INTR_CAN_MASKED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTR_CAN_MASKED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INTR_CAN_MASKED_SPEC>> for R {
|
||||
fn from(reader: crate::R<INTR_CAN_MASKED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTR_CAN_MASKED` writer"]
|
||||
pub struct W(crate::W<INTR_CAN_MASKED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTR_CAN_MASKED_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 core::convert::From<crate::W<INTR_CAN_MASKED_SPEC>> for W {
|
||||
fn from(writer: crate::W<INTR_CAN_MASKED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT_STATUS` reader - Logical and of corresponding request and mask bits."]
|
||||
pub struct INT_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl INT_STATUS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
INT_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for INT_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_COMPARE` reader - Logical and of corresponding request and mask bits."]
|
||||
pub struct TT_COMPARE_R(crate::FieldReader<bool, bool>);
|
||||
impl TT_COMPARE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TT_COMPARE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TT_COMPARE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_CAPTURE` reader - Logical and of corresponding request and mask bits."]
|
||||
pub struct TT_CAPTURE_R(crate::FieldReader<bool, bool>);
|
||||
impl TT_CAPTURE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TT_CAPTURE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TT_CAPTURE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Logical and of corresponding request and mask bits."]
|
||||
#[inline(always)]
|
||||
pub fn int_status(&self) -> INT_STATUS_R {
|
||||
INT_STATUS_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Logical and of corresponding request and mask bits."]
|
||||
#[inline(always)]
|
||||
pub fn tt_compare(&self) -> TT_COMPARE_R {
|
||||
TT_COMPARE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Logical and of corresponding request and mask bits."]
|
||||
#[inline(always)]
|
||||
pub fn tt_capture(&self) -> TT_CAPTURE_R {
|
||||
TT_CAPTURE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Can Interrupt Masked (TTCAN + INT_STATUS Or)\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 [intr_can_masked](index.html) module"]
|
||||
pub struct INTR_CAN_MASKED_SPEC;
|
||||
impl crate::RegisterSpec for INTR_CAN_MASKED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intr_can_masked::R](R) reader structure"]
|
||||
impl crate::Readable for INTR_CAN_MASKED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intr_can_masked::W](W) writer structure"]
|
||||
impl crate::Writable for INTR_CAN_MASKED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTR_CAN_MASKED to value 0"]
|
||||
impl crate::Resettable for INTR_CAN_MASKED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,142 @@
|
||||
#[doc = "Register `INTR_CAN_SET` reader"]
|
||||
pub struct R(crate::R<INTR_CAN_SET_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTR_CAN_SET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<INTR_CAN_SET_SPEC>> for R {
|
||||
fn from(reader: crate::R<INTR_CAN_SET_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTR_CAN_SET` writer"]
|
||||
pub struct W(crate::W<INTR_CAN_SET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTR_CAN_SET_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 core::convert::From<crate::W<INTR_CAN_SET_SPEC>> for W {
|
||||
fn from(writer: crate::W<INTR_CAN_SET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT_STATUS` writer - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
pub struct INT_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> INT_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TT_COMPARE` writer - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
pub struct TT_COMPARE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_COMPARE_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 `TT_CAPTURE` writer - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
pub struct TT_CAPTURE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TT_CAPTURE_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
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn int_status(&mut self) -> INT_STATUS_W {
|
||||
INT_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_compare(&mut self) -> TT_COMPARE_W {
|
||||
TT_COMPARE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Write with '1' to set corresponding bit in interrupt request register."]
|
||||
#[inline(always)]
|
||||
pub fn tt_capture(&mut self) -> TT_CAPTURE_W {
|
||||
TT_CAPTURE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CAN Interrupt Set (TTCAN + INT_STATUS Or)\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 [intr_can_set](index.html) module"]
|
||||
pub struct INTR_CAN_SET_SPEC;
|
||||
impl crate::RegisterSpec for INTR_CAN_SET_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intr_can_set::R](R) reader structure"]
|
||||
impl crate::Readable for INTR_CAN_SET_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intr_can_set::W](W) writer structure"]
|
||||
impl crate::Writable for INTR_CAN_SET_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTR_CAN_SET to value 0"]
|
||||
impl crate::Resettable for INTR_CAN_SET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
#[doc = "Register `TTCAN_CAPTURE` reader"]
|
||||
pub struct R(crate::R<TTCAN_CAPTURE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TTCAN_CAPTURE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<TTCAN_CAPTURE_SPEC>> for R {
|
||||
fn from(reader: crate::R<TTCAN_CAPTURE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `TTCAN_CAPTURE` writer"]
|
||||
pub struct W(crate::W<TTCAN_CAPTURE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TTCAN_CAPTURE_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 core::convert::From<crate::W<TTCAN_CAPTURE_SPEC>> for W {
|
||||
fn from(writer: crate::W<TTCAN_CAPTURE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SYNC_MARK` reader - copy TTCAN_COUNTER.LOCAL_TIME to TTCAN_CAPTURE.SYNC_MARK, when SOF detected.?when new event triggers, new LOCAL_TIME value will overwrite previous SYNC_MARK value"]
|
||||
pub struct SYNC_MARK_R(crate::FieldReader<u16, u16>);
|
||||
impl SYNC_MARK_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
SYNC_MARK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SYNC_MARK_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 16:31 - copy TTCAN_COUNTER.LOCAL_TIME to TTCAN_CAPTURE.SYNC_MARK, when SOF detected.?when new event triggers, new LOCAL_TIME value will overwrite previous SYNC_MARK value"]
|
||||
#[inline(always)]
|
||||
pub fn sync_mark(&self) -> SYNC_MARK_R {
|
||||
SYNC_MARK_R::new(((self.bits >> 16) & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "TTCAN Level1 capture configuration\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 [ttcan_capture](index.html) module"]
|
||||
pub struct TTCAN_CAPTURE_SPEC;
|
||||
impl crate::RegisterSpec for TTCAN_CAPTURE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ttcan_capture::R](R) reader structure"]
|
||||
impl crate::Readable for TTCAN_CAPTURE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ttcan_capture::W](W) writer structure"]
|
||||
impl crate::Writable for TTCAN_CAPTURE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TTCAN_CAPTURE to value 0"]
|
||||
impl crate::Resettable for TTCAN_CAPTURE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `TTCAN_COMPARE` reader"]
|
||||
pub struct R(crate::R<TTCAN_COMPARE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TTCAN_COMPARE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<TTCAN_COMPARE_SPEC>> for R {
|
||||
fn from(reader: crate::R<TTCAN_COMPARE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `TTCAN_COMPARE` writer"]
|
||||
pub struct W(crate::W<TTCAN_COMPARE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TTCAN_COMPARE_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 core::convert::From<crate::W<TTCAN_COMPARE_SPEC>> for W {
|
||||
fn from(writer: crate::W<TTCAN_COMPARE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TIME_MARK` reader - compare target,?when TTCAN_COUNTER.LOCAL_TIME counts to TT_COMPARE, INTR_CAN.TT_COMPARE will be set"]
|
||||
pub struct TIME_MARK_R(crate::FieldReader<u16, u16>);
|
||||
impl TIME_MARK_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
TIME_MARK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TIME_MARK_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TIME_MARK` writer - compare target,?when TTCAN_COUNTER.LOCAL_TIME counts to TT_COMPARE, INTR_CAN.TT_COMPARE will be set"]
|
||||
pub struct TIME_MARK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TIME_MARK_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 16:31 - compare target,?when TTCAN_COUNTER.LOCAL_TIME counts to TT_COMPARE, INTR_CAN.TT_COMPARE will be set"]
|
||||
#[inline(always)]
|
||||
pub fn time_mark(&self) -> TIME_MARK_R {
|
||||
TIME_MARK_R::new(((self.bits >> 16) & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 16:31 - compare target,?when TTCAN_COUNTER.LOCAL_TIME counts to TT_COMPARE, INTR_CAN.TT_COMPARE will be set"]
|
||||
#[inline(always)]
|
||||
pub fn time_mark(&mut self) -> TIME_MARK_W {
|
||||
TIME_MARK_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "TTCAN Level1 compare configuration\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 [ttcan_compare](index.html) module"]
|
||||
pub struct TTCAN_COMPARE_SPEC;
|
||||
impl crate::RegisterSpec for TTCAN_COMPARE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ttcan_compare::R](R) reader structure"]
|
||||
impl crate::Readable for TTCAN_COMPARE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ttcan_compare::W](W) writer structure"]
|
||||
impl crate::Writable for TTCAN_COMPARE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TTCAN_COMPARE to value 0"]
|
||||
impl crate::Resettable for TTCAN_COMPARE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `TTCAN_COUNTER` reader"]
|
||||
pub struct R(crate::R<TTCAN_COUNTER_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TTCAN_COUNTER_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<TTCAN_COUNTER_SPEC>> for R {
|
||||
fn from(reader: crate::R<TTCAN_COUNTER_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `TTCAN_COUNTER` writer"]
|
||||
pub struct W(crate::W<TTCAN_COUNTER_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TTCAN_COUNTER_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 core::convert::From<crate::W<TTCAN_COUNTER_SPEC>> for W {
|
||||
fn from(writer: crate::W<TTCAN_COUNTER_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOCAL_TIME` reader - Bit time counter in TTCAN level 1"]
|
||||
pub struct LOCAL_TIME_R(crate::FieldReader<u16, u16>);
|
||||
impl LOCAL_TIME_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
LOCAL_TIME_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LOCAL_TIME_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOCAL_TIME` writer - Bit time counter in TTCAN level 1"]
|
||||
pub struct LOCAL_TIME_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LOCAL_TIME_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 16:31 - Bit time counter in TTCAN level 1"]
|
||||
#[inline(always)]
|
||||
pub fn local_time(&self) -> LOCAL_TIME_R {
|
||||
LOCAL_TIME_R::new(((self.bits >> 16) & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 16:31 - Bit time counter in TTCAN level 1"]
|
||||
#[inline(always)]
|
||||
pub fn local_time(&mut self) -> LOCAL_TIME_W {
|
||||
LOCAL_TIME_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "TTCAN Level1 16-Bit local time counter\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 [ttcan_counter](index.html) module"]
|
||||
pub struct TTCAN_COUNTER_SPEC;
|
||||
impl crate::RegisterSpec for TTCAN_COUNTER_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ttcan_counter::R](R) reader structure"]
|
||||
impl crate::Readable for TTCAN_COUNTER_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ttcan_counter::W](W) writer structure"]
|
||||
impl crate::Writable for TTCAN_COUNTER_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TTCAN_COUNTER to value 0"]
|
||||
impl crate::Resettable for TTCAN_COUNTER_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,217 @@
|
||||
#[doc = "Register `TTCAN_TIMING` reader"]
|
||||
pub struct R(crate::R<TTCAN_TIMING_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TTCAN_TIMING_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<TTCAN_TIMING_SPEC>> for R {
|
||||
fn from(reader: crate::R<TTCAN_TIMING_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `TTCAN_TIMING` writer"]
|
||||
pub struct W(crate::W<TTCAN_TIMING_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TTCAN_TIMING_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 core::convert::From<crate::W<TTCAN_TIMING_SPEC>> for W {
|
||||
fn from(writer: crate::W<TTCAN_TIMING_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SAMPLING_MODE` reader - CAN bus bit sampling??0?: One sampling point is used in the receiver path??1?: 3 sampling points with majority decision are used"]
|
||||
pub struct SAMPLING_MODE_R(crate::FieldReader<bool, bool>);
|
||||
impl SAMPLING_MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SAMPLING_MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SAMPLING_MODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SAMPLING_MODE` writer - CAN bus bit sampling??0?: One sampling point is used in the receiver path??1?: 3 sampling points with majority decision are used"]
|
||||
pub struct SAMPLING_MODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SAMPLING_MODE_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 `CFG_TSEG2` reader - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
pub struct CFG_TSEG2_R(crate::FieldReader<u8, u8>);
|
||||
impl CFG_TSEG2_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CFG_TSEG2_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_TSEG2_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG2` writer - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
pub struct CFG_TSEG2_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_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 << 5)) | ((value as u32 & 0x07) << 5);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG1` reader - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
pub struct CFG_TSEG1_R(crate::FieldReader<u8, u8>);
|
||||
impl CFG_TSEG1_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CFG_TSEG1_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_TSEG1_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_TSEG1` writer - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
pub struct CFG_TSEG1_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_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 << 8)) | ((value as u32 & 0x0f) << 8);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_BITRATE` reader - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
pub struct CFG_BITRATE_R(crate::FieldReader<u16, u16>);
|
||||
impl CFG_BITRATE_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
CFG_BITRATE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CFG_BITRATE_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CFG_BITRATE` writer - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
pub struct CFG_BITRATE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CFG_BITRATE_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 << 16)) | ((value as u32 & 0x7fff) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - CAN bus bit sampling??0?: One sampling point is used in the receiver path??1?: 3 sampling points with majority decision are used"]
|
||||
#[inline(always)]
|
||||
pub fn sampling_mode(&self) -> SAMPLING_MODE_R {
|
||||
SAMPLING_MODE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 5:7 - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg2(&self) -> CFG_TSEG2_R {
|
||||
CFG_TSEG2_R::new(((self.bits >> 5) & 0x07) as u8)
|
||||
}
|
||||
#[doc = "Bits 8:11 - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg1(&self) -> CFG_TSEG1_R {
|
||||
CFG_TSEG1_R::new(((self.bits >> 8) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bits 16:30 - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_bitrate(&self) -> CFG_BITRATE_R {
|
||||
CFG_BITRATE_R::new(((self.bits >> 16) & 0x7fff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - CAN bus bit sampling??0?: One sampling point is used in the receiver path??1?: 3 sampling points with majority decision are used"]
|
||||
#[inline(always)]
|
||||
pub fn sampling_mode(&mut self) -> SAMPLING_MODE_W {
|
||||
SAMPLING_MODE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 5:7 - Time segment 2?Length of the second time segment:?tseg2 = cfg_tseg2 + 1?cfg_tseg2=0 is not allowed; cfg_tseg2=1 is only?allowed in direct sampling mode."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg2(&mut self) -> CFG_TSEG2_W {
|
||||
CFG_TSEG2_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:11 - Time segment 1?Length of the first time segment:?tseg1 = cfg_tseg1 + 1?Time segment 1 includes the propagation time.?cfg_tseg1=0 and cfg_tseg1=1 are not allowed."]
|
||||
#[inline(always)]
|
||||
pub fn cfg_tseg1(&mut self) -> CFG_TSEG1_W {
|
||||
CFG_TSEG1_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:30 - Prescaler for generating the time quantum?which defines the TQ:?0: One time quantum equals 1 clock cycle?1: One time quantum equals 2 clock cycles?...?32767: One time quantum equals 32768 clock?cycles"]
|
||||
#[inline(always)]
|
||||
pub fn cfg_bitrate(&mut self) -> CFG_BITRATE_W {
|
||||
CFG_BITRATE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "TTCAN Level1 timing configuration, duplicate of CONFIG fields\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 [ttcan_timing](index.html) module"]
|
||||
pub struct TTCAN_TIMING_SPEC;
|
||||
impl crate::RegisterSpec for TTCAN_TIMING_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ttcan_timing::R](R) reader structure"]
|
||||
impl crate::Readable for TTCAN_TIMING_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ttcan_timing::W](W) writer structure"]
|
||||
impl crate::Writable for TTCAN_TIMING_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TTCAN_TIMING to value 0"]
|
||||
impl crate::Resettable for TTCAN_TIMING_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_HIGH` reader"]
|
||||
pub struct R(crate::R<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_HIGH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_HIGH_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_HIGH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_HIGH` writer"]
|
||||
pub struct W(crate::W<DATA_HIGH_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_HIGH_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 core::convert::From<crate::W<DATA_HIGH_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_HIGH_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[63:32\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[63:32\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[63:32\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data high\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 [data_high](index.html) module"]
|
||||
pub struct DATA_HIGH_SPEC;
|
||||
impl crate::RegisterSpec for DATA_HIGH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_high::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_HIGH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_high::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_HIGH_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_HIGH to value 0"]
|
||||
impl crate::Resettable for DATA_HIGH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `DATA_LOW` reader"]
|
||||
pub struct R(crate::R<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_LOW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<DATA_LOW_SPEC>> for R {
|
||||
fn from(reader: crate::R<DATA_LOW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA_LOW` writer"]
|
||||
pub struct W(crate::W<DATA_LOW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_LOW_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 core::convert::From<crate::W<DATA_LOW_SPEC>> for W {
|
||||
fn from(writer: crate::W<DATA_LOW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` reader - Data\\[31:0\\]"]
|
||||
pub struct DATA_R(crate::FieldReader<u32, u32>);
|
||||
impl DATA_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
DATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATA_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATA` writer - Data\\[31:0\\]"]
|
||||
pub struct DATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATA_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Data\\[31:0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn data(&mut self) -> DATA_W {
|
||||
DATA_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Data low\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 [data_low](index.html) module"]
|
||||
pub struct DATA_LOW_SPEC;
|
||||
impl crate::RegisterSpec for DATA_LOW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data_low::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_LOW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data_low::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_LOW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA_LOW to value 0"]
|
||||
impl crate::Resettable for DATA_LOW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ID` reader"]
|
||||
pub struct R(crate::R<ID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ID_SPEC>> for R {
|
||||
fn from(reader: crate::R<ID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ID` writer"]
|
||||
pub struct W(crate::W<ID_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ID_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 core::convert::From<crate::W<ID_SPEC>> for W {
|
||||
fn from(writer: crate::W<ID_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - RxMessage: Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - RxMessage: Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 3:31 - RxMessage: Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Identifier\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 [id](index.html) module"]
|
||||
pub struct ID_SPEC;
|
||||
impl crate::RegisterSpec for ID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [id::R](R) reader structure"]
|
||||
impl crate::Readable for ID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
|
||||
impl crate::Writable for ID_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ID to value 0"]
|
||||
impl crate::Resettable for ID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - RxMessage Buffer control/command"]
|
||||
pub control: crate::Reg<control::CONTROL_SPEC>,
|
||||
#[doc = "0x04 - Identifier"]
|
||||
pub id: crate::Reg<id::ID_SPEC>,
|
||||
#[doc = "0x08 - RxMessage Data high"]
|
||||
pub data_high: crate::Reg<data_high::DATA_HIGH_SPEC>,
|
||||
#[doc = "0x0c - RxMessage Data low"]
|
||||
pub data_low: crate::Reg<data_low::DATA_LOW_SPEC>,
|
||||
#[doc = "0x10 - Acceptance Mask Register"]
|
||||
pub amr: crate::Reg<amr::AMR_SPEC>,
|
||||
#[doc = "0x14 - Acceptance Code Register"]
|
||||
pub acr: crate::Reg<acr::ACR_SPEC>,
|
||||
#[doc = "0x18 - Acceptance Mask Register ? Data"]
|
||||
pub amr_data: crate::Reg<amr_data::AMR_DATA_SPEC>,
|
||||
#[doc = "0x1c - Acceptance Code Register ? Data"]
|
||||
pub acr_data: crate::Reg<acr_data::ACR_DATA_SPEC>,
|
||||
}
|
||||
#[doc = "CONTROL register accessor: an alias for `Reg<CONTROL_SPEC>`"]
|
||||
pub type CONTROL = crate::Reg<control::CONTROL_SPEC>;
|
||||
#[doc = "RxMessage Buffer control/command"]
|
||||
pub mod control;
|
||||
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
|
||||
pub type ID = crate::Reg<id::ID_SPEC>;
|
||||
#[doc = "Identifier"]
|
||||
pub mod id;
|
||||
#[doc = "DATA_HIGH register accessor: an alias for `Reg<DATA_HIGH_SPEC>`"]
|
||||
pub type DATA_HIGH = crate::Reg<data_high::DATA_HIGH_SPEC>;
|
||||
#[doc = "RxMessage Data high"]
|
||||
pub mod data_high;
|
||||
#[doc = "DATA_LOW register accessor: an alias for `Reg<DATA_LOW_SPEC>`"]
|
||||
pub type DATA_LOW = crate::Reg<data_low::DATA_LOW_SPEC>;
|
||||
#[doc = "RxMessage Data low"]
|
||||
pub mod data_low;
|
||||
#[doc = "AMR register accessor: an alias for `Reg<AMR_SPEC>`"]
|
||||
pub type AMR = crate::Reg<amr::AMR_SPEC>;
|
||||
#[doc = "Acceptance Mask Register"]
|
||||
pub mod amr;
|
||||
#[doc = "ACR register accessor: an alias for `Reg<ACR_SPEC>`"]
|
||||
pub type ACR = crate::Reg<acr::ACR_SPEC>;
|
||||
#[doc = "Acceptance Code Register"]
|
||||
pub mod acr;
|
||||
#[doc = "AMR_DATA register accessor: an alias for `Reg<AMR_DATA_SPEC>`"]
|
||||
pub type AMR_DATA = crate::Reg<amr_data::AMR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Mask Register ? Data"]
|
||||
pub mod amr_data;
|
||||
#[doc = "ACR_DATA register accessor: an alias for `Reg<ACR_DATA_SPEC>`"]
|
||||
pub type ACR_DATA = crate::Reg<acr_data::ACR_DATA_SPEC>;
|
||||
#[doc = "Acceptance Code Register ? Data"]
|
||||
pub mod acr_data;
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `ACR` reader"]
|
||||
pub struct R(crate::R<ACR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR` writer"]
|
||||
pub struct W(crate::W<ACR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_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 core::convert::From<crate::W<ACR_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code 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 [acr](index.html) module"]
|
||||
pub struct ACR_SPEC;
|
||||
impl crate::RegisterSpec for ACR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR to value 0"]
|
||||
impl crate::Resettable for ACR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `ACR_DATA` reader"]
|
||||
pub struct R(crate::R<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ACR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<ACR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<ACR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ACR_DATA` writer"]
|
||||
pub struct W(crate::W<ACR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ACR_DATA_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 core::convert::From<crate::W<ACR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<ACR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\]"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\]"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\]"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Code Register ? Data\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 [acr_data](index.html) module"]
|
||||
pub struct ACR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for ACR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [acr_data::R](R) reader structure"]
|
||||
impl crate::Readable for ACR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [acr_data::W](W) writer structure"]
|
||||
impl crate::Writable for ACR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ACR_DATA to value 0"]
|
||||
impl crate::Resettable for ACR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
#[doc = "Register `AMR` reader"]
|
||||
pub struct R(crate::R<AMR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR` writer"]
|
||||
pub struct W(crate::W<AMR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_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 core::convert::From<crate::W<AMR_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR` reader - No description available"]
|
||||
pub struct RTR_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_R {
|
||||
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 - No description available"]
|
||||
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 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE` reader - No description available"]
|
||||
pub struct IDE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_R {
|
||||
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 - No description available"]
|
||||
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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` reader - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_R(crate::FieldReader<u32, u32>);
|
||||
impl ID_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ID_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ID_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ID` writer - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
pub struct ID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ID_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x1fff_ffff << 3)) | ((value as u32 & 0x1fff_ffff) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&self) -> RTR_R {
|
||||
RTR_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&self) -> IDE_R {
|
||||
IDE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&self) -> ID_R {
|
||||
ID_R::new(((self.bits >> 3) & 0x1fff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn rtr(&mut self) -> RTR_W {
|
||||
RTR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - No description available"]
|
||||
#[inline(always)]
|
||||
pub fn ide(&mut self) -> IDE_W {
|
||||
IDE_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 3:31 - Identifier?it cannot be used to match both 11bit and 29bit identifiers,?in case of 11bit identifiers, lower 18bits should be all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn id(&mut self) -> ID_W {
|
||||
ID_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask 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 [amr](index.html) module"]
|
||||
pub struct AMR_SPEC;
|
||||
impl crate::RegisterSpec for AMR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR to value 0"]
|
||||
impl crate::Resettable for AMR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `AMR_DATA` reader"]
|
||||
pub struct R(crate::R<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMR_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<AMR_DATA_SPEC>> for R {
|
||||
fn from(reader: crate::R<AMR_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `AMR_DATA` writer"]
|
||||
pub struct W(crate::W<AMR_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<AMR_DATA_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 core::convert::From<crate::W<AMR_DATA_SPEC>> for W {
|
||||
fn from(writer: crate::W<AMR_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` reader - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_R(crate::FieldReader<u16, u16>);
|
||||
impl DATAL_R {
|
||||
pub(crate) fn new(bits: u16) -> Self {
|
||||
DATAL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATAL_R {
|
||||
type Target = crate::FieldReader<u16, u16>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATAL` writer - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
pub struct DATAL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATAL_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 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&self) -> DATAL_R {
|
||||
DATAL_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:15 - Data\\[63:48\\],?when DUT is NOT configured to receive only DATA frame, this register should be configured with all ones (don?t care)"]
|
||||
#[inline(always)]
|
||||
pub fn datal(&mut self) -> DATAL_W {
|
||||
DATAL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Acceptance Mask Register ? Data\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 [amr_data](index.html) module"]
|
||||
pub struct AMR_DATA_SPEC;
|
||||
impl crate::RegisterSpec for AMR_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amr_data::R](R) reader structure"]
|
||||
impl crate::Readable for AMR_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [amr_data::W](W) writer structure"]
|
||||
impl crate::Writable for AMR_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMR_DATA to value 0"]
|
||||
impl crate::Resettable for AMR_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
#[doc = "Register `CONTROL` reader"]
|
||||
pub struct R(crate::R<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONTROL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::convert::From<crate::R<CONTROL_SPEC>> for R {
|
||||
fn from(reader: crate::R<CONTROL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONTROL` writer"]
|
||||
pub struct W(crate::W<CONTROL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONTROL_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 core::convert::From<crate::W<CONTROL_SPEC>> for W {
|
||||
fn from(writer: crate::W<CONTROL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MSG_AV_RTRSENT` writer - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
pub struct MSG_AV_RTRSENT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MSG_AV_RTRSENT_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY_PEND` reader - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
pub struct RTR_REPLY_PEND_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_PEND_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_PEND_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_PEND_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` reader - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_ABORT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_ABORT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_ABORT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_ABORT` writer - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
pub struct RTR_ABORT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_ABORT_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 `BUFFER_EN` reader - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_R(crate::FieldReader<bool, bool>);
|
||||
impl BUFFER_EN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BUFFER_EN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BUFFER_EN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BUFFER_EN` writer - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
pub struct BUFFER_EN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BUFFER_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 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` reader - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_REPLY_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_REPLY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_REPLY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_REPLY` writer - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
pub struct RTR_REPLY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_REPLY_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 `RX_INT_EBL` reader - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_R(crate::FieldReader<bool, bool>);
|
||||
impl RX_INT_EBL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RX_INT_EBL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RX_INT_EBL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RX_INT_EBL` writer - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
pub struct RX_INT_EBL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RX_INT_EBL_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 `LINK_FLAG` reader - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_R(crate::FieldReader<bool, bool>);
|
||||
impl LINK_FLAG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LINK_FLAG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LINK_FLAG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LINK_FLAG` writer - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
pub struct LINK_FLAG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LINK_FLAG_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 `WPNL` reader - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNL_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNL` writer - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
pub struct WPNL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNL_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 `DLC` reader - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct DLC_R(crate::FieldReader<u8, u8>);
|
||||
impl DLC_R {
|
||||
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 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
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 << 16)) | ((value as u32 & 0x0f) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` reader - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_R(crate::FieldReader<bool, bool>);
|
||||
impl IDE_FMT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDE_FMT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDE_FMT_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDE_FMT` writer - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct IDE_FMT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDE_FMT_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 << 20)) | ((value as u32 & 0x01) << 20);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` reader - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_R(crate::FieldReader<bool, bool>);
|
||||
impl RTR_MSG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RTR_MSG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RTR_MSG_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RTR_MSG` writer - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
pub struct RTR_MSG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RTR_MSG_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 << 21)) | ((value as u32 & 0x01) << 21);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` reader - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_R(crate::FieldReader<bool, bool>);
|
||||
impl WPNH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WPNH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WPNH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WPNH` writer - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
pub struct WPNH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WPNH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - RTReply_pending status?'0': No RTR reply request pending?'1': RTR reply request pending"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply_pend(&self) -> RTR_REPLY_PEND_R {
|
||||
RTR_REPLY_PEND_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&self) -> RTR_ABORT_R {
|
||||
RTR_ABORT_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&self) -> BUFFER_EN_R {
|
||||
BUFFER_EN_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&self) -> RTR_REPLY_R {
|
||||
RTR_REPLY_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&self) -> RX_INT_EBL_R {
|
||||
RX_INT_EBL_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&self) -> LINK_FLAG_R {
|
||||
LINK_FLAG_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&self) -> WPNL_R {
|
||||
WPNL_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&self) -> DLC_R {
|
||||
DLC_R::new(((self.bits >> 16) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&self) -> IDE_FMT_R {
|
||||
IDE_FMT_R::new(((self.bits >> 20) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&self) -> RTR_MSG_R {
|
||||
RTR_MSG_R::new(((self.bits >> 21) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&self) -> WPNH_R {
|
||||
WPNH_R::new(((self.bits >> 23) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Msg Available/RTR Sent?If RTReply flag is set, this bit shows if an RTR auto-reply message has been sent, otherwise it indicates if the buffer contains a valid message.?Read: ?'0': Idle?'1': New message available (RTRreply=0), RTR auto-reply message sent (RTRreply=1).??Write:?'0': Idle?'1': Acknowledges receipt of new message or transmission of RTR auto-reply message."]
|
||||
#[inline(always)]
|
||||
pub fn msg_av_rtrsent(&mut self) -> MSG_AV_RTRSENT_W {
|
||||
MSG_AV_RTRSENT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RTR Abort Request?'0': Idle?'1': Requests removal of a pending RTR message?reply. The flag is cleared when the message?was removed or when the message won arbitration.?The TxReq flag is released at the?same time."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_abort(&mut self) -> RTR_ABORT_W {
|
||||
RTR_ABORT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Buffer Enable??0?: Buffer is disabled??1?: Buffer is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn buffer_en(&mut self) -> BUFFER_EN_W {
|
||||
BUFFER_EN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - automatic message reply upon receipt?of an RTR message??0?: Automatic RTR message handling disabled??1?: Automatic RTR message handling enabled??when this bit is set, only RTR message can be received, by setting AMR.RTR=0, AMR.RTR=1.?Otherwise, the RTR reply message content will corrupted by received non-RTR message."]
|
||||
#[inline(always)]
|
||||
pub fn rtr_reply(&mut self) -> RTR_REPLY_W {
|
||||
RTR_REPLY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - RxIntEbl, Receive Interrupt Enable??0?: Interrupt generation is disabled?'1?: Interrupt generation is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn rx_int_ebl(&mut self) -> RX_INT_EBL_W {
|
||||
RX_INT_EBL_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Link Flag??0?: This buffer is not linked to the next??1?: This buffer is linked with next buffer"]
|
||||
#[inline(always)]
|
||||
pub fn link_flag(&mut self) -> LINK_FLAG_W {
|
||||
LINK_FLAG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - WPNL, Write Protectiontion for bit \\[6:3\\].?'0': Bits \\[6:3\\]
|
||||
are write protected,?'1': Bits \\[6:3\\]
|
||||
are modified by writes.?This WPNL bit must always be set in the same write that is modifying bits \\[6:3\\], as this bit state is not preserved.?This bit is always zero for readback."]
|
||||
#[inline(always)]
|
||||
pub fn wpnl(&mut self) -> WPNL_W {
|
||||
WPNL_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:19 - DLC, Data Length Code?0: Message has 0 data bytes, data\\[63:0\\]
|
||||
is notvalid?1: Message has 1 data byte, data\\[63:56\\]
|
||||
is valid?..?8: Message has 8 data bytes, data\\[63:0\\]
|
||||
is valid?9-15: Message has 8 data bytes??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn dlc(&mut self) -> DLC_W {
|
||||
DLC_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 20 - Extended Identifier Bit?'1': This is an extended format message?'0': This is a standard format message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be aligned offline and set by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn ide_fmt(&mut self) -> IDE_FMT_W {
|
||||
IDE_FMT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 21 - Remote Bit?'1': This is an RTR message?'0': This is a regular message??depending on RTR_REPLY setting,?0, this field will be updated by received data/remote frame?1, this field should be set to 0 (data frame type) by user in advance, will not be updated by received data/remote frame, and will be sent out in responsive data frame"]
|
||||
#[inline(always)]
|
||||
pub fn rtr_msg(&mut self) -> RTR_MSG_W {
|
||||
RTR_MSG_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - WPNH, Write Protection for bits\\[21:16\\].?'0': Bit \\[21:16\\]
|
||||
are write protected,?'1': Bit \\[21:16\\]
|
||||
are modified by writes.?The WPNH bit must always be set in the same write that is modifying the bits\\[21:16\\]
|
||||
as this bit state is not preserved.?The readback value of this bit is undefined."]
|
||||
#[inline(always)]
|
||||
pub fn wpnh(&mut self) -> WPNH_W {
|
||||
WPNH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "RxMessage Buffer control/command\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 [control](index.html) module"]
|
||||
pub struct CONTROL_SPEC;
|
||||
impl crate::RegisterSpec for CONTROL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [control::R](R) reader structure"]
|
||||
impl crate::Readable for CONTROL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [control::W](W) writer structure"]
|
||||
impl crate::Writable for CONTROL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONTROL to value 0"]
|
||||
impl crate::Resettable for CONTROL_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
Loading…
Reference in new issue