First building PAC version
Generated a first building version of the PAC. The PAC was generated with a specially patched version of svd2rust 0.19.0: https://github.com/robamu/svd2rust/tree/mueller/develop
This commit is contained in:
18
Cargo.toml
Normal file
18
Cargo.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "va108xx"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
description = "Peripheral access API for Vorago VA108XX microcontrollers"
|
||||
license = "Apache-2.0 or MIT"
|
||||
authors = ["Robin Mueller <robin.mueller.m@gmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
cortex-m = "0.7.3"
|
||||
vcell = "0.1.3"
|
||||
|
||||
[dependencies.cortex-m-rt]
|
||||
optional = true
|
||||
version = ">=0.6.15,<0.8"
|
||||
|
||||
[features]
|
||||
rt = ["cortex-m-rt/device"]
|
17
build.rs
17
build.rs
@ -1 +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") ; }
|
||||
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");
|
||||
}
|
||||
|
260
src/generic.rs
Normal file
260
src/generic.rs
Normal file
@ -0,0 +1,260 @@
|
||||
use core::marker;
|
||||
#[doc = " Raw register type"]
|
||||
pub trait RegisterSpec {
|
||||
#[doc = " Raw register type (`u8`, `u16`, `u32`, ...)."]
|
||||
type Ux: Copy;
|
||||
}
|
||||
#[doc = " Trait implemented by readable registers to enable the `read` method."]
|
||||
#[doc = ""]
|
||||
#[doc = " Registers marked with `Writable` can be also `modify`'ed."]
|
||||
pub trait Readable: RegisterSpec {
|
||||
#[doc = " Result from a call to `read` and argument to `modify`."]
|
||||
type Reader: From<R<Self>> + core::ops::Deref<Target = R<Self>>;
|
||||
}
|
||||
#[doc = " Trait implemented by writeable registers."]
|
||||
#[doc = ""]
|
||||
#[doc = " This enables the `write`, `write_with_zero` and `reset` methods."]
|
||||
#[doc = ""]
|
||||
#[doc = " Registers marked with `Readable` can be also `modify`'ed."]
|
||||
pub trait Writable: RegisterSpec {
|
||||
#[doc = " Writer type argument to `write`, et al."]
|
||||
type Writer: From<W<Self>> + core::ops::DerefMut<Target = W<Self>>;
|
||||
}
|
||||
#[doc = " Reset value of the register."]
|
||||
#[doc = ""]
|
||||
#[doc = " This value is the initial value for the `write` method. It can also be directly written to the"]
|
||||
#[doc = " register by using the `reset` method."]
|
||||
pub trait Resettable: RegisterSpec {
|
||||
#[doc = " Reset value of the register."]
|
||||
fn reset_value() -> Self::Ux;
|
||||
}
|
||||
#[doc = " This structure provides volatile access to registers."]
|
||||
#[repr(transparent)]
|
||||
pub struct Reg<REG: RegisterSpec> {
|
||||
register: vcell::VolatileCell<REG::Ux>,
|
||||
_marker: marker::PhantomData<REG>,
|
||||
}
|
||||
unsafe impl<REG: RegisterSpec> Send for Reg<REG> where REG::Ux: Send {}
|
||||
impl<REG: RegisterSpec> Reg<REG> {
|
||||
#[doc = " Returns the underlying memory address of register."]
|
||||
#[doc = ""]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " let reg_ptr = periph.reg.as_ptr();"]
|
||||
#[doc = " ```"]
|
||||
#[inline(always)]
|
||||
pub fn as_ptr(&self) -> *mut REG::Ux {
|
||||
self.register.as_ptr()
|
||||
}
|
||||
}
|
||||
impl<REG: Readable> Reg<REG> {
|
||||
#[doc = " Reads the contents of a `Readable` register."]
|
||||
#[doc = ""]
|
||||
#[doc = " You can read the raw contents of a register by using `bits`:"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " let bits = periph.reg.read().bits();"]
|
||||
#[doc = " ```"]
|
||||
#[doc = " or get the content of a particular field of a register:"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " let reader = periph.reg.read();"]
|
||||
#[doc = " let bits = reader.field1().bits();"]
|
||||
#[doc = " let flag = reader.field2().bit_is_set();"]
|
||||
#[doc = " ```"]
|
||||
#[inline(always)]
|
||||
pub fn read(&self) -> REG::Reader {
|
||||
REG::Reader::from(R {
|
||||
bits: self.register.get(),
|
||||
_reg: marker::PhantomData,
|
||||
})
|
||||
}
|
||||
}
|
||||
impl<REG: Resettable + Writable> Reg<REG> {
|
||||
#[doc = " Writes the reset value to `Writable` register."]
|
||||
#[doc = ""]
|
||||
#[doc = " Resets the register to its initial state."]
|
||||
#[inline(always)]
|
||||
pub fn reset(&self) {
|
||||
self.register.set(REG::reset_value())
|
||||
}
|
||||
#[doc = " Writes bits to a `Writable` register."]
|
||||
#[doc = ""]
|
||||
#[doc = " You can write raw bits into a register:"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " periph.reg.write(|w| unsafe { w.bits(rawbits) });"]
|
||||
#[doc = " ```"]
|
||||
#[doc = " or write only the fields you need:"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " periph.reg.write(|w| w"]
|
||||
#[doc = " .field1().bits(newfield1bits)"]
|
||||
#[doc = " .field2().set_bit()"]
|
||||
#[doc = " .field3().variant(VARIANT)"]
|
||||
#[doc = " );"]
|
||||
#[doc = " ```"]
|
||||
#[doc = " In the latter case, other fields will be set to their reset value."]
|
||||
#[inline(always)]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut REG::Writer) -> &mut W<REG>,
|
||||
{
|
||||
self.register.set(
|
||||
f(&mut REG::Writer::from(W {
|
||||
bits: REG::reset_value(),
|
||||
_reg: marker::PhantomData,
|
||||
}))
|
||||
.bits,
|
||||
);
|
||||
}
|
||||
}
|
||||
impl<REG: Writable> Reg<REG>
|
||||
where
|
||||
REG::Ux: Default,
|
||||
{
|
||||
#[doc = " Writes 0 to a `Writable` register."]
|
||||
#[doc = ""]
|
||||
#[doc = " Similar to `write`, but unused bits will contain 0."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn write_with_zero<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut REG::Writer) -> &mut W<REG>,
|
||||
{
|
||||
self.register.set(
|
||||
(*f(&mut REG::Writer::from(W {
|
||||
bits: REG::Ux::default(),
|
||||
_reg: marker::PhantomData,
|
||||
})))
|
||||
.bits,
|
||||
);
|
||||
}
|
||||
}
|
||||
impl<REG: Readable + Writable> Reg<REG> {
|
||||
#[doc = " Modifies the contents of the register by reading and then writing it."]
|
||||
#[doc = ""]
|
||||
#[doc = " E.g. to do a read-modify-write sequence to change parts of a register:"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " periph.reg.modify(|r, w| unsafe { w.bits("]
|
||||
#[doc = " r.bits() | 3"]
|
||||
#[doc = " ) });"]
|
||||
#[doc = " ```"]
|
||||
#[doc = " or"]
|
||||
#[doc = " ```ignore"]
|
||||
#[doc = " periph.reg.modify(|_, w| w"]
|
||||
#[doc = " .field1().bits(newfield1bits)"]
|
||||
#[doc = " .field2().set_bit()"]
|
||||
#[doc = " .field3().variant(VARIANT)"]
|
||||
#[doc = " );"]
|
||||
#[doc = " ```"]
|
||||
#[doc = " Other fields will have the value they had before the call to `modify`."]
|
||||
#[inline(always)]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(®::Reader, &'w mut REG::Writer) -> &'w mut W<REG>,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
self.register.set(
|
||||
f(
|
||||
®::Reader::from(R {
|
||||
bits,
|
||||
_reg: marker::PhantomData,
|
||||
}),
|
||||
&mut REG::Writer::from(W {
|
||||
bits,
|
||||
_reg: marker::PhantomData,
|
||||
}),
|
||||
)
|
||||
.bits,
|
||||
);
|
||||
}
|
||||
}
|
||||
#[doc = " Register reader."]
|
||||
#[doc = ""]
|
||||
#[doc = " Result of the `read` methods of registers. Also used as a closure argument in the `modify`"]
|
||||
#[doc = " method."]
|
||||
pub struct R<REG: RegisterSpec + ?Sized> {
|
||||
pub(crate) bits: REG::Ux,
|
||||
_reg: marker::PhantomData<REG>,
|
||||
}
|
||||
impl<REG: RegisterSpec> R<REG> {
|
||||
#[doc = " Reads raw bits from register."]
|
||||
#[inline(always)]
|
||||
pub fn bits(&self) -> REG::Ux {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl<REG: RegisterSpec, FI> PartialEq<FI> for R<REG>
|
||||
where
|
||||
REG::Ux: PartialEq,
|
||||
FI: Copy + Into<REG::Ux>,
|
||||
{
|
||||
#[inline(always)]
|
||||
fn eq(&self, other: &FI) -> bool {
|
||||
self.bits.eq(&(*other).into())
|
||||
}
|
||||
}
|
||||
#[doc = " Register writer."]
|
||||
#[doc = ""]
|
||||
#[doc = " Used as an argument to the closures in the `write` and `modify` methods of the register."]
|
||||
pub struct W<REG: RegisterSpec + ?Sized> {
|
||||
#[doc = "Writable bits"]
|
||||
pub(crate) bits: REG::Ux,
|
||||
_reg: marker::PhantomData<REG>,
|
||||
}
|
||||
impl<REG: RegisterSpec> W<REG> {
|
||||
#[doc = " Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: REG::Ux) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = " Field reader."]
|
||||
#[doc = ""]
|
||||
#[doc = " Result of the `read` methods of fields."]
|
||||
pub struct FieldReader<U, T> {
|
||||
pub(crate) bits: U,
|
||||
_reg: marker::PhantomData<T>,
|
||||
}
|
||||
impl<U, T> FieldReader<U, T>
|
||||
where
|
||||
U: Copy,
|
||||
{
|
||||
#[doc = " Creates a new instance of the reader."]
|
||||
#[allow(unused)]
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: U) -> Self {
|
||||
Self {
|
||||
bits,
|
||||
_reg: marker::PhantomData,
|
||||
}
|
||||
}
|
||||
#[doc = " Reads raw bits from field."]
|
||||
#[inline(always)]
|
||||
pub fn bits(&self) -> U {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl<U, T, FI> PartialEq<FI> for FieldReader<U, T>
|
||||
where
|
||||
U: PartialEq,
|
||||
FI: Copy + Into<U>,
|
||||
{
|
||||
#[inline(always)]
|
||||
fn eq(&self, other: &FI) -> bool {
|
||||
self.bits.eq(&(*other).into())
|
||||
}
|
||||
}
|
||||
impl<FI> FieldReader<bool, FI> {
|
||||
#[doc = " Value of the field as raw bits."]
|
||||
#[inline(always)]
|
||||
pub fn bit(&self) -> bool {
|
||||
self.bits
|
||||
}
|
||||
#[doc = " Returns `true` if the bit is clear (0)."]
|
||||
#[inline(always)]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = " Returns `true` if the bit is set (1)."]
|
||||
#[inline(always)]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
}
|
240
src/i2ca.rs
Normal file
240
src/i2ca.rs
Normal file
@ -0,0 +1,240 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Control Register"]
|
||||
pub ctrl: crate::Reg<ctrl::CTRL_SPEC>,
|
||||
#[doc = "0x04 - Clock Scale divide value"]
|
||||
pub clkscale: crate::Reg<clkscale::CLKSCALE_SPEC>,
|
||||
#[doc = "0x08 - Word Count value"]
|
||||
pub words: crate::Reg<words::WORDS_SPEC>,
|
||||
#[doc = "0x0c - I2C Address value"]
|
||||
pub address: crate::Reg<address::ADDRESS_SPEC>,
|
||||
#[doc = "0x10 - Data Input/Output"]
|
||||
pub data: crate::Reg<data::DATA_SPEC>,
|
||||
#[doc = "0x14 - Command Register"]
|
||||
pub cmd: crate::Reg<cmd::CMD_SPEC>,
|
||||
#[doc = "0x18 - I2C Controller Status Register"]
|
||||
pub status: crate::Reg<status::STATUS_SPEC>,
|
||||
#[doc = "0x1c - Internal STATE of I2C Master Controller"]
|
||||
pub state: crate::Reg<state::STATE_SPEC>,
|
||||
#[doc = "0x20 - TX Count Register"]
|
||||
pub txcount: crate::Reg<txcount::TXCOUNT_SPEC>,
|
||||
#[doc = "0x24 - RX Count Register"]
|
||||
pub rxcount: crate::Reg<rxcount::RXCOUNT_SPEC>,
|
||||
#[doc = "0x28 - Interrupt Enable Register"]
|
||||
pub irq_enb: crate::Reg<irq_enb::IRQ_ENB_SPEC>,
|
||||
#[doc = "0x2c - Raw Interrupt Status Register"]
|
||||
pub irq_raw: crate::Reg<irq_raw::IRQ_RAW_SPEC>,
|
||||
#[doc = "0x30 - Enabled Interrupt Status Register"]
|
||||
pub irq_end: crate::Reg<irq_end::IRQ_END_SPEC>,
|
||||
#[doc = "0x34 - Clear Interrupt Status Register"]
|
||||
pub irq_clr: crate::Reg<irq_clr::IRQ_CLR_SPEC>,
|
||||
#[doc = "0x38 - Rx FIFO IRQ Trigger Level"]
|
||||
pub rxfifoirqtrg: crate::Reg<rxfifoirqtrg::RXFIFOIRQTRG_SPEC>,
|
||||
#[doc = "0x3c - Tx FIFO IRQ Trigger Level"]
|
||||
pub txfifoirqtrg: crate::Reg<txfifoirqtrg::TXFIFOIRQTRG_SPEC>,
|
||||
#[doc = "0x40 - Clear FIFO Register"]
|
||||
pub fifo_clr: crate::Reg<fifo_clr::FIFO_CLR_SPEC>,
|
||||
#[doc = "0x44 - Timing Config Register"]
|
||||
pub tmconfig: crate::Reg<tmconfig::TMCONFIG_SPEC>,
|
||||
#[doc = "0x48 - Clock Low Timeout Limit Register"]
|
||||
pub clktolimit: crate::Reg<clktolimit::CLKTOLIMIT_SPEC>,
|
||||
_reserved19: [u8; 0xb4],
|
||||
#[doc = "0x100 - Slave Control Register"]
|
||||
pub s0_ctrl: crate::Reg<s0_ctrl::S0_CTRL_SPEC>,
|
||||
#[doc = "0x104 - Slave MaxWords Register"]
|
||||
pub s0_maxwords: crate::Reg<s0_maxwords::S0_MAXWORDS_SPEC>,
|
||||
#[doc = "0x108 - Slave I2C Address Value"]
|
||||
pub s0_address: crate::Reg<s0_address::S0_ADDRESS_SPEC>,
|
||||
#[doc = "0x10c - Slave I2C Address Mask value"]
|
||||
pub s0_addressmask: crate::Reg<s0_addressmask::S0_ADDRESSMASK_SPEC>,
|
||||
#[doc = "0x110 - Slave Data Input/Output"]
|
||||
pub s0_data: crate::Reg<s0_data::S0_DATA_SPEC>,
|
||||
#[doc = "0x114 - Slave I2C Last Address value"]
|
||||
pub s0_lastaddress: crate::Reg<s0_lastaddress::S0_LASTADDRESS_SPEC>,
|
||||
#[doc = "0x118 - Slave I2C Controller Status Register"]
|
||||
pub s0_status: crate::Reg<s0_status::S0_STATUS_SPEC>,
|
||||
#[doc = "0x11c - Internal STATE of I2C Slave Controller"]
|
||||
pub s0_state: crate::Reg<s0_state::S0_STATE_SPEC>,
|
||||
#[doc = "0x120 - Slave TX Count Register"]
|
||||
pub s0_txcount: crate::Reg<s0_txcount::S0_TXCOUNT_SPEC>,
|
||||
#[doc = "0x124 - Slave RX Count Register"]
|
||||
pub s0_rxcount: crate::Reg<s0_rxcount::S0_RXCOUNT_SPEC>,
|
||||
#[doc = "0x128 - Slave Interrupt Enable Register"]
|
||||
pub s0_irq_enb: crate::Reg<s0_irq_enb::S0_IRQ_ENB_SPEC>,
|
||||
#[doc = "0x12c - Slave Raw Interrupt Status Register"]
|
||||
pub s0_irq_raw: crate::Reg<s0_irq_raw::S0_IRQ_RAW_SPEC>,
|
||||
#[doc = "0x130 - Slave Enabled Interrupt Status Register"]
|
||||
pub s0_irq_end: crate::Reg<s0_irq_end::S0_IRQ_END_SPEC>,
|
||||
#[doc = "0x134 - Slave Clear Interrupt Status Register"]
|
||||
pub s0_irq_clr: crate::Reg<s0_irq_clr::S0_IRQ_CLR_SPEC>,
|
||||
#[doc = "0x138 - Slave Rx FIFO IRQ Trigger Level"]
|
||||
pub s0_rxfifoirqtrg: crate::Reg<s0_rxfifoirqtrg::S0_RXFIFOIRQTRG_SPEC>,
|
||||
#[doc = "0x13c - Slave Tx FIFO IRQ Trigger Level"]
|
||||
pub s0_txfifoirqtrg: crate::Reg<s0_txfifoirqtrg::S0_TXFIFOIRQTRG_SPEC>,
|
||||
#[doc = "0x140 - Slave Clear FIFO Register"]
|
||||
pub s0_fifo_clr: crate::Reg<s0_fifo_clr::S0_FIFO_CLR_SPEC>,
|
||||
#[doc = "0x144 - Slave I2C Address B Value"]
|
||||
pub s0_addressb: crate::Reg<s0_addressb::S0_ADDRESSB_SPEC>,
|
||||
#[doc = "0x148 - Slave I2C Address B Mask value"]
|
||||
pub s0_addressmaskb: crate::Reg<s0_addressmaskb::S0_ADDRESSMASKB_SPEC>,
|
||||
_reserved38: [u8; 0x0eb0],
|
||||
#[doc = "0xffc - Peripheral ID Register"]
|
||||
pub perid: crate::Reg<perid::PERID_SPEC>,
|
||||
}
|
||||
#[doc = "CTRL register accessor: an alias for `Reg<CTRL_SPEC>`"]
|
||||
pub type CTRL = crate::Reg<ctrl::CTRL_SPEC>;
|
||||
#[doc = "Control Register"]
|
||||
pub mod ctrl;
|
||||
#[doc = "CLKSCALE register accessor: an alias for `Reg<CLKSCALE_SPEC>`"]
|
||||
pub type CLKSCALE = crate::Reg<clkscale::CLKSCALE_SPEC>;
|
||||
#[doc = "Clock Scale divide value"]
|
||||
pub mod clkscale;
|
||||
#[doc = "WORDS register accessor: an alias for `Reg<WORDS_SPEC>`"]
|
||||
pub type WORDS = crate::Reg<words::WORDS_SPEC>;
|
||||
#[doc = "Word Count value"]
|
||||
pub mod words;
|
||||
#[doc = "ADDRESS register accessor: an alias for `Reg<ADDRESS_SPEC>`"]
|
||||
pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
|
||||
#[doc = "I2C Address value"]
|
||||
pub mod address;
|
||||
#[doc = "DATA register accessor: an alias for `Reg<DATA_SPEC>`"]
|
||||
pub type DATA = crate::Reg<data::DATA_SPEC>;
|
||||
#[doc = "Data Input/Output"]
|
||||
pub mod data;
|
||||
#[doc = "CMD register accessor: an alias for `Reg<CMD_SPEC>`"]
|
||||
pub type CMD = crate::Reg<cmd::CMD_SPEC>;
|
||||
#[doc = "Command Register"]
|
||||
pub mod cmd;
|
||||
#[doc = "STATUS register accessor: an alias for `Reg<STATUS_SPEC>`"]
|
||||
pub type STATUS = crate::Reg<status::STATUS_SPEC>;
|
||||
#[doc = "I2C Controller Status Register"]
|
||||
pub mod status;
|
||||
#[doc = "STATE register accessor: an alias for `Reg<STATE_SPEC>`"]
|
||||
pub type STATE = crate::Reg<state::STATE_SPEC>;
|
||||
#[doc = "Internal STATE of I2C Master Controller"]
|
||||
pub mod state;
|
||||
#[doc = "TXCOUNT register accessor: an alias for `Reg<TXCOUNT_SPEC>`"]
|
||||
pub type TXCOUNT = crate::Reg<txcount::TXCOUNT_SPEC>;
|
||||
#[doc = "TX Count Register"]
|
||||
pub mod txcount;
|
||||
#[doc = "RXCOUNT register accessor: an alias for `Reg<RXCOUNT_SPEC>`"]
|
||||
pub type RXCOUNT = crate::Reg<rxcount::RXCOUNT_SPEC>;
|
||||
#[doc = "RX Count Register"]
|
||||
pub mod rxcount;
|
||||
#[doc = "IRQ_ENB register accessor: an alias for `Reg<IRQ_ENB_SPEC>`"]
|
||||
pub type IRQ_ENB = crate::Reg<irq_enb::IRQ_ENB_SPEC>;
|
||||
#[doc = "Interrupt Enable Register"]
|
||||
pub mod irq_enb;
|
||||
#[doc = "IRQ_RAW register accessor: an alias for `Reg<IRQ_RAW_SPEC>`"]
|
||||
pub type IRQ_RAW = crate::Reg<irq_raw::IRQ_RAW_SPEC>;
|
||||
#[doc = "Raw Interrupt Status Register"]
|
||||
pub mod irq_raw;
|
||||
#[doc = "IRQ_END register accessor: an alias for `Reg<IRQ_END_SPEC>`"]
|
||||
pub type IRQ_END = crate::Reg<irq_end::IRQ_END_SPEC>;
|
||||
#[doc = "Enabled Interrupt Status Register"]
|
||||
pub mod irq_end;
|
||||
#[doc = "IRQ_CLR register accessor: an alias for `Reg<IRQ_CLR_SPEC>`"]
|
||||
pub type IRQ_CLR = crate::Reg<irq_clr::IRQ_CLR_SPEC>;
|
||||
#[doc = "Clear Interrupt Status Register"]
|
||||
pub mod irq_clr;
|
||||
#[doc = "RXFIFOIRQTRG register accessor: an alias for `Reg<RXFIFOIRQTRG_SPEC>`"]
|
||||
pub type RXFIFOIRQTRG = crate::Reg<rxfifoirqtrg::RXFIFOIRQTRG_SPEC>;
|
||||
#[doc = "Rx FIFO IRQ Trigger Level"]
|
||||
pub mod rxfifoirqtrg;
|
||||
#[doc = "TXFIFOIRQTRG register accessor: an alias for `Reg<TXFIFOIRQTRG_SPEC>`"]
|
||||
pub type TXFIFOIRQTRG = crate::Reg<txfifoirqtrg::TXFIFOIRQTRG_SPEC>;
|
||||
#[doc = "Tx FIFO IRQ Trigger Level"]
|
||||
pub mod txfifoirqtrg;
|
||||
#[doc = "FIFO_CLR register accessor: an alias for `Reg<FIFO_CLR_SPEC>`"]
|
||||
pub type FIFO_CLR = crate::Reg<fifo_clr::FIFO_CLR_SPEC>;
|
||||
#[doc = "Clear FIFO Register"]
|
||||
pub mod fifo_clr;
|
||||
#[doc = "TMCONFIG register accessor: an alias for `Reg<TMCONFIG_SPEC>`"]
|
||||
pub type TMCONFIG = crate::Reg<tmconfig::TMCONFIG_SPEC>;
|
||||
#[doc = "Timing Config Register"]
|
||||
pub mod tmconfig;
|
||||
#[doc = "CLKTOLIMIT register accessor: an alias for `Reg<CLKTOLIMIT_SPEC>`"]
|
||||
pub type CLKTOLIMIT = crate::Reg<clktolimit::CLKTOLIMIT_SPEC>;
|
||||
#[doc = "Clock Low Timeout Limit Register"]
|
||||
pub mod clktolimit;
|
||||
#[doc = "S0_CTRL register accessor: an alias for `Reg<S0_CTRL_SPEC>`"]
|
||||
pub type S0_CTRL = crate::Reg<s0_ctrl::S0_CTRL_SPEC>;
|
||||
#[doc = "Slave Control Register"]
|
||||
pub mod s0_ctrl;
|
||||
#[doc = "S0_MAXWORDS register accessor: an alias for `Reg<S0_MAXWORDS_SPEC>`"]
|
||||
pub type S0_MAXWORDS = crate::Reg<s0_maxwords::S0_MAXWORDS_SPEC>;
|
||||
#[doc = "Slave MaxWords Register"]
|
||||
pub mod s0_maxwords;
|
||||
#[doc = "S0_ADDRESS register accessor: an alias for `Reg<S0_ADDRESS_SPEC>`"]
|
||||
pub type S0_ADDRESS = crate::Reg<s0_address::S0_ADDRESS_SPEC>;
|
||||
#[doc = "Slave I2C Address Value"]
|
||||
pub mod s0_address;
|
||||
#[doc = "S0_ADDRESSMASK register accessor: an alias for `Reg<S0_ADDRESSMASK_SPEC>`"]
|
||||
pub type S0_ADDRESSMASK = crate::Reg<s0_addressmask::S0_ADDRESSMASK_SPEC>;
|
||||
#[doc = "Slave I2C Address Mask value"]
|
||||
pub mod s0_addressmask;
|
||||
#[doc = "S0_DATA register accessor: an alias for `Reg<S0_DATA_SPEC>`"]
|
||||
pub type S0_DATA = crate::Reg<s0_data::S0_DATA_SPEC>;
|
||||
#[doc = "Slave Data Input/Output"]
|
||||
pub mod s0_data;
|
||||
#[doc = "S0_LASTADDRESS register accessor: an alias for `Reg<S0_LASTADDRESS_SPEC>`"]
|
||||
pub type S0_LASTADDRESS = crate::Reg<s0_lastaddress::S0_LASTADDRESS_SPEC>;
|
||||
#[doc = "Slave I2C Last Address value"]
|
||||
pub mod s0_lastaddress;
|
||||
#[doc = "S0_STATUS register accessor: an alias for `Reg<S0_STATUS_SPEC>`"]
|
||||
pub type S0_STATUS = crate::Reg<s0_status::S0_STATUS_SPEC>;
|
||||
#[doc = "Slave I2C Controller Status Register"]
|
||||
pub mod s0_status;
|
||||
#[doc = "S0_STATE register accessor: an alias for `Reg<S0_STATE_SPEC>`"]
|
||||
pub type S0_STATE = crate::Reg<s0_state::S0_STATE_SPEC>;
|
||||
#[doc = "Internal STATE of I2C Slave Controller"]
|
||||
pub mod s0_state;
|
||||
#[doc = "S0_TXCOUNT register accessor: an alias for `Reg<S0_TXCOUNT_SPEC>`"]
|
||||
pub type S0_TXCOUNT = crate::Reg<s0_txcount::S0_TXCOUNT_SPEC>;
|
||||
#[doc = "Slave TX Count Register"]
|
||||
pub mod s0_txcount;
|
||||
#[doc = "S0_RXCOUNT register accessor: an alias for `Reg<S0_RXCOUNT_SPEC>`"]
|
||||
pub type S0_RXCOUNT = crate::Reg<s0_rxcount::S0_RXCOUNT_SPEC>;
|
||||
#[doc = "Slave RX Count Register"]
|
||||
pub mod s0_rxcount;
|
||||
#[doc = "S0_IRQ_ENB register accessor: an alias for `Reg<S0_IRQ_ENB_SPEC>`"]
|
||||
pub type S0_IRQ_ENB = crate::Reg<s0_irq_enb::S0_IRQ_ENB_SPEC>;
|
||||
#[doc = "Slave Interrupt Enable Register"]
|
||||
pub mod s0_irq_enb;
|
||||
#[doc = "S0_IRQ_RAW register accessor: an alias for `Reg<S0_IRQ_RAW_SPEC>`"]
|
||||
pub type S0_IRQ_RAW = crate::Reg<s0_irq_raw::S0_IRQ_RAW_SPEC>;
|
||||
#[doc = "Slave Raw Interrupt Status Register"]
|
||||
pub mod s0_irq_raw;
|
||||
#[doc = "S0_IRQ_END register accessor: an alias for `Reg<S0_IRQ_END_SPEC>`"]
|
||||
pub type S0_IRQ_END = crate::Reg<s0_irq_end::S0_IRQ_END_SPEC>;
|
||||
#[doc = "Slave Enabled Interrupt Status Register"]
|
||||
pub mod s0_irq_end;
|
||||
#[doc = "S0_IRQ_CLR register accessor: an alias for `Reg<S0_IRQ_CLR_SPEC>`"]
|
||||
pub type S0_IRQ_CLR = crate::Reg<s0_irq_clr::S0_IRQ_CLR_SPEC>;
|
||||
#[doc = "Slave Clear Interrupt Status Register"]
|
||||
pub mod s0_irq_clr;
|
||||
#[doc = "S0_RXFIFOIRQTRG register accessor: an alias for `Reg<S0_RXFIFOIRQTRG_SPEC>`"]
|
||||
pub type S0_RXFIFOIRQTRG = crate::Reg<s0_rxfifoirqtrg::S0_RXFIFOIRQTRG_SPEC>;
|
||||
#[doc = "Slave Rx FIFO IRQ Trigger Level"]
|
||||
pub mod s0_rxfifoirqtrg;
|
||||
#[doc = "S0_TXFIFOIRQTRG register accessor: an alias for `Reg<S0_TXFIFOIRQTRG_SPEC>`"]
|
||||
pub type S0_TXFIFOIRQTRG = crate::Reg<s0_txfifoirqtrg::S0_TXFIFOIRQTRG_SPEC>;
|
||||
#[doc = "Slave Tx FIFO IRQ Trigger Level"]
|
||||
pub mod s0_txfifoirqtrg;
|
||||
#[doc = "S0_FIFO_CLR register accessor: an alias for `Reg<S0_FIFO_CLR_SPEC>`"]
|
||||
pub type S0_FIFO_CLR = crate::Reg<s0_fifo_clr::S0_FIFO_CLR_SPEC>;
|
||||
#[doc = "Slave Clear FIFO Register"]
|
||||
pub mod s0_fifo_clr;
|
||||
#[doc = "S0_ADDRESSB register accessor: an alias for `Reg<S0_ADDRESSB_SPEC>`"]
|
||||
pub type S0_ADDRESSB = crate::Reg<s0_addressb::S0_ADDRESSB_SPEC>;
|
||||
#[doc = "Slave I2C Address B Value"]
|
||||
pub mod s0_addressb;
|
||||
#[doc = "S0_ADDRESSMASKB register accessor: an alias for `Reg<S0_ADDRESSMASKB_SPEC>`"]
|
||||
pub type S0_ADDRESSMASKB = crate::Reg<s0_addressmaskb::S0_ADDRESSMASKB_SPEC>;
|
||||
#[doc = "Slave I2C Address B Mask value"]
|
||||
pub mod s0_addressmaskb;
|
||||
#[doc = "PERID register accessor: an alias for `Reg<PERID_SPEC>`"]
|
||||
pub type PERID = crate::Reg<perid::PERID_SPEC>;
|
||||
#[doc = "Peripheral ID Register"]
|
||||
pub mod perid;
|
64
src/i2ca/address.rs
Normal file
64
src/i2ca/address.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `ADDRESS` reader"]
|
||||
pub struct R(crate::R<ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDRESS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDRESS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDRESS` writer"]
|
||||
pub struct W(crate::W<ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<ADDRESS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDRESS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "I2C Address value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [address](index.html) module"]
|
||||
pub struct ADDRESS_SPEC;
|
||||
impl crate::RegisterSpec for ADDRESS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [address::R](R) reader structure"]
|
||||
impl crate::Readable for ADDRESS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"]
|
||||
impl crate::Writable for ADDRESS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDRESS to value 0"]
|
||||
impl crate::Resettable for ADDRESS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
150
src/i2ca/clkscale.rs
Normal file
150
src/i2ca/clkscale.rs
Normal file
@ -0,0 +1,150 @@
|
||||
#[doc = "Register `CLKSCALE` reader"]
|
||||
pub struct R(crate::R<CLKSCALE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CLKSCALE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CLKSCALE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CLKSCALE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CLKSCALE` writer"]
|
||||
pub struct W(crate::W<CLKSCALE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CLKSCALE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CLKSCALE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CLKSCALE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VALUE` reader - Enable FastMode"]
|
||||
pub struct VALUE_R(crate::FieldReader<u32, u32>);
|
||||
impl VALUE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
VALUE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for VALUE_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VALUE` writer - Enable FastMode"]
|
||||
pub struct VALUE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> VALUE_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 = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FASTMODE` reader - Enable FastMode"]
|
||||
pub struct FASTMODE_R(crate::FieldReader<bool, bool>);
|
||||
impl FASTMODE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
FASTMODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for FASTMODE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FASTMODE` writer - Enable FastMode"]
|
||||
pub struct FASTMODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> FASTMODE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 = "Bits 0:30 - Enable FastMode"]
|
||||
#[inline(always)]
|
||||
pub fn value(&self) -> VALUE_R {
|
||||
VALUE_R::new(self.bits as u32)
|
||||
}
|
||||
#[doc = "Bit 31 - Enable FastMode"]
|
||||
#[inline(always)]
|
||||
pub fn fastmode(&self) -> FASTMODE_R {
|
||||
FASTMODE_R::new(((self.bits >> 31) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:30 - Enable FastMode"]
|
||||
#[inline(always)]
|
||||
pub fn value(&mut self) -> VALUE_W {
|
||||
VALUE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 31 - Enable FastMode"]
|
||||
#[inline(always)]
|
||||
pub fn fastmode(&mut self) -> FASTMODE_W {
|
||||
FASTMODE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Clock Scale divide value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [clkscale](index.html) module"]
|
||||
pub struct CLKSCALE_SPEC;
|
||||
impl crate::RegisterSpec for CLKSCALE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [clkscale::R](R) reader structure"]
|
||||
impl crate::Readable for CLKSCALE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [clkscale::W](W) writer structure"]
|
||||
impl crate::Writable for CLKSCALE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CLKSCALE to value 0"]
|
||||
impl crate::Resettable for CLKSCALE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/clktolimit.rs
Normal file
64
src/i2ca/clktolimit.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `CLKTOLIMIT` reader"]
|
||||
pub struct R(crate::R<CLKTOLIMIT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CLKTOLIMIT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CLKTOLIMIT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CLKTOLIMIT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CLKTOLIMIT` writer"]
|
||||
pub struct W(crate::W<CLKTOLIMIT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CLKTOLIMIT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CLKTOLIMIT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CLKTOLIMIT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Clock Low Timeout Limit 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 [clktolimit](index.html) module"]
|
||||
pub struct CLKTOLIMIT_SPEC;
|
||||
impl crate::RegisterSpec for CLKTOLIMIT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [clktolimit::R](R) reader structure"]
|
||||
impl crate::Readable for CLKTOLIMIT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [clktolimit::W](W) writer structure"]
|
||||
impl crate::Writable for CLKTOLIMIT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CLKTOLIMIT to value 0"]
|
||||
impl crate::Resettable for CLKTOLIMIT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/cmd.rs
Normal file
64
src/i2ca/cmd.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `CMD` reader"]
|
||||
pub struct R(crate::R<CMD_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CMD_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CMD_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CMD_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CMD` writer"]
|
||||
pub struct W(crate::W<CMD_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CMD_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CMD_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CMD_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "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 [cmd](index.html) module"]
|
||||
pub struct CMD_SPEC;
|
||||
impl crate::RegisterSpec for CMD_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [cmd::R](R) reader structure"]
|
||||
impl crate::Readable for CMD_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [cmd::W](W) writer structure"]
|
||||
impl crate::Writable for CMD_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CMD to value 0"]
|
||||
impl crate::Resettable for CMD_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
489
src/i2ca/ctrl.rs
Normal file
489
src/i2ca/ctrl.rs
Normal file
@ -0,0 +1,489 @@
|
||||
#[doc = "Register `CTRL` reader"]
|
||||
pub struct R(crate::R<CTRL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CTRL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CTRL_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CTRL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CTRL` writer"]
|
||||
pub struct W(crate::W<CTRL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CTRL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CTRL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CTRL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKENABLED` reader - I2C CLK Enabled"]
|
||||
pub struct CLKENABLED_R(crate::FieldReader<bool, bool>);
|
||||
impl CLKENABLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CLKENABLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CLKENABLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKENABLED` writer - I2C CLK Enabled"]
|
||||
pub struct CLKENABLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CLKENABLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLED` reader - I2C Activated"]
|
||||
pub struct ENABLED_R(crate::FieldReader<bool, bool>);
|
||||
impl ENABLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENABLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLED` writer - I2C Activated"]
|
||||
pub struct ENABLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENABLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ENABLE` reader - I2C Active"]
|
||||
pub struct ENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl ENABLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` writer - I2C Active"]
|
||||
pub struct ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> 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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFEMD` reader - TX FIFIO Empty Mode"]
|
||||
pub struct TXFEMD_R(crate::FieldReader<bool, bool>);
|
||||
impl TXFEMD_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXFEMD_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXFEMD_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFEMD` writer - TX FIFIO Empty Mode"]
|
||||
pub struct TXFEMD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXFEMD_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFFMD` reader - RX FIFO Full Mode"]
|
||||
pub struct RXFFMD_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFFMD_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFFMD_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFFMD_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFFMD` writer - RX FIFO Full Mode"]
|
||||
pub struct RXFFMD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFFMD_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ALGFILTER` reader - Enable Input Analog Glitch Filter"]
|
||||
pub struct ALGFILTER_R(crate::FieldReader<bool, bool>);
|
||||
impl ALGFILTER_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ALGFILTER_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ALGFILTER_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ALGFILTER` writer - Enable Input Analog Glitch Filter"]
|
||||
pub struct ALGFILTER_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ALGFILTER_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `DLGFILTER` reader - Enable Input Digital Glitch Filter"]
|
||||
pub struct DLGFILTER_R(crate::FieldReader<bool, bool>);
|
||||
impl DLGFILTER_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DLGFILTER_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DLGFILTER_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DLGFILTER` writer - Enable Input Digital Glitch Filter"]
|
||||
pub struct DLGFILTER_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DLGFILTER_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `LOOPBACK` reader - Enable LoopBack Mode"]
|
||||
pub struct LOOPBACK_R(crate::FieldReader<bool, bool>);
|
||||
impl LOOPBACK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LOOPBACK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LOOPBACK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACK` writer - Enable LoopBack Mode"]
|
||||
pub struct LOOPBACK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LOOPBACK_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TMCONFIGENB` reader - Enable Timing Config Register"]
|
||||
pub struct TMCONFIGENB_R(crate::FieldReader<bool, bool>);
|
||||
impl TMCONFIGENB_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TMCONFIGENB_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TMCONFIGENB_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TMCONFIGENB` writer - Enable Timing Config Register"]
|
||||
pub struct TMCONFIGENB_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TMCONFIGENB_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - I2C CLK Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn clkenabled(&self) -> CLKENABLED_R {
|
||||
CLKENABLED_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - I2C Activated"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(&self) -> ENABLED_R {
|
||||
ENABLED_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - I2C Active"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) -> ENABLE_R {
|
||||
ENABLE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - TX FIFIO Empty Mode"]
|
||||
#[inline(always)]
|
||||
pub fn txfemd(&self) -> TXFEMD_R {
|
||||
TXFEMD_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - RX FIFO Full Mode"]
|
||||
#[inline(always)]
|
||||
pub fn rxffmd(&self) -> RXFFMD_R {
|
||||
RXFFMD_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - Enable Input Analog Glitch Filter"]
|
||||
#[inline(always)]
|
||||
pub fn algfilter(&self) -> ALGFILTER_R {
|
||||
ALGFILTER_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Enable Input Digital Glitch Filter"]
|
||||
#[inline(always)]
|
||||
pub fn dlgfilter(&self) -> DLGFILTER_R {
|
||||
DLGFILTER_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - Enable LoopBack Mode"]
|
||||
#[inline(always)]
|
||||
pub fn loopback(&self) -> LOOPBACK_R {
|
||||
LOOPBACK_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Enable Timing Config Register"]
|
||||
#[inline(always)]
|
||||
pub fn tmconfigenb(&self) -> TMCONFIGENB_R {
|
||||
TMCONFIGENB_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - I2C CLK Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn clkenabled(&mut self) -> CLKENABLED_W {
|
||||
CLKENABLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - I2C Activated"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(&mut self) -> ENABLED_W {
|
||||
ENABLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - I2C Active"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&mut self) -> ENABLE_W {
|
||||
ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - TX FIFIO Empty Mode"]
|
||||
#[inline(always)]
|
||||
pub fn txfemd(&mut self) -> TXFEMD_W {
|
||||
TXFEMD_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - RX FIFO Full Mode"]
|
||||
#[inline(always)]
|
||||
pub fn rxffmd(&mut self) -> RXFFMD_W {
|
||||
RXFFMD_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - Enable Input Analog Glitch Filter"]
|
||||
#[inline(always)]
|
||||
pub fn algfilter(&mut self) -> ALGFILTER_W {
|
||||
ALGFILTER_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Enable Input Digital Glitch Filter"]
|
||||
#[inline(always)]
|
||||
pub fn dlgfilter(&mut self) -> DLGFILTER_W {
|
||||
DLGFILTER_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Enable LoopBack Mode"]
|
||||
#[inline(always)]
|
||||
pub fn loopback(&mut self) -> LOOPBACK_W {
|
||||
LOOPBACK_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Enable Timing Config Register"]
|
||||
#[inline(always)]
|
||||
pub fn tmconfigenb(&mut self) -> TMCONFIGENB_W {
|
||||
TMCONFIGENB_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
|
||||
pub struct CTRL_SPEC;
|
||||
impl crate::RegisterSpec for CTRL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
|
||||
impl crate::Readable for CTRL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
|
||||
impl crate::Writable for CTRL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CTRL to value 0"]
|
||||
impl crate::Resettable for CTRL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/data.rs
Normal file
64
src/i2ca/data.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `DATA` reader"]
|
||||
pub struct R(crate::R<DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DATA_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA` writer"]
|
||||
pub struct W(crate::W<DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<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 From<crate::W<DATA_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Data Input/Output\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](index.html) module"]
|
||||
pub struct DATA_SPEC;
|
||||
impl crate::RegisterSpec for DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA to value 0"]
|
||||
impl crate::Resettable for DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
99
src/i2ca/fifo_clr.rs
Normal file
99
src/i2ca/fifo_clr.rs
Normal file
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `FIFO_CLR` writer"]
|
||||
pub struct W(crate::W<FIFO_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<FIFO_CLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<FIFO_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<FIFO_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFIFO` writer - Clear Rx FIFO"]
|
||||
pub struct RXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFIFO` writer - Clear Tx FIFO"]
|
||||
pub struct TXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Clear Rx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn rxfifo(&mut self) -> RXFIFO_W {
|
||||
RXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Clear Tx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn txfifo(&mut self) -> TXFIFO_W {
|
||||
TXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Clear FIFO Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fifo_clr](index.html) module"]
|
||||
pub struct FIFO_CLR_SPEC;
|
||||
impl crate::RegisterSpec for FIFO_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [fifo_clr::W](W) writer structure"]
|
||||
impl crate::Writable for FIFO_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets FIFO_CLR to value 0"]
|
||||
impl crate::Resettable for FIFO_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
423
src/i2ca/irq_clr.rs
Normal file
423
src/i2ca/irq_clr.rs
Normal file
@ -0,0 +1,423 @@
|
||||
#[doc = "Register `IRQ_CLR` writer"]
|
||||
pub struct W(crate::W<IRQ_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<IRQ_CLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<IRQ_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<IRQ_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2CIDLE` writer - I2C Bus is Idle"]
|
||||
pub struct I2CIDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2CIDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` writer - Controller is Idle"]
|
||||
pub struct IDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `WAITING` writer - Controller is Waiting"]
|
||||
pub struct WAITING_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WAITING_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `STALLED` writer - Controller is Stalled"]
|
||||
pub struct STALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ARBLOST` writer - I2C Arbitration was lost"]
|
||||
pub struct ARBLOST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ARBLOST_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKADDR` writer - I2C Address was not Acknowledged"]
|
||||
pub struct NACKADDR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKADDR_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKDATA` writer - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKDATA_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `CLKLOTO` writer - I2C Clock Low Timeout"]
|
||||
pub struct CLKLOTO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CLKLOTO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct TXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXREADY` writer - TX FIFO Ready"]
|
||||
pub struct TXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXREADY` writer - RX FIFO Ready"]
|
||||
pub struct RXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXEMPTY` writer - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXEMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFULL` writer - RX FIFO Full"]
|
||||
pub struct RXFULL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFULL_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 0 - I2C Bus is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn i2cidle(&mut self) -> I2CIDLE_W {
|
||||
I2CIDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&mut self) -> IDLE_W {
|
||||
IDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&mut self) -> WAITING_W {
|
||||
WAITING_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn stalled(&mut self) -> STALLED_W {
|
||||
STALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - I2C Arbitration was lost"]
|
||||
#[inline(always)]
|
||||
pub fn arblost(&mut self) -> ARBLOST_W {
|
||||
ARBLOST_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackaddr(&mut self) -> NACKADDR_W {
|
||||
NACKADDR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&mut self) -> NACKDATA_W {
|
||||
NACKDATA_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - I2C Clock Low Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn clkloto(&mut self) -> CLKLOTO_W {
|
||||
CLKLOTO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txoverflow(&mut self) -> TXOVERFLOW_W {
|
||||
TXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&mut self) -> RXOVERFLOW_W {
|
||||
RXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&mut self) -> TXREADY_W {
|
||||
TXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&mut self) -> RXREADY_W {
|
||||
RXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&mut self) -> TXEMPTY_W {
|
||||
TXEMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&mut self) -> RXFULL_W {
|
||||
RXFULL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Clear Interrupt Status Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_clr](index.html) module"]
|
||||
pub struct IRQ_CLR_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [irq_clr::W](W) writer structure"]
|
||||
impl crate::Writable for IRQ_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_CLR to value 0"]
|
||||
impl crate::Resettable for IRQ_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
724
src/i2ca/irq_enb.rs
Normal file
724
src/i2ca/irq_enb.rs
Normal file
@ -0,0 +1,724 @@
|
||||
#[doc = "Register `IRQ_ENB` reader"]
|
||||
pub struct R(crate::R<IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_ENB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_ENB_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_ENB_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `IRQ_ENB` writer"]
|
||||
pub struct W(crate::W<IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<IRQ_ENB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<IRQ_ENB_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<IRQ_ENB_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2CIDLE` reader - I2C Bus is Idle"]
|
||||
pub struct I2CIDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl I2CIDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2CIDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2CIDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2CIDLE` writer - I2C Bus is Idle"]
|
||||
pub struct I2CIDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2CIDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` writer - Controller is Idle"]
|
||||
pub struct IDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` writer - Controller is Waiting"]
|
||||
pub struct WAITING_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WAITING_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `STALLED` reader - Controller is Stalled"]
|
||||
pub struct STALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl STALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STALLED` writer - Controller is Stalled"]
|
||||
pub struct STALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ARBLOST` reader - I2C Arbitration was lost"]
|
||||
pub struct ARBLOST_R(crate::FieldReader<bool, bool>);
|
||||
impl ARBLOST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ARBLOST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ARBLOST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARBLOST` writer - I2C Arbitration was lost"]
|
||||
pub struct ARBLOST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ARBLOST_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKADDR` reader - I2C Address was not Acknowledged"]
|
||||
pub struct NACKADDR_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKADDR_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKADDR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKADDR_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKADDR` writer - I2C Address was not Acknowledged"]
|
||||
pub struct NACKADDR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKADDR_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` writer - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKDATA_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `CLKLOTO` reader - I2C Clock Low Timeout"]
|
||||
pub struct CLKLOTO_R(crate::FieldReader<bool, bool>);
|
||||
impl CLKLOTO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CLKLOTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CLKLOTO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKLOTO` writer - I2C Clock Low Timeout"]
|
||||
pub struct CLKLOTO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CLKLOTO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct TXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct TXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` writer - TX FIFO Ready"]
|
||||
pub struct TXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` writer - RX FIFO Ready"]
|
||||
pub struct RXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` writer - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXEMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` writer - RX FIFO Full"]
|
||||
pub struct RXFULL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFULL_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 - I2C Bus is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn i2cidle(&self) -> I2CIDLE_R {
|
||||
I2CIDLE_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn stalled(&self) -> STALLED_R {
|
||||
STALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - I2C Arbitration was lost"]
|
||||
#[inline(always)]
|
||||
pub fn arblost(&self) -> ARBLOST_R {
|
||||
ARBLOST_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackaddr(&self) -> NACKADDR_R {
|
||||
NACKADDR_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - I2C Clock Low Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn clkloto(&self) -> CLKLOTO_R {
|
||||
CLKLOTO_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txoverflow(&self) -> TXOVERFLOW_R {
|
||||
TXOVERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - I2C Bus is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn i2cidle(&mut self) -> I2CIDLE_W {
|
||||
I2CIDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&mut self) -> IDLE_W {
|
||||
IDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&mut self) -> WAITING_W {
|
||||
WAITING_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn stalled(&mut self) -> STALLED_W {
|
||||
STALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - I2C Arbitration was lost"]
|
||||
#[inline(always)]
|
||||
pub fn arblost(&mut self) -> ARBLOST_W {
|
||||
ARBLOST_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackaddr(&mut self) -> NACKADDR_W {
|
||||
NACKADDR_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&mut self) -> NACKDATA_W {
|
||||
NACKDATA_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - I2C Clock Low Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn clkloto(&mut self) -> CLKLOTO_W {
|
||||
CLKLOTO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txoverflow(&mut self) -> TXOVERFLOW_W {
|
||||
TXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&mut self) -> RXOVERFLOW_W {
|
||||
RXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&mut self) -> TXREADY_W {
|
||||
TXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&mut self) -> RXREADY_W {
|
||||
RXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&mut self) -> TXEMPTY_W {
|
||||
TXEMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&mut self) -> RXFULL_W {
|
||||
RXFULL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt Enable 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 [irq_enb](index.html) module"]
|
||||
pub struct IRQ_ENB_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_ENB_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_enb::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_ENB_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [irq_enb::W](W) writer structure"]
|
||||
impl crate::Writable for IRQ_ENB_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_ENB to value 0"]
|
||||
impl crate::Resettable for IRQ_ENB_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
313
src/i2ca/irq_end.rs
Normal file
313
src/i2ca/irq_end.rs
Normal file
@ -0,0 +1,313 @@
|
||||
#[doc = "Register `IRQ_END` reader"]
|
||||
pub struct R(crate::R<IRQ_END_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_END_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_END_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_END_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2CIDLE` reader - I2C Bus is Idle"]
|
||||
pub struct I2CIDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl I2CIDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2CIDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2CIDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STALLED` reader - Controller is Stalled"]
|
||||
pub struct STALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl STALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARBLOST` reader - I2C Arbitration was lost"]
|
||||
pub struct ARBLOST_R(crate::FieldReader<bool, bool>);
|
||||
impl ARBLOST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ARBLOST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ARBLOST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKADDR` reader - I2C Address was not Acknowledged"]
|
||||
pub struct NACKADDR_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKADDR_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKADDR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKADDR_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKLOTO` reader - I2C Clock Low Timeout"]
|
||||
pub struct CLKLOTO_R(crate::FieldReader<bool, bool>);
|
||||
impl CLKLOTO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CLKLOTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CLKLOTO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct TXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - I2C Bus is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn i2cidle(&self) -> I2CIDLE_R {
|
||||
I2CIDLE_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn stalled(&self) -> STALLED_R {
|
||||
STALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - I2C Arbitration was lost"]
|
||||
#[inline(always)]
|
||||
pub fn arblost(&self) -> ARBLOST_R {
|
||||
ARBLOST_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackaddr(&self) -> NACKADDR_R {
|
||||
NACKADDR_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - I2C Clock Low Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn clkloto(&self) -> CLKLOTO_R {
|
||||
CLKLOTO_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txoverflow(&self) -> TXOVERFLOW_R {
|
||||
TXOVERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Enabled Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_end](index.html) module"]
|
||||
pub struct IRQ_END_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_END_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_end::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_END_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_END to value 0"]
|
||||
impl crate::Resettable for IRQ_END_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
313
src/i2ca/irq_raw.rs
Normal file
313
src/i2ca/irq_raw.rs
Normal file
@ -0,0 +1,313 @@
|
||||
#[doc = "Register `IRQ_RAW` reader"]
|
||||
pub struct R(crate::R<IRQ_RAW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_RAW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_RAW_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_RAW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2CIDLE` reader - I2C Bus is Idle"]
|
||||
pub struct I2CIDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl I2CIDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2CIDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2CIDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STALLED` reader - Controller is Stalled"]
|
||||
pub struct STALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl STALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ARBLOST` reader - I2C Arbitration was lost"]
|
||||
pub struct ARBLOST_R(crate::FieldReader<bool, bool>);
|
||||
impl ARBLOST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ARBLOST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ARBLOST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKADDR` reader - I2C Address was not Acknowledged"]
|
||||
pub struct NACKADDR_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKADDR_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKADDR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKADDR_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKLOTO` reader - I2C Clock Low Timeout"]
|
||||
pub struct CLKLOTO_R(crate::FieldReader<bool, bool>);
|
||||
impl CLKLOTO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CLKLOTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CLKLOTO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct TXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - I2C Bus is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn i2cidle(&self) -> I2CIDLE_R {
|
||||
I2CIDLE_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn stalled(&self) -> STALLED_R {
|
||||
STALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - I2C Arbitration was lost"]
|
||||
#[inline(always)]
|
||||
pub fn arblost(&self) -> ARBLOST_R {
|
||||
ARBLOST_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackaddr(&self) -> NACKADDR_R {
|
||||
NACKADDR_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - I2C Clock Low Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn clkloto(&self) -> CLKLOTO_R {
|
||||
CLKLOTO_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txoverflow(&self) -> TXOVERFLOW_R {
|
||||
TXOVERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Raw Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_raw](index.html) module"]
|
||||
pub struct IRQ_RAW_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_RAW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_raw::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_RAW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_RAW to value 0"]
|
||||
impl crate::Resettable for IRQ_RAW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/i2ca/perid.rs
Normal file
31
src/i2ca/perid.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `PERID` reader"]
|
||||
pub struct R(crate::R<PERID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PERID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PERID_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PERID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Peripheral ID Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [perid](index.html) module"]
|
||||
pub struct PERID_SPEC;
|
||||
impl crate::RegisterSpec for PERID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [perid::R](R) reader structure"]
|
||||
impl crate::Readable for PERID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets PERID to value 0x0014_07e1"]
|
||||
impl crate::Resettable for PERID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x0014_07e1
|
||||
}
|
||||
}
|
31
src/i2ca/rxcount.rs
Normal file
31
src/i2ca/rxcount.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `RXCOUNT` reader"]
|
||||
pub struct R(crate::R<RXCOUNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RXCOUNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RXCOUNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RXCOUNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "RX Count Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxcount](index.html) module"]
|
||||
pub struct RXCOUNT_SPEC;
|
||||
impl crate::RegisterSpec for RXCOUNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rxcount::R](R) reader structure"]
|
||||
impl crate::Readable for RXCOUNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets RXCOUNT to value 0"]
|
||||
impl crate::Resettable for RXCOUNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/rxfifoirqtrg.rs
Normal file
64
src/i2ca/rxfifoirqtrg.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `RXFIFOIRQTRG` reader"]
|
||||
pub struct R(crate::R<RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RXFIFOIRQTRG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `RXFIFOIRQTRG` writer"]
|
||||
pub struct W(crate::W<RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<RXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<RXFIFOIRQTRG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Rx FIFO IRQ Trigger Level\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxfifoirqtrg](index.html) module"]
|
||||
pub struct RXFIFOIRQTRG_SPEC;
|
||||
impl crate::RegisterSpec for RXFIFOIRQTRG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rxfifoirqtrg::R](R) reader structure"]
|
||||
impl crate::Readable for RXFIFOIRQTRG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [rxfifoirqtrg::W](W) writer structure"]
|
||||
impl crate::Writable for RXFIFOIRQTRG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets RXFIFOIRQTRG to value 0"]
|
||||
impl crate::Resettable for RXFIFOIRQTRG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_address.rs
Normal file
64
src/i2ca/s0_address.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_ADDRESS` reader"]
|
||||
pub struct R(crate::R<S0_ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_ADDRESS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_ADDRESS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_ADDRESS` writer"]
|
||||
pub struct W(crate::W<S0_ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_ADDRESS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_ADDRESS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave I2C Address Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_address](index.html) module"]
|
||||
pub struct S0_ADDRESS_SPEC;
|
||||
impl crate::RegisterSpec for S0_ADDRESS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_address::R](R) reader structure"]
|
||||
impl crate::Readable for S0_ADDRESS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_address::W](W) writer structure"]
|
||||
impl crate::Writable for S0_ADDRESS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_ADDRESS to value 0"]
|
||||
impl crate::Resettable for S0_ADDRESS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_addressb.rs
Normal file
64
src/i2ca/s0_addressb.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_ADDRESSB` reader"]
|
||||
pub struct R(crate::R<S0_ADDRESSB_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_ADDRESSB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_ADDRESSB_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_ADDRESSB_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_ADDRESSB` writer"]
|
||||
pub struct W(crate::W<S0_ADDRESSB_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_ADDRESSB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_ADDRESSB_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_ADDRESSB_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave I2C Address B Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_addressb](index.html) module"]
|
||||
pub struct S0_ADDRESSB_SPEC;
|
||||
impl crate::RegisterSpec for S0_ADDRESSB_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_addressb::R](R) reader structure"]
|
||||
impl crate::Readable for S0_ADDRESSB_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_addressb::W](W) writer structure"]
|
||||
impl crate::Writable for S0_ADDRESSB_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_ADDRESSB to value 0"]
|
||||
impl crate::Resettable for S0_ADDRESSB_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_addressmask.rs
Normal file
64
src/i2ca/s0_addressmask.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_ADDRESSMASK` reader"]
|
||||
pub struct R(crate::R<S0_ADDRESSMASK_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_ADDRESSMASK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_ADDRESSMASK_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_ADDRESSMASK_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_ADDRESSMASK` writer"]
|
||||
pub struct W(crate::W<S0_ADDRESSMASK_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_ADDRESSMASK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_ADDRESSMASK_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_ADDRESSMASK_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave I2C Address Mask value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_addressmask](index.html) module"]
|
||||
pub struct S0_ADDRESSMASK_SPEC;
|
||||
impl crate::RegisterSpec for S0_ADDRESSMASK_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_addressmask::R](R) reader structure"]
|
||||
impl crate::Readable for S0_ADDRESSMASK_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_addressmask::W](W) writer structure"]
|
||||
impl crate::Writable for S0_ADDRESSMASK_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_ADDRESSMASK to value 0"]
|
||||
impl crate::Resettable for S0_ADDRESSMASK_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_addressmaskb.rs
Normal file
64
src/i2ca/s0_addressmaskb.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_ADDRESSMASKB` reader"]
|
||||
pub struct R(crate::R<S0_ADDRESSMASKB_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_ADDRESSMASKB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_ADDRESSMASKB_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_ADDRESSMASKB_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_ADDRESSMASKB` writer"]
|
||||
pub struct W(crate::W<S0_ADDRESSMASKB_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_ADDRESSMASKB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_ADDRESSMASKB_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_ADDRESSMASKB_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave I2C Address B Mask value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_addressmaskb](index.html) module"]
|
||||
pub struct S0_ADDRESSMASKB_SPEC;
|
||||
impl crate::RegisterSpec for S0_ADDRESSMASKB_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_addressmaskb::R](R) reader structure"]
|
||||
impl crate::Readable for S0_ADDRESSMASKB_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_addressmaskb::W](W) writer structure"]
|
||||
impl crate::Writable for S0_ADDRESSMASKB_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_ADDRESSMASKB to value 0"]
|
||||
impl crate::Resettable for S0_ADDRESSMASKB_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
301
src/i2ca/s0_ctrl.rs
Normal file
301
src/i2ca/s0_ctrl.rs
Normal file
@ -0,0 +1,301 @@
|
||||
#[doc = "Register `S0_CTRL` reader"]
|
||||
pub struct R(crate::R<S0_CTRL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_CTRL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_CTRL_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_CTRL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_CTRL` writer"]
|
||||
pub struct W(crate::W<S0_CTRL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_CTRL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_CTRL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_CTRL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKENABLED` reader - I2C Enabled"]
|
||||
pub struct CLKENABLED_R(crate::FieldReader<bool, bool>);
|
||||
impl CLKENABLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CLKENABLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CLKENABLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CLKENABLED` writer - I2C Enabled"]
|
||||
pub struct CLKENABLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CLKENABLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLED` reader - I2C Activated"]
|
||||
pub struct ENABLED_R(crate::FieldReader<bool, bool>);
|
||||
impl ENABLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENABLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLED` writer - I2C Activated"]
|
||||
pub struct ENABLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENABLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ENABLE` reader - I2C Active"]
|
||||
pub struct ENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl ENABLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` writer - I2C Active"]
|
||||
pub struct ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> 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 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFEMD` reader - TX FIFIO Empty Mode"]
|
||||
pub struct TXFEMD_R(crate::FieldReader<bool, bool>);
|
||||
impl TXFEMD_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXFEMD_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXFEMD_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFEMD` writer - TX FIFIO Empty Mode"]
|
||||
pub struct TXFEMD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXFEMD_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFFMD` reader - RX FIFO Full Mode"]
|
||||
pub struct RXFFMD_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFFMD_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFFMD_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFFMD_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFFMD` writer - RX FIFO Full Mode"]
|
||||
pub struct RXFFMD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFFMD_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - I2C Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn clkenabled(&self) -> CLKENABLED_R {
|
||||
CLKENABLED_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - I2C Activated"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(&self) -> ENABLED_R {
|
||||
ENABLED_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - I2C Active"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) -> ENABLE_R {
|
||||
ENABLE_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - TX FIFIO Empty Mode"]
|
||||
#[inline(always)]
|
||||
pub fn txfemd(&self) -> TXFEMD_R {
|
||||
TXFEMD_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - RX FIFO Full Mode"]
|
||||
#[inline(always)]
|
||||
pub fn rxffmd(&self) -> RXFFMD_R {
|
||||
RXFFMD_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - I2C Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn clkenabled(&mut self) -> CLKENABLED_W {
|
||||
CLKENABLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - I2C Activated"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(&mut self) -> ENABLED_W {
|
||||
ENABLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - I2C Active"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&mut self) -> ENABLE_W {
|
||||
ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - TX FIFIO Empty Mode"]
|
||||
#[inline(always)]
|
||||
pub fn txfemd(&mut self) -> TXFEMD_W {
|
||||
TXFEMD_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - RX FIFO Full Mode"]
|
||||
#[inline(always)]
|
||||
pub fn rxffmd(&mut self) -> RXFFMD_W {
|
||||
RXFFMD_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_ctrl](index.html) module"]
|
||||
pub struct S0_CTRL_SPEC;
|
||||
impl crate::RegisterSpec for S0_CTRL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_ctrl::R](R) reader structure"]
|
||||
impl crate::Readable for S0_CTRL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_ctrl::W](W) writer structure"]
|
||||
impl crate::Writable for S0_CTRL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_CTRL to value 0"]
|
||||
impl crate::Resettable for S0_CTRL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_data.rs
Normal file
64
src/i2ca/s0_data.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_DATA` reader"]
|
||||
pub struct R(crate::R<S0_DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_DATA_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_DATA` writer"]
|
||||
pub struct W(crate::W<S0_DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_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 From<crate::W<S0_DATA_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Data Input/Output\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 [s0_data](index.html) module"]
|
||||
pub struct S0_DATA_SPEC;
|
||||
impl crate::RegisterSpec for S0_DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_data::R](R) reader structure"]
|
||||
impl crate::Readable for S0_DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_data::W](W) writer structure"]
|
||||
impl crate::Writable for S0_DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_DATA to value 0"]
|
||||
impl crate::Resettable for S0_DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
99
src/i2ca/s0_fifo_clr.rs
Normal file
99
src/i2ca/s0_fifo_clr.rs
Normal file
@ -0,0 +1,99 @@
|
||||
#[doc = "Register `S0_FIFO_CLR` writer"]
|
||||
pub struct W(crate::W<S0_FIFO_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_FIFO_CLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_FIFO_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_FIFO_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFIFO` writer - Clear Rx FIFO"]
|
||||
pub struct RXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFIFO` writer - Clear Tx FIFO"]
|
||||
pub struct TXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Clear Rx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn rxfifo(&mut self) -> RXFIFO_W {
|
||||
RXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Clear Tx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn txfifo(&mut self) -> TXFIFO_W {
|
||||
TXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Clear FIFO Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_fifo_clr](index.html) module"]
|
||||
pub struct S0_FIFO_CLR_SPEC;
|
||||
impl crate::RegisterSpec for S0_FIFO_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_fifo_clr::W](W) writer structure"]
|
||||
impl crate::Writable for S0_FIFO_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_FIFO_CLR to value 0"]
|
||||
impl crate::Resettable for S0_FIFO_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
477
src/i2ca/s0_irq_clr.rs
Normal file
477
src/i2ca/s0_irq_clr.rs
Normal file
@ -0,0 +1,477 @@
|
||||
#[doc = "Register `S0_IRQ_CLR` writer"]
|
||||
pub struct W(crate::W<S0_IRQ_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_IRQ_CLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_IRQ_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_IRQ_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` writer - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> COMPLETED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` writer - Controller is Idle"]
|
||||
pub struct IDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `WAITING` writer - Controller is Waiting"]
|
||||
pub struct WAITING_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WAITING_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXSTALLED` writer - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXSTALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXSTALLED` writer - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXSTALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ADDRESSMATCH` writer - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ADDRESSMATCH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKDATA` writer - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKDATA_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXDATAFIRST` writer - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXDATAFIRST_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `I2C_START` writer - I2C Start Condition"]
|
||||
pub struct I2C_START_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2C_START_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `I2C_STOP` writer - I2C Stop Condition"]
|
||||
pub struct I2C_STOP_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2C_STOP_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXUNDERFLOW` writer - TX FIFO Underflowed"]
|
||||
pub struct TXUNDERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXUNDERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXREADY` writer - TX FIFO Ready"]
|
||||
pub struct TXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXREADY` writer - RX FIFO Ready"]
|
||||
pub struct RXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXEMPTY` writer - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXEMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFULL` writer - RX FIFO Full"]
|
||||
pub struct RXFULL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFULL_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 0 - Controller Complted a Transaction"]
|
||||
#[inline(always)]
|
||||
pub fn completed(&mut self) -> COMPLETED_W {
|
||||
COMPLETED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&mut self) -> IDLE_W {
|
||||
IDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&mut self) -> WAITING_W {
|
||||
WAITING_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Tx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn txstalled(&mut self) -> TXSTALLED_W {
|
||||
TXSTALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - Controller is Rx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn rxstalled(&mut self) -> RXSTALLED_W {
|
||||
RXSTALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address Match"]
|
||||
#[inline(always)]
|
||||
pub fn addressmatch(&mut self) -> ADDRESSMATCH_W {
|
||||
ADDRESSMATCH_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&mut self) -> NACKDATA_W {
|
||||
NACKDATA_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - Pending Data is first Byte following Address"]
|
||||
#[inline(always)]
|
||||
pub fn rxdatafirst(&mut self) -> RXDATAFIRST_W {
|
||||
RXDATAFIRST_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - I2C Start Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_start(&mut self) -> I2C_START_W {
|
||||
I2C_START_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - I2C Stop Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_stop(&mut self) -> I2C_STOP_W {
|
||||
I2C_STOP_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Underflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txunderflow(&mut self) -> TXUNDERFLOW_W {
|
||||
TXUNDERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&mut self) -> RXOVERFLOW_W {
|
||||
RXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&mut self) -> TXREADY_W {
|
||||
TXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&mut self) -> RXREADY_W {
|
||||
RXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&mut self) -> TXEMPTY_W {
|
||||
TXEMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&mut self) -> RXFULL_W {
|
||||
RXFULL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Clear Interrupt Status Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_irq_clr](index.html) module"]
|
||||
pub struct S0_IRQ_CLR_SPEC;
|
||||
impl crate::RegisterSpec for S0_IRQ_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_irq_clr::W](W) writer structure"]
|
||||
impl crate::Writable for S0_IRQ_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_IRQ_CLR to value 0"]
|
||||
impl crate::Resettable for S0_IRQ_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
818
src/i2ca/s0_irq_enb.rs
Normal file
818
src/i2ca/s0_irq_enb.rs
Normal file
@ -0,0 +1,818 @@
|
||||
#[doc = "Register `S0_IRQ_ENB` reader"]
|
||||
pub struct R(crate::R<S0_IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_IRQ_ENB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_IRQ_ENB_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_IRQ_ENB_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_IRQ_ENB` writer"]
|
||||
pub struct W(crate::W<S0_IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_IRQ_ENB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_IRQ_ENB_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_IRQ_ENB_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` reader - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_R(crate::FieldReader<bool, bool>);
|
||||
impl COMPLETED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
COMPLETED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for COMPLETED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` writer - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> COMPLETED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` writer - Controller is Idle"]
|
||||
pub struct IDLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IDLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` writer - Controller is Waiting"]
|
||||
pub struct WAITING_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WAITING_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXSTALLED` reader - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl TXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTALLED` writer - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXSTALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXSTALLED` reader - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl RXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTALLED` writer - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXSTALLED_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `ADDRESSMATCH` reader - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_R(crate::FieldReader<bool, bool>);
|
||||
impl ADDRESSMATCH_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ADDRESSMATCH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ADDRESSMATCH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESSMATCH` writer - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ADDRESSMATCH_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` writer - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NACKDATA_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXDATAFIRST` reader - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_R(crate::FieldReader<bool, bool>);
|
||||
impl RXDATAFIRST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXDATAFIRST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXDATAFIRST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXDATAFIRST` writer - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXDATAFIRST_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `I2C_START` reader - I2C Start Condition"]
|
||||
pub struct I2C_START_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_START_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_START_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_START_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_START` writer - I2C Start Condition"]
|
||||
pub struct I2C_START_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2C_START_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `I2C_STOP` reader - I2C Stop Condition"]
|
||||
pub struct I2C_STOP_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_STOP_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_STOP_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_STOP_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_STOP` writer - I2C Stop Condition"]
|
||||
pub struct I2C_STOP_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> I2C_STOP_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXUNDERFLOW` reader - TX FIFO Underflowed"]
|
||||
pub struct TXUNDERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXUNDERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXUNDERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXUNDERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXUNDERFLOW` writer - TX FIFO Underflowed"]
|
||||
pub struct TXUNDERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXUNDERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` writer - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXOVERFLOW_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` writer - TX FIFO Ready"]
|
||||
pub struct TXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` writer - RX FIFO Ready"]
|
||||
pub struct RXREADY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXREADY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` writer - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXEMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` writer - RX FIFO Full"]
|
||||
pub struct RXFULL_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFULL_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"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 - Controller Complted a Transaction"]
|
||||
#[inline(always)]
|
||||
pub fn completed(&self) -> COMPLETED_R {
|
||||
COMPLETED_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Tx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn txstalled(&self) -> TXSTALLED_R {
|
||||
TXSTALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Controller is Rx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn rxstalled(&self) -> RXSTALLED_R {
|
||||
RXSTALLED_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address Match"]
|
||||
#[inline(always)]
|
||||
pub fn addressmatch(&self) -> ADDRESSMATCH_R {
|
||||
ADDRESSMATCH_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Pending Data is first Byte following Address"]
|
||||
#[inline(always)]
|
||||
pub fn rxdatafirst(&self) -> RXDATAFIRST_R {
|
||||
RXDATAFIRST_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - I2C Start Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_start(&self) -> I2C_START_R {
|
||||
I2C_START_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - I2C Stop Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_stop(&self) -> I2C_STOP_R {
|
||||
I2C_STOP_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Underflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txunderflow(&self) -> TXUNDERFLOW_R {
|
||||
TXUNDERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Controller Complted a Transaction"]
|
||||
#[inline(always)]
|
||||
pub fn completed(&mut self) -> COMPLETED_W {
|
||||
COMPLETED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&mut self) -> IDLE_W {
|
||||
IDLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&mut self) -> WAITING_W {
|
||||
WAITING_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Tx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn txstalled(&mut self) -> TXSTALLED_W {
|
||||
TXSTALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - Controller is Rx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn rxstalled(&mut self) -> RXSTALLED_W {
|
||||
RXSTALLED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address Match"]
|
||||
#[inline(always)]
|
||||
pub fn addressmatch(&mut self) -> ADDRESSMATCH_W {
|
||||
ADDRESSMATCH_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&mut self) -> NACKDATA_W {
|
||||
NACKDATA_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - Pending Data is first Byte following Address"]
|
||||
#[inline(always)]
|
||||
pub fn rxdatafirst(&mut self) -> RXDATAFIRST_W {
|
||||
RXDATAFIRST_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - I2C Start Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_start(&mut self) -> I2C_START_W {
|
||||
I2C_START_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - I2C Stop Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_stop(&mut self) -> I2C_STOP_W {
|
||||
I2C_STOP_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Underflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txunderflow(&mut self) -> TXUNDERFLOW_W {
|
||||
TXUNDERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&mut self) -> RXOVERFLOW_W {
|
||||
RXOVERFLOW_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&mut self) -> TXREADY_W {
|
||||
TXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&mut self) -> RXREADY_W {
|
||||
RXREADY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&mut self) -> TXEMPTY_W {
|
||||
TXEMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&mut self) -> RXFULL_W {
|
||||
RXFULL_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_irq_enb](index.html) module"]
|
||||
pub struct S0_IRQ_ENB_SPEC;
|
||||
impl crate::RegisterSpec for S0_IRQ_ENB_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_irq_enb::R](R) reader structure"]
|
||||
impl crate::Readable for S0_IRQ_ENB_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_irq_enb::W](W) writer structure"]
|
||||
impl crate::Writable for S0_IRQ_ENB_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_IRQ_ENB to value 0"]
|
||||
impl crate::Resettable for S0_IRQ_ENB_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
353
src/i2ca/s0_irq_end.rs
Normal file
353
src/i2ca/s0_irq_end.rs
Normal file
@ -0,0 +1,353 @@
|
||||
#[doc = "Register `S0_IRQ_END` reader"]
|
||||
pub struct R(crate::R<S0_IRQ_END_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_IRQ_END_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_IRQ_END_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_IRQ_END_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` reader - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_R(crate::FieldReader<bool, bool>);
|
||||
impl COMPLETED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
COMPLETED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for COMPLETED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTALLED` reader - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl TXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTALLED` reader - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl RXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESSMATCH` reader - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_R(crate::FieldReader<bool, bool>);
|
||||
impl ADDRESSMATCH_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ADDRESSMATCH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ADDRESSMATCH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXDATAFIRST` reader - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_R(crate::FieldReader<bool, bool>);
|
||||
impl RXDATAFIRST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXDATAFIRST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXDATAFIRST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_START` reader - I2C Start Condition"]
|
||||
pub struct I2C_START_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_START_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_START_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_START_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_STOP` reader - I2C Stop Condition"]
|
||||
pub struct I2C_STOP_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_STOP_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_STOP_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_STOP_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXUNDERFLOW` reader - TX FIFO Underflowed"]
|
||||
pub struct TXUNDERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXUNDERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXUNDERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXUNDERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Controller Complted a Transaction"]
|
||||
#[inline(always)]
|
||||
pub fn completed(&self) -> COMPLETED_R {
|
||||
COMPLETED_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Tx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn txstalled(&self) -> TXSTALLED_R {
|
||||
TXSTALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Controller is Rx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn rxstalled(&self) -> RXSTALLED_R {
|
||||
RXSTALLED_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address Match"]
|
||||
#[inline(always)]
|
||||
pub fn addressmatch(&self) -> ADDRESSMATCH_R {
|
||||
ADDRESSMATCH_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Pending Data is first Byte following Address"]
|
||||
#[inline(always)]
|
||||
pub fn rxdatafirst(&self) -> RXDATAFIRST_R {
|
||||
RXDATAFIRST_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - I2C Start Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_start(&self) -> I2C_START_R {
|
||||
I2C_START_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - I2C Stop Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_stop(&self) -> I2C_STOP_R {
|
||||
I2C_STOP_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Underflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txunderflow(&self) -> TXUNDERFLOW_R {
|
||||
TXUNDERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Enabled Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_irq_end](index.html) module"]
|
||||
pub struct S0_IRQ_END_SPEC;
|
||||
impl crate::RegisterSpec for S0_IRQ_END_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_irq_end::R](R) reader structure"]
|
||||
impl crate::Readable for S0_IRQ_END_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_IRQ_END to value 0"]
|
||||
impl crate::Resettable for S0_IRQ_END_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
353
src/i2ca/s0_irq_raw.rs
Normal file
353
src/i2ca/s0_irq_raw.rs
Normal file
@ -0,0 +1,353 @@
|
||||
#[doc = "Register `S0_IRQ_RAW` reader"]
|
||||
pub struct R(crate::R<S0_IRQ_RAW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_IRQ_RAW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_IRQ_RAW_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_IRQ_RAW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` reader - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_R(crate::FieldReader<bool, bool>);
|
||||
impl COMPLETED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
COMPLETED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for COMPLETED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTALLED` reader - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl TXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTALLED` reader - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl RXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESSMATCH` reader - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_R(crate::FieldReader<bool, bool>);
|
||||
impl ADDRESSMATCH_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ADDRESSMATCH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ADDRESSMATCH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXDATAFIRST` reader - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_R(crate::FieldReader<bool, bool>);
|
||||
impl RXDATAFIRST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXDATAFIRST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXDATAFIRST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_START` reader - I2C Start Condition"]
|
||||
pub struct I2C_START_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_START_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_START_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_START_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `I2C_STOP` reader - I2C Stop Condition"]
|
||||
pub struct I2C_STOP_R(crate::FieldReader<bool, bool>);
|
||||
impl I2C_STOP_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
I2C_STOP_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for I2C_STOP_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXUNDERFLOW` reader - TX FIFO Underflowed"]
|
||||
pub struct TXUNDERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl TXUNDERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXUNDERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXUNDERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVERFLOW` reader - TX FIFO Overflowed"]
|
||||
pub struct RXOVERFLOW_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVERFLOW_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVERFLOW_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVERFLOW_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXREADY` reader - TX FIFO Ready"]
|
||||
pub struct TXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXREADY` reader - RX FIFO Ready"]
|
||||
pub struct RXREADY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXREADY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXREADY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXREADY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXEMPTY` reader - TX FIFO Empty"]
|
||||
pub struct TXEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXEMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXEMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXEMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFULL` reader - RX FIFO Full"]
|
||||
pub struct RXFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Controller Complted a Transaction"]
|
||||
#[inline(always)]
|
||||
pub fn completed(&self) -> COMPLETED_R {
|
||||
COMPLETED_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Controller is Idle"]
|
||||
#[inline(always)]
|
||||
pub fn idle(&self) -> IDLE_R {
|
||||
IDLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Controller is Waiting"]
|
||||
#[inline(always)]
|
||||
pub fn waiting(&self) -> WAITING_R {
|
||||
WAITING_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Controller is Tx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn txstalled(&self) -> TXSTALLED_R {
|
||||
TXSTALLED_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Controller is Rx Stalled"]
|
||||
#[inline(always)]
|
||||
pub fn rxstalled(&self) -> RXSTALLED_R {
|
||||
RXSTALLED_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - I2C Address Match"]
|
||||
#[inline(always)]
|
||||
pub fn addressmatch(&self) -> ADDRESSMATCH_R {
|
||||
ADDRESSMATCH_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - I2C Data was not Acknowledged"]
|
||||
#[inline(always)]
|
||||
pub fn nackdata(&self) -> NACKDATA_R {
|
||||
NACKDATA_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Pending Data is first Byte following Address"]
|
||||
#[inline(always)]
|
||||
pub fn rxdatafirst(&self) -> RXDATAFIRST_R {
|
||||
RXDATAFIRST_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - I2C Start Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_start(&self) -> I2C_START_R {
|
||||
I2C_START_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - I2C Stop Condition"]
|
||||
#[inline(always)]
|
||||
pub fn i2c_stop(&self) -> I2C_STOP_R {
|
||||
I2C_STOP_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - TX FIFO Underflowed"]
|
||||
#[inline(always)]
|
||||
pub fn txunderflow(&self) -> TXUNDERFLOW_R {
|
||||
TXUNDERFLOW_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - TX FIFO Overflowed"]
|
||||
#[inline(always)]
|
||||
pub fn rxoverflow(&self) -> RXOVERFLOW_R {
|
||||
RXOVERFLOW_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 12 - TX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn txready(&self) -> TXREADY_R {
|
||||
TXREADY_R::new(((self.bits >> 12) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 13 - RX FIFO Ready"]
|
||||
#[inline(always)]
|
||||
pub fn rxready(&self) -> RXREADY_R {
|
||||
RXREADY_R::new(((self.bits >> 13) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - TX FIFO Empty"]
|
||||
#[inline(always)]
|
||||
pub fn txempty(&self) -> TXEMPTY_R {
|
||||
TXEMPTY_R::new(((self.bits >> 14) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX FIFO Full"]
|
||||
#[inline(always)]
|
||||
pub fn rxfull(&self) -> RXFULL_R {
|
||||
RXFULL_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Raw Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_irq_raw](index.html) module"]
|
||||
pub struct S0_IRQ_RAW_SPEC;
|
||||
impl crate::RegisterSpec for S0_IRQ_RAW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_irq_raw::R](R) reader structure"]
|
||||
impl crate::Readable for S0_IRQ_RAW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_IRQ_RAW to value 0"]
|
||||
impl crate::Resettable for S0_IRQ_RAW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/i2ca/s0_lastaddress.rs
Normal file
31
src/i2ca/s0_lastaddress.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `S0_LASTADDRESS` reader"]
|
||||
pub struct R(crate::R<S0_LASTADDRESS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_LASTADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_LASTADDRESS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_LASTADDRESS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Slave I2C Last Address value\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_lastaddress](index.html) module"]
|
||||
pub struct S0_LASTADDRESS_SPEC;
|
||||
impl crate::RegisterSpec for S0_LASTADDRESS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_lastaddress::R](R) reader structure"]
|
||||
impl crate::Readable for S0_LASTADDRESS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_LASTADDRESS to value 0"]
|
||||
impl crate::Resettable for S0_LASTADDRESS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_maxwords.rs
Normal file
64
src/i2ca/s0_maxwords.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_MAXWORDS` reader"]
|
||||
pub struct R(crate::R<S0_MAXWORDS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_MAXWORDS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_MAXWORDS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_MAXWORDS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_MAXWORDS` writer"]
|
||||
pub struct W(crate::W<S0_MAXWORDS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_MAXWORDS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_MAXWORDS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_MAXWORDS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave MaxWords 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 [s0_maxwords](index.html) module"]
|
||||
pub struct S0_MAXWORDS_SPEC;
|
||||
impl crate::RegisterSpec for S0_MAXWORDS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_maxwords::R](R) reader structure"]
|
||||
impl crate::Readable for S0_MAXWORDS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_maxwords::W](W) writer structure"]
|
||||
impl crate::Writable for S0_MAXWORDS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_MAXWORDS to value 0"]
|
||||
impl crate::Resettable for S0_MAXWORDS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/i2ca/s0_rxcount.rs
Normal file
31
src/i2ca/s0_rxcount.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `S0_RXCOUNT` reader"]
|
||||
pub struct R(crate::R<S0_RXCOUNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_RXCOUNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_RXCOUNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_RXCOUNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Slave RX Count Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_rxcount](index.html) module"]
|
||||
pub struct S0_RXCOUNT_SPEC;
|
||||
impl crate::RegisterSpec for S0_RXCOUNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_rxcount::R](R) reader structure"]
|
||||
impl crate::Readable for S0_RXCOUNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_RXCOUNT to value 0"]
|
||||
impl crate::Resettable for S0_RXCOUNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/i2ca/s0_rxfifoirqtrg.rs
Normal file
64
src/i2ca/s0_rxfifoirqtrg.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `S0_RXFIFOIRQTRG` reader"]
|
||||
pub struct R(crate::R<S0_RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_RXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_RXFIFOIRQTRG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `S0_RXFIFOIRQTRG` writer"]
|
||||
pub struct W(crate::W<S0_RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<S0_RXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<S0_RXFIFOIRQTRG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<S0_RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Slave Rx FIFO IRQ Trigger Level\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 [s0_rxfifoirqtrg](index.html) module"]
|
||||
pub struct S0_RXFIFOIRQTRG_SPEC;
|
||||
impl crate::RegisterSpec for S0_RXFIFOIRQTRG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_rxfifoirqtrg::R](R) reader structure"]
|
||||
impl crate::Readable for S0_RXFIFOIRQTRG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [s0_rxfifoirqtrg::W](W) writer structure"]
|
||||
impl crate::Writable for S0_RXFIFOIRQTRG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_RXFIFOIRQTRG to value 0"]
|
||||
impl crate::Resettable for S0_RXFIFOIRQTRG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/i2ca/s0_state.rs
Normal file
31
src/i2ca/s0_state.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `S0_STATE` reader"]
|
||||
pub struct R(crate::R<S0_STATE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_STATE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_STATE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_STATE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Internal STATE of I2C Slave Controller\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [s0_state](index.html) module"]
|
||||
pub struct S0_STATE_SPEC;
|
||||
impl crate::RegisterSpec for S0_STATE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [s0_state::R](R) reader structure"]
|
||||
impl crate::Readable for S0_STATE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets S0_STATE to value 0"]
|
||||
impl crate::Resettable for S0_STATE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
373
src/i2ca/s0_status.rs
Normal file
373
src/i2ca/s0_status.rs
Normal file
@ -0,0 +1,373 @@
|
||||
#[doc = "Register `S0_STATUS` reader"]
|
||||
pub struct R(crate::R<S0_STATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<S0_STATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<S0_STATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<S0_STATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `COMPLETED` reader - Controller Complted a Transaction"]
|
||||
pub struct COMPLETED_R(crate::FieldReader<bool, bool>);
|
||||
impl COMPLETED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
COMPLETED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for COMPLETED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IDLE` reader - Controller is Idle"]
|
||||
pub struct IDLE_R(crate::FieldReader<bool, bool>);
|
||||
impl IDLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IDLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IDLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WAITING` reader - Controller is Waiting"]
|
||||
pub struct WAITING_R(crate::FieldReader<bool, bool>);
|
||||
impl WAITING_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WAITING_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WAITING_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTALLED` reader - Controller is Tx Stalled"]
|
||||
pub struct TXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl TXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTALLED` reader - Controller is Rx Stalled"]
|
||||
pub struct RXSTALLED_R(crate::FieldReader<bool, bool>);
|
||||
impl RXSTALLED_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXSTALLED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXSTALLED_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESSMATCH` reader - I2C Address Match"]
|
||||
pub struct ADDRESSMATCH_R(crate::FieldReader<bool, bool>);
|
||||
impl ADDRESSMATCH_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ADDRESSMATCH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ADDRESSMATCH_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NACKDATA` reader - I2C Data was not Acknowledged"]
|
||||
pub struct NACKDATA_R(crate::FieldReader<bool, bool>);
|
||||
impl NACKDATA_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NACKDATA_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NACKDATA_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXDATAFIRST` reader - Pending Data is first Byte following Address"]
|
||||
pub struct RXDATAFIRST_R(crate::FieldReader<bool, bool>);
|
||||
impl RXDATAFIRST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXDATAFIRST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXDATAFIRST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXNEMPTY` reader - RX FIFO is Not Empty"]
|
||||
pub struct RXNEMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXNEMPTY_R |