Initial checkin of peripheral access code for MSP432P401R
parent
11faad1301
commit
97b0d7f786
|
@ -0,0 +1,3 @@
|
|||
/target
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
|
@ -0,0 +1,17 @@
|
|||
[package]
|
||||
name = "msp432p401r"
|
||||
version = "0.1.0"
|
||||
authors = ["Levi Pearson <levipearson@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bare-metal = "0.2.0"
|
||||
cortex-m = "0.5.8"
|
||||
vcell = "0.1.0"
|
||||
|
||||
[dependencies.cortex-m-rt]
|
||||
optional = true
|
||||
version = "0.6.5"
|
||||
|
||||
[features]
|
||||
rt = ["cortex-m-rt/device"]
|
|
@ -0,0 +1,16 @@
|
|||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
fn main() {
|
||||
if env::var_os("CARGO_FEATURE_RT").is_some() {
|
||||
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
||||
File::create(out.join("device.x"))
|
||||
.unwrap()
|
||||
.write_all(include_bytes!("device.x"))
|
||||
.unwrap();
|
||||
println!("cargo:rustc-link-search={}", out.display());
|
||||
println!("cargo:rerun-if-changed=device.x");
|
||||
}
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
PROVIDE(PSS_IRQ = DefaultHandler);
|
||||
PROVIDE(CS_IRQ = DefaultHandler);
|
||||
PROVIDE(PCM_IRQ = DefaultHandler);
|
||||
PROVIDE(WDT_A_IRQ = DefaultHandler);
|
||||
PROVIDE(FPU_IRQ = DefaultHandler);
|
||||
PROVIDE(FLCTL_IRQ = DefaultHandler);
|
||||
PROVIDE(COMP_E0_IRQ = DefaultHandler);
|
||||
PROVIDE(COMP_E1_IRQ = DefaultHandler);
|
||||
PROVIDE(TA0_0_IRQ = DefaultHandler);
|
||||
PROVIDE(TA0_N_IRQ = DefaultHandler);
|
||||
PROVIDE(TA1_0_IRQ = DefaultHandler);
|
||||
PROVIDE(TA1_N_IRQ = DefaultHandler);
|
||||
PROVIDE(TA2_0_IRQ = DefaultHandler);
|
||||
PROVIDE(TA2_N_IRQ = DefaultHandler);
|
||||
PROVIDE(TA3_0_IRQ = DefaultHandler);
|
||||
PROVIDE(TA3_N_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIA0_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIA1_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIA2_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIA3_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIB0_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIB1_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIB2_IRQ = DefaultHandler);
|
||||
PROVIDE(EUSCIB3_IRQ = DefaultHandler);
|
||||
PROVIDE(ADC14_IRQ = DefaultHandler);
|
||||
PROVIDE(T32_INT1_IRQ = DefaultHandler);
|
||||
PROVIDE(T32_INT2_IRQ = DefaultHandler);
|
||||
PROVIDE(T32_INTC_IRQ = DefaultHandler);
|
||||
PROVIDE(AES256_IRQ = DefaultHandler);
|
||||
PROVIDE(RTC_C_IRQ = DefaultHandler);
|
||||
PROVIDE(DMA_ERR_IRQ = DefaultHandler);
|
||||
PROVIDE(DMA_INT3_IRQ = DefaultHandler);
|
||||
PROVIDE(DMA_INT2_IRQ = DefaultHandler);
|
||||
PROVIDE(DMA_INT1_IRQ = DefaultHandler);
|
||||
PROVIDE(DMA_INT0_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT1_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT2_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT3_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT4_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT5_IRQ = DefaultHandler);
|
||||
PROVIDE(PORT6_IRQ = DefaultHandler);
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Control 0 Register"]
|
||||
pub adc14ctl0: ADC14CTL0,
|
||||
#[doc = "0x04 - Control 1 Register"]
|
||||
pub adc14ctl1: ADC14CTL1,
|
||||
#[doc = "0x08 - Window Comparator Low Threshold 0 Register"]
|
||||
pub adc14lo0: ADC14LO0,
|
||||
#[doc = "0x0c - Window Comparator High Threshold 0 Register"]
|
||||
pub adc14hi0: ADC14HI0,
|
||||
#[doc = "0x10 - Window Comparator Low Threshold 1 Register"]
|
||||
pub adc14lo1: ADC14LO1,
|
||||
#[doc = "0x14 - Window Comparator High Threshold 1 Register"]
|
||||
pub adc14hi1: ADC14HI1,
|
||||
#[doc = "0x18 - Conversion Memory Control Register"]
|
||||
pub adc14mctl: [ADC14MCTL; 32],
|
||||
#[doc = "0x98 - Conversion Memory Register"]
|
||||
pub adc14mem: [ADC14MEM; 32],
|
||||
_reserved0: [u8; 36usize],
|
||||
#[doc = "0x13c - Interrupt Enable 0 Register"]
|
||||
pub adc14ier0: ADC14IER0,
|
||||
#[doc = "0x140 - Interrupt Enable 1 Register"]
|
||||
pub adc14ier1: ADC14IER1,
|
||||
#[doc = "0x144 - Interrupt Flag 0 Register"]
|
||||
pub adc14ifgr0: ADC14IFGR0,
|
||||
#[doc = "0x148 - Interrupt Flag 1 Register"]
|
||||
pub adc14ifgr1: ADC14IFGR1,
|
||||
#[doc = "0x14c - Clear Interrupt Flag 0 Register"]
|
||||
pub adc14clrifgr0: ADC14CLRIFGR0,
|
||||
#[doc = "0x150 - Clear Interrupt Flag 1 Register"]
|
||||
pub adc14clrifgr1: ADC14CLRIFGR1,
|
||||
#[doc = "0x154 - Interrupt Vector Register"]
|
||||
pub adc14iv: ADC14IV,
|
||||
}
|
||||
#[doc = "Control 0 Register"]
|
||||
pub struct ADC14CTL0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 0 Register"]
|
||||
pub mod adc14ctl0;
|
||||
#[doc = "Control 1 Register"]
|
||||
pub struct ADC14CTL1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 1 Register"]
|
||||
pub mod adc14ctl1;
|
||||
#[doc = "Window Comparator Low Threshold 0 Register"]
|
||||
pub struct ADC14LO0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Window Comparator Low Threshold 0 Register"]
|
||||
pub mod adc14lo0;
|
||||
#[doc = "Window Comparator High Threshold 0 Register"]
|
||||
pub struct ADC14HI0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Window Comparator High Threshold 0 Register"]
|
||||
pub mod adc14hi0;
|
||||
#[doc = "Window Comparator Low Threshold 1 Register"]
|
||||
pub struct ADC14LO1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Window Comparator Low Threshold 1 Register"]
|
||||
pub mod adc14lo1;
|
||||
#[doc = "Window Comparator High Threshold 1 Register"]
|
||||
pub struct ADC14HI1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Window Comparator High Threshold 1 Register"]
|
||||
pub mod adc14hi1;
|
||||
#[doc = "Conversion Memory Control Register"]
|
||||
pub struct ADC14MCTL {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Conversion Memory Control Register"]
|
||||
pub mod adc14mctl;
|
||||
#[doc = "Conversion Memory Register"]
|
||||
pub struct ADC14MEM {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Conversion Memory Register"]
|
||||
pub mod adc14mem;
|
||||
#[doc = "Interrupt Enable 0 Register"]
|
||||
pub struct ADC14IER0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Enable 0 Register"]
|
||||
pub mod adc14ier0;
|
||||
#[doc = "Interrupt Enable 1 Register"]
|
||||
pub struct ADC14IER1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Enable 1 Register"]
|
||||
pub mod adc14ier1;
|
||||
#[doc = "Interrupt Flag 0 Register"]
|
||||
pub struct ADC14IFGR0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Flag 0 Register"]
|
||||
pub mod adc14ifgr0;
|
||||
#[doc = "Interrupt Flag 1 Register"]
|
||||
pub struct ADC14IFGR1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Flag 1 Register"]
|
||||
pub mod adc14ifgr1;
|
||||
#[doc = "Clear Interrupt Flag 0 Register"]
|
||||
pub struct ADC14CLRIFGR0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Clear Interrupt Flag 0 Register"]
|
||||
pub mod adc14clrifgr0;
|
||||
#[doc = "Clear Interrupt Flag 1 Register"]
|
||||
pub struct ADC14CLRIFGR1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Clear Interrupt Flag 1 Register"]
|
||||
pub mod adc14clrifgr1;
|
||||
#[doc = "Interrupt Vector Register"]
|
||||
pub struct ADC14IV {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Vector Register"]
|
||||
pub mod adc14iv;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,442 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14CLRIFGR1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14INIFG`"]
|
||||
pub enum CLRADC14INIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14INIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14INIFG_1,
|
||||
}
|
||||
impl CLRADC14INIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14INIFGW::CLRADC14INIFG_0 => false,
|
||||
CLRADC14INIFGW::CLRADC14INIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14INIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14INIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14INIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14inifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14INIFGW::CLRADC14INIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14inifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14INIFGW::CLRADC14INIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14LOIFG`"]
|
||||
pub enum CLRADC14LOIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14LOIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14LOIFG_1,
|
||||
}
|
||||
impl CLRADC14LOIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14LOIFGW::CLRADC14LOIFG_0 => false,
|
||||
CLRADC14LOIFGW::CLRADC14LOIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14LOIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14LOIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14LOIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14loifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14LOIFGW::CLRADC14LOIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14loifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14LOIFGW::CLRADC14LOIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14HIIFG`"]
|
||||
pub enum CLRADC14HIIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14HIIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14HIIFG_1,
|
||||
}
|
||||
impl CLRADC14HIIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14HIIFGW::CLRADC14HIIFG_0 => false,
|
||||
CLRADC14HIIFGW::CLRADC14HIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14HIIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14HIIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14HIIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14hiifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14HIIFGW::CLRADC14HIIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14hiifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14HIIFGW::CLRADC14HIIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14OVIFG`"]
|
||||
pub enum CLRADC14OVIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14OVIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14OVIFG_1,
|
||||
}
|
||||
impl CLRADC14OVIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14OVIFGW::CLRADC14OVIFG_0 => false,
|
||||
CLRADC14OVIFGW::CLRADC14OVIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14OVIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14OVIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14OVIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14ovifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14OVIFGW::CLRADC14OVIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14ovifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14OVIFGW::CLRADC14OVIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14TOVIFG`"]
|
||||
pub enum CLRADC14TOVIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14TOVIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14TOVIFG_1,
|
||||
}
|
||||
impl CLRADC14TOVIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14TOVIFGW::CLRADC14TOVIFG_0 => false,
|
||||
CLRADC14TOVIFGW::CLRADC14TOVIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14TOVIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14TOVIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14TOVIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14tovifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14TOVIFGW::CLRADC14TOVIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14tovifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14TOVIFGW::CLRADC14TOVIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLRADC14RDYIFG`"]
|
||||
pub enum CLRADC14RDYIFGW {
|
||||
#[doc = "no effect"]
|
||||
CLRADC14RDYIFG_0,
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
CLRADC14RDYIFG_1,
|
||||
}
|
||||
impl CLRADC14RDYIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLRADC14RDYIFGW::CLRADC14RDYIFG_0 => false,
|
||||
CLRADC14RDYIFGW::CLRADC14RDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLRADC14RDYIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLRADC14RDYIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLRADC14RDYIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "no effect"]
|
||||
#[inline]
|
||||
pub fn clradc14rdyifg_0(self) -> &'a mut W {
|
||||
self.variant(CLRADC14RDYIFGW::CLRADC14RDYIFG_0)
|
||||
}
|
||||
#[doc = "clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clradc14rdyifg_1(self) -> &'a mut W {
|
||||
self.variant(CLRADC14RDYIFGW::CLRADC14RDYIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 1 - clear ADC14INIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14inifg(&mut self) -> _CLRADC14INIFGW {
|
||||
_CLRADC14INIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - clear ADC14LOIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14loifg(&mut self) -> _CLRADC14LOIFGW {
|
||||
_CLRADC14LOIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - clear ADC14HIIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14hiifg(&mut self) -> _CLRADC14HIIFGW {
|
||||
_CLRADC14HIIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - clear ADC14OVIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14ovifg(&mut self) -> _CLRADC14OVIFGW {
|
||||
_CLRADC14OVIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - clear ADC14TOVIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14tovifg(&mut self) -> _CLRADC14TOVIFGW {
|
||||
_CLRADC14TOVIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - clear ADC14RDYIFG"]
|
||||
#[inline]
|
||||
pub fn clradc14rdyifg(&mut self) -> _CLRADC14RDYIFGW {
|
||||
_CLRADC14RDYIFGW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14HI0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct ADC14HI0R {
|
||||
bits: u16,
|
||||
}
|
||||
impl ADC14HI0R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14HI0W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14HI0W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - High threshold 0"]
|
||||
#[inline]
|
||||
pub fn adc14hi0(&self) -> ADC14HI0R {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
ADC14HI0R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 16383 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - High threshold 0"]
|
||||
#[inline]
|
||||
pub fn adc14hi0(&mut self) -> _ADC14HI0W {
|
||||
_ADC14HI0W { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14HI1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct ADC14HI1R {
|
||||
bits: u16,
|
||||
}
|
||||
impl ADC14HI1R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14HI1W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14HI1W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - High threshold 1"]
|
||||
#[inline]
|
||||
pub fn adc14hi1(&self) -> ADC14HI1R {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
ADC14HI1R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 16383 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - High threshold 1"]
|
||||
#[inline]
|
||||
pub fn adc14hi1(&mut self) -> _ADC14HI1W {
|
||||
_ADC14HI1W { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,778 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14IER1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14INIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14INIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14INIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14INIE_1,
|
||||
}
|
||||
impl ADC14INIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14INIER::ADC14INIE_0 => false,
|
||||
ADC14INIER::ADC14INIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14INIER {
|
||||
match value {
|
||||
false => ADC14INIER::ADC14INIE_0,
|
||||
true => ADC14INIER::ADC14INIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14INIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14inie_0(&self) -> bool {
|
||||
*self == ADC14INIER::ADC14INIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14INIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14inie_1(&self) -> bool {
|
||||
*self == ADC14INIER::ADC14INIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14LOIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14LOIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14LOIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14LOIE_1,
|
||||
}
|
||||
impl ADC14LOIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14LOIER::ADC14LOIE_0 => false,
|
||||
ADC14LOIER::ADC14LOIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14LOIER {
|
||||
match value {
|
||||
false => ADC14LOIER::ADC14LOIE_0,
|
||||
true => ADC14LOIER::ADC14LOIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14LOIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14loie_0(&self) -> bool {
|
||||
*self == ADC14LOIER::ADC14LOIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14LOIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14loie_1(&self) -> bool {
|
||||
*self == ADC14LOIER::ADC14LOIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14HIIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14HIIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14HIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14HIIE_1,
|
||||
}
|
||||
impl ADC14HIIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14HIIER::ADC14HIIE_0 => false,
|
||||
ADC14HIIER::ADC14HIIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14HIIER {
|
||||
match value {
|
||||
false => ADC14HIIER::ADC14HIIE_0,
|
||||
true => ADC14HIIER::ADC14HIIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14HIIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14hiie_0(&self) -> bool {
|
||||
*self == ADC14HIIER::ADC14HIIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14HIIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14hiie_1(&self) -> bool {
|
||||
*self == ADC14HIIER::ADC14HIIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14OVIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14OVIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14OVIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14OVIE_1,
|
||||
}
|
||||
impl ADC14OVIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14OVIER::ADC14OVIE_0 => false,
|
||||
ADC14OVIER::ADC14OVIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14OVIER {
|
||||
match value {
|
||||
false => ADC14OVIER::ADC14OVIE_0,
|
||||
true => ADC14OVIER::ADC14OVIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14OVIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14ovie_0(&self) -> bool {
|
||||
*self == ADC14OVIER::ADC14OVIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14OVIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14ovie_1(&self) -> bool {
|
||||
*self == ADC14OVIER::ADC14OVIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14TOVIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14TOVIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14TOVIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14TOVIE_1,
|
||||
}
|
||||
impl ADC14TOVIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14TOVIER::ADC14TOVIE_0 => false,
|
||||
ADC14TOVIER::ADC14TOVIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14TOVIER {
|
||||
match value {
|
||||
false => ADC14TOVIER::ADC14TOVIE_0,
|
||||
true => ADC14TOVIER::ADC14TOVIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14TOVIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14tovie_0(&self) -> bool {
|
||||
*self == ADC14TOVIER::ADC14TOVIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14TOVIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14tovie_1(&self) -> bool {
|
||||
*self == ADC14TOVIER::ADC14TOVIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14RDYIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14RDYIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14RDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14RDYIE_1,
|
||||
}
|
||||
impl ADC14RDYIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14RDYIER::ADC14RDYIE_0 => false,
|
||||
ADC14RDYIER::ADC14RDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14RDYIER {
|
||||
match value {
|
||||
false => ADC14RDYIER::ADC14RDYIE_0,
|
||||
true => ADC14RDYIER::ADC14RDYIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14RDYIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14rdyie_0(&self) -> bool {
|
||||
*self == ADC14RDYIER::ADC14RDYIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14RDYIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14rdyie_1(&self) -> bool {
|
||||
*self == ADC14RDYIER::ADC14RDYIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14INIE`"]
|
||||
pub enum ADC14INIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14INIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14INIE_1,
|
||||
}
|
||||
impl ADC14INIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14INIEW::ADC14INIE_0 => false,
|
||||
ADC14INIEW::ADC14INIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14INIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14INIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14INIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14inie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14INIEW::ADC14INIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14inie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14INIEW::ADC14INIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14LOIE`"]
|
||||
pub enum ADC14LOIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14LOIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14LOIE_1,
|
||||
}
|
||||
impl ADC14LOIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14LOIEW::ADC14LOIE_0 => false,
|
||||
ADC14LOIEW::ADC14LOIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14LOIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14LOIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14LOIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14loie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14LOIEW::ADC14LOIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14loie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14LOIEW::ADC14LOIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14HIIE`"]
|
||||
pub enum ADC14HIIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14HIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14HIIE_1,
|
||||
}
|
||||
impl ADC14HIIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14HIIEW::ADC14HIIE_0 => false,
|
||||
ADC14HIIEW::ADC14HIIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14HIIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14HIIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14HIIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14hiie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14HIIEW::ADC14HIIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14hiie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14HIIEW::ADC14HIIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14OVIE`"]
|
||||
pub enum ADC14OVIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14OVIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14OVIE_1,
|
||||
}
|
||||
impl ADC14OVIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14OVIEW::ADC14OVIE_0 => false,
|
||||
ADC14OVIEW::ADC14OVIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14OVIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14OVIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14OVIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14ovie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14OVIEW::ADC14OVIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14ovie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14OVIEW::ADC14OVIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14TOVIE`"]
|
||||
pub enum ADC14TOVIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14TOVIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14TOVIE_1,
|
||||
}
|
||||
impl ADC14TOVIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14TOVIEW::ADC14TOVIE_0 => false,
|
||||
ADC14TOVIEW::ADC14TOVIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14TOVIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14TOVIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14TOVIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14tovie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14TOVIEW::ADC14TOVIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14tovie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14TOVIEW::ADC14TOVIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14RDYIE`"]
|
||||
pub enum ADC14RDYIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
ADC14RDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
ADC14RDYIE_1,
|
||||
}
|
||||
impl ADC14RDYIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
ADC14RDYIEW::ADC14RDYIE_0 => false,
|
||||
ADC14RDYIEW::ADC14RDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14RDYIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14RDYIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14RDYIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn adc14rdyie_0(self) -> &'a mut W {
|
||||
self.variant(ADC14RDYIEW::ADC14RDYIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn adc14rdyie_1(self) -> &'a mut W {
|
||||
self.variant(ADC14RDYIEW::ADC14RDYIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 1 - Interrupt enable for ADC14MEMx within comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14inie(&self) -> ADC14INIER {
|
||||
ADC14INIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 2 - Interrupt enable for ADC14MEMx below comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14loie(&self) -> ADC14LOIER {
|
||||
ADC14LOIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 3 - Interrupt enable for ADC14MEMx above comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14hiie(&self) -> ADC14HIIER {
|
||||
ADC14HIIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 4 - ADC14MEMx overflow-interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14ovie(&self) -> ADC14OVIER {
|
||||
ADC14OVIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 5 - ADC14 conversion-time-overflow interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14tovie(&self) -> ADC14TOVIER {
|
||||
ADC14TOVIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 6 - ADC14 local buffered reference ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14rdyie(&self) -> ADC14RDYIER {
|
||||
ADC14RDYIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 1 - Interrupt enable for ADC14MEMx within comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14inie(&mut self) -> _ADC14INIEW {
|
||||
_ADC14INIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Interrupt enable for ADC14MEMx below comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14loie(&mut self) -> _ADC14LOIEW {
|
||||
_ADC14LOIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Interrupt enable for ADC14MEMx above comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14hiie(&mut self) -> _ADC14HIIEW {
|
||||
_ADC14HIIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - ADC14MEMx overflow-interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14ovie(&mut self) -> _ADC14OVIEW {
|
||||
_ADC14OVIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - ADC14 conversion-time-overflow interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14tovie(&mut self) -> _ADC14TOVIEW {
|
||||
_ADC14TOVIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - ADC14 local buffered reference ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn adc14rdyie(&mut self) -> _ADC14RDYIEW {
|
||||
_ADC14RDYIEW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,356 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14IFGR1 {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14INIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14INIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14INIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14INIFG_1,
|
||||
}
|
||||
impl ADC14INIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14INIFGR::ADC14INIFG_0 => false,
|
||||
ADC14INIFGR::ADC14INIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14INIFGR {
|
||||
match value {
|
||||
false => ADC14INIFGR::ADC14INIFG_0,
|
||||
true => ADC14INIFGR::ADC14INIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14INIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14inifg_0(&self) -> bool {
|
||||
*self == ADC14INIFGR::ADC14INIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14INIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14inifg_1(&self) -> bool {
|
||||
*self == ADC14INIFGR::ADC14INIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14LOIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14LOIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14LOIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14LOIFG_1,
|
||||
}
|
||||
impl ADC14LOIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14LOIFGR::ADC14LOIFG_0 => false,
|
||||
ADC14LOIFGR::ADC14LOIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14LOIFGR {
|
||||
match value {
|
||||
false => ADC14LOIFGR::ADC14LOIFG_0,
|
||||
true => ADC14LOIFGR::ADC14LOIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14LOIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14loifg_0(&self) -> bool {
|
||||
*self == ADC14LOIFGR::ADC14LOIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14LOIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14loifg_1(&self) -> bool {
|
||||
*self == ADC14LOIFGR::ADC14LOIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14HIIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14HIIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14HIIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14HIIFG_1,
|
||||
}
|
||||
impl ADC14HIIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14HIIFGR::ADC14HIIFG_0 => false,
|
||||
ADC14HIIFGR::ADC14HIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14HIIFGR {
|
||||
match value {
|
||||
false => ADC14HIIFGR::ADC14HIIFG_0,
|
||||
true => ADC14HIIFGR::ADC14HIIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14HIIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14hiifg_0(&self) -> bool {
|
||||
*self == ADC14HIIFGR::ADC14HIIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14HIIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14hiifg_1(&self) -> bool {
|
||||
*self == ADC14HIIFGR::ADC14HIIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14OVIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14OVIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14OVIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14OVIFG_1,
|
||||
}
|
||||
impl ADC14OVIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14OVIFGR::ADC14OVIFG_0 => false,
|
||||
ADC14OVIFGR::ADC14OVIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14OVIFGR {
|
||||
match value {
|
||||
false => ADC14OVIFGR::ADC14OVIFG_0,
|
||||
true => ADC14OVIFGR::ADC14OVIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14OVIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14ovifg_0(&self) -> bool {
|
||||
*self == ADC14OVIFGR::ADC14OVIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14OVIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14ovifg_1(&self) -> bool {
|
||||
*self == ADC14OVIFGR::ADC14OVIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14TOVIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14TOVIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14TOVIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14TOVIFG_1,
|
||||
}
|
||||
impl ADC14TOVIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14TOVIFGR::ADC14TOVIFG_0 => false,
|
||||
ADC14TOVIFGR::ADC14TOVIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14TOVIFGR {
|
||||
match value {
|
||||
false => ADC14TOVIFGR::ADC14TOVIFG_0,
|
||||
true => ADC14TOVIFGR::ADC14TOVIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14TOVIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14tovifg_0(&self) -> bool {
|
||||
*self == ADC14TOVIFGR::ADC14TOVIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14TOVIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14tovifg_1(&self) -> bool {
|
||||
*self == ADC14TOVIFGR::ADC14TOVIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14RDYIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14RDYIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14RDYIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
ADC14RDYIFG_1,
|
||||
}
|
||||
impl ADC14RDYIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
ADC14RDYIFGR::ADC14RDYIFG_0 => false,
|
||||
ADC14RDYIFGR::ADC14RDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> ADC14RDYIFGR {
|
||||
match value {
|
||||
false => ADC14RDYIFGR::ADC14RDYIFG_0,
|
||||
true => ADC14RDYIFGR::ADC14RDYIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14RDYIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14rdyifg_0(&self) -> bool {
|
||||
*self == ADC14RDYIFGR::ADC14RDYIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14RDYIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_adc14rdyifg_1(&self) -> bool {
|
||||
*self == ADC14RDYIFGR::ADC14RDYIFG_1
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 1 - Interrupt flag for ADC14MEMx within comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14inifg(&self) -> ADC14INIFGR {
|
||||
ADC14INIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 2 - Interrupt flag for ADC14MEMx below comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14loifg(&self) -> ADC14LOIFGR {
|
||||
ADC14LOIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 3 - Interrupt flag for ADC14MEMx above comparator window"]
|
||||
#[inline]
|
||||
pub fn adc14hiifg(&self) -> ADC14HIIFGR {
|
||||
ADC14HIIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 4 - ADC14MEMx overflow interrupt flag"]
|
||||
#[inline]
|
||||
pub fn adc14ovifg(&self) -> ADC14OVIFGR {
|
||||
ADC14OVIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 5 - ADC14 conversion time overflow interrupt flag"]
|
||||
#[inline]
|
||||
pub fn adc14tovifg(&self) -> ADC14TOVIFGR {
|
||||
ADC14TOVIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 6 - ADC14 local buffered reference ready interrupt flag"]
|
||||
#[inline]
|
||||
pub fn adc14rdyifg(&self) -> ADC14RDYIFGR {
|
||||
ADC14RDYIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,796 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14IV {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `ADC14IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADC14IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14IV_0,
|
||||
#[doc = "Interrupt Source: ADC14MEMx overflow; Interrupt Flag: ADC14OVIFG; Interrupt Priority: Highest"]
|
||||
ADC14IV_2,
|
||||
#[doc = "Interrupt Source: Conversion time overflow; Interrupt Flag: ADC14TOVIFG"]
|
||||
ADC14IV_4,
|
||||
#[doc = "Interrupt Source: ADC14 window high interrupt flag; Interrupt Flag: ADC14HIIFG"]
|
||||
ADC14IV_6,
|
||||
#[doc = "Interrupt Source: ADC14 window low interrupt flag; Interrupt Flag: ADC14LOIFG"]
|
||||
ADC14IV_8,
|
||||
#[doc = "Interrupt Source: ADC14 in-window interrupt flag; Interrupt Flag: ADC14INIFG"]
|
||||
ADC14IV_10,
|
||||
#[doc = "Interrupt Source: ADC14MEM0 interrupt flag; Interrupt Flag: ADC14IFG0"]
|
||||
ADC14IV_12,
|
||||
#[doc = "Interrupt Source: ADC14MEM1 interrupt flag; Interrupt Flag: ADC14IFG1"]
|
||||
ADC14IV_14,
|
||||
#[doc = "Interrupt Source: ADC14MEM2 interrupt flag; Interrupt Flag: ADC14IFG2"]
|
||||
ADC14IV_16,
|
||||
#[doc = "Interrupt Source: ADC14MEM3 interrupt flag; Interrupt Flag: ADC14IFG3"]
|
||||
ADC14IV_18,
|
||||
#[doc = "Interrupt Source: ADC14MEM4 interrupt flag; Interrupt Flag: ADC14IFG4"]
|
||||
ADC14IV_20,
|
||||
#[doc = "Interrupt Source: ADC14MEM5 interrupt flag; Interrupt Flag: ADC14IFG5"]
|
||||
ADC14IV_22,
|
||||
#[doc = "Interrupt Source: ADC14MEM6 interrupt flag; Interrupt Flag: ADC14IFG6"]
|
||||
ADC14IV_24,
|
||||
#[doc = "Interrupt Source: ADC14MEM7 interrupt flag; Interrupt Flag: ADC14IFG7"]
|
||||
ADC14IV_26,
|
||||
#[doc = "Interrupt Source: ADC14MEM8 interrupt flag; Interrupt Flag: ADC14IFG8"]
|
||||
ADC14IV_28,
|
||||
#[doc = "Interrupt Source: ADC14MEM9 interrupt flag; Interrupt Flag: ADC14IFG9"]
|
||||
ADC14IV_30,
|
||||
#[doc = "Interrupt Source: ADC14MEM10 interrupt flag; Interrupt Flag: ADC14IFG10"]
|
||||
ADC14IV_32,
|
||||
#[doc = "Interrupt Source: ADC14MEM11 interrupt flag; Interrupt Flag: ADC14IFG11"]
|
||||
ADC14IV_34,
|
||||
#[doc = "Interrupt Source: ADC14MEM12 interrupt flag; Interrupt Flag: ADC14IFG12"]
|
||||
ADC14IV_36,
|
||||
#[doc = "Interrupt Source: ADC14MEM13 interrupt flag; Interrupt Flag: ADC14IFG13"]
|
||||
ADC14IV_38,
|
||||
#[doc = "Interrupt Source: ADC14MEM14 interrupt flag; Interrupt Flag: ADC14IFG14"]
|
||||
ADC14IV_40,
|
||||
#[doc = "Interrupt Source: ADC14MEM15 interrupt flag; Interrupt Flag: ADC14IFG15"]
|
||||
ADC14IV_42,
|
||||
#[doc = "Interrupt Source: ADC14MEM16 interrupt flag; Interrupt Flag: ADC14IFG16"]
|
||||
ADC14IV_44,
|
||||
#[doc = "Interrupt Source: ADC14MEM17 interrupt flag; Interrupt Flag: ADC14IFG17"]
|
||||
ADC14IV_46,
|
||||
#[doc = "Interrupt Source: ADC14MEM18 interrupt flag; Interrupt Flag: ADC14IFG18"]
|
||||
ADC14IV_48,
|
||||
#[doc = "Interrupt Source: ADC14MEM19 interrupt flag; Interrupt Flag: ADC14IFG19"]
|
||||
ADC14IV_50,
|
||||
#[doc = "Interrupt Source: ADC14MEM20 interrupt flag; Interrupt Flag: ADC14IFG20"]
|
||||
ADC14IV_52,
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
ADC14IV_54,
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
ADC14IV_56,
|
||||
#[doc = "Interrupt Source: ADC14MEM23 interrupt flag; Interrupt Flag: ADC14IFG23"]
|
||||
ADC14IV_58,
|
||||
#[doc = "Interrupt Source: ADC14MEM24 interrupt flag; Interrupt Flag: ADC14IFG24"]
|
||||
ADC14IV_60,
|
||||
#[doc = "Interrupt Source: ADC14MEM25 interrupt flag; Interrupt Flag: ADC14IFG25"]
|
||||
ADC14IV_62,
|
||||
#[doc = "Interrupt Source: ADC14MEM26 interrupt flag; Interrupt Flag: ADC14IFG26"]
|
||||
ADC14IV_64,
|
||||
#[doc = "Interrupt Source: ADC14MEM27 interrupt flag; Interrupt Flag: ADC14IFG27"]
|
||||
ADC14IV_66,
|
||||
#[doc = "Interrupt Source: ADC14MEM28 interrupt flag; Interrupt Flag: ADC14IFG28"]
|
||||
ADC14IV_68,
|
||||
#[doc = "Interrupt Source: ADC14MEM29 interrupt flag; Interrupt Flag: ADC14IFG29"]
|
||||
ADC14IV_70,
|
||||
#[doc = "Interrupt Source: ADC14MEM30 interrupt flag; Interrupt Flag: ADC14IFG30"]
|
||||
ADC14IV_72,
|
||||
#[doc = "Interrupt Source: ADC14MEM31 interrupt flag; Interrupt Flag: ADC14IFG31"]
|
||||
ADC14IV_74,
|
||||
#[doc = "Interrupt Source: ADC14RDYIFG interrupt flag; Interrupt Flag: ADC14RDYIFG; Interrupt Priority: Lowest"]
|
||||
ADC14IV_76,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u32),
|
||||
}
|
||||
impl ADC14IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
match *self {
|
||||
ADC14IVR::ADC14IV_0 => 0,
|
||||
ADC14IVR::ADC14IV_2 => 2,
|
||||
ADC14IVR::ADC14IV_4 => 4,
|
||||
ADC14IVR::ADC14IV_6 => 6,
|
||||
ADC14IVR::ADC14IV_8 => 8,
|
||||
ADC14IVR::ADC14IV_10 => 10,
|
||||
ADC14IVR::ADC14IV_12 => 12,
|
||||
ADC14IVR::ADC14IV_14 => 14,
|
||||
ADC14IVR::ADC14IV_16 => 16,
|
||||
ADC14IVR::ADC14IV_18 => 18,
|
||||
ADC14IVR::ADC14IV_20 => 20,
|
||||
ADC14IVR::ADC14IV_22 => 22,
|
||||
ADC14IVR::ADC14IV_24 => 24,
|
||||
ADC14IVR::ADC14IV_26 => 26,
|
||||
ADC14IVR::ADC14IV_28 => 28,
|
||||
ADC14IVR::ADC14IV_30 => 30,
|
||||
ADC14IVR::ADC14IV_32 => 32,
|
||||
ADC14IVR::ADC14IV_34 => 34,
|
||||
ADC14IVR::ADC14IV_36 => 36,
|
||||
ADC14IVR::ADC14IV_38 => 38,
|
||||
ADC14IVR::ADC14IV_40 => 40,
|
||||
ADC14IVR::ADC14IV_42 => 42,
|
||||
ADC14IVR::ADC14IV_44 => 44,
|
||||
ADC14IVR::ADC14IV_46 => 46,
|
||||
ADC14IVR::ADC14IV_48 => 48,
|
||||
ADC14IVR::ADC14IV_50 => 50,
|
||||
ADC14IVR::ADC14IV_52 => 52,
|
||||
ADC14IVR::ADC14IV_54 => 54,
|
||||
ADC14IVR::ADC14IV_56 => 56,
|
||||
ADC14IVR::ADC14IV_58 => 58,
|
||||
ADC14IVR::ADC14IV_60 => 60,
|
||||
ADC14IVR::ADC14IV_62 => 62,
|
||||
ADC14IVR::ADC14IV_64 => 64,
|
||||
ADC14IVR::ADC14IV_66 => 66,
|
||||
ADC14IVR::ADC14IV_68 => 68,
|
||||
ADC14IVR::ADC14IV_70 => 70,
|
||||
ADC14IVR::ADC14IV_72 => 72,
|
||||
ADC14IVR::ADC14IV_74 => 74,
|
||||
ADC14IVR::ADC14IV_76 => 76,
|
||||
ADC14IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u32) -> ADC14IVR {
|
||||
match value {
|
||||
0 => ADC14IVR::ADC14IV_0,
|
||||
2 => ADC14IVR::ADC14IV_2,
|
||||
4 => ADC14IVR::ADC14IV_4,
|
||||
6 => ADC14IVR::ADC14IV_6,
|
||||
8 => ADC14IVR::ADC14IV_8,
|
||||
10 => ADC14IVR::ADC14IV_10,
|
||||
12 => ADC14IVR::ADC14IV_12,
|
||||
14 => ADC14IVR::ADC14IV_14,
|
||||
16 => ADC14IVR::ADC14IV_16,
|
||||
18 => ADC14IVR::ADC14IV_18,
|
||||
20 => ADC14IVR::ADC14IV_20,
|
||||
22 => ADC14IVR::ADC14IV_22,
|
||||
24 => ADC14IVR::ADC14IV_24,
|
||||
26 => ADC14IVR::ADC14IV_26,
|
||||
28 => ADC14IVR::ADC14IV_28,
|
||||
30 => ADC14IVR::ADC14IV_30,
|
||||
32 => ADC14IVR::ADC14IV_32,
|
||||
34 => ADC14IVR::ADC14IV_34,
|
||||
36 => ADC14IVR::ADC14IV_36,
|
||||
38 => ADC14IVR::ADC14IV_38,
|
||||
40 => ADC14IVR::ADC14IV_40,
|
||||
42 => ADC14IVR::ADC14IV_42,
|
||||
44 => ADC14IVR::ADC14IV_44,
|
||||
46 => ADC14IVR::ADC14IV_46,
|
||||
48 => ADC14IVR::ADC14IV_48,
|
||||
50 => ADC14IVR::ADC14IV_50,
|
||||
52 => ADC14IVR::ADC14IV_52,
|
||||
54 => ADC14IVR::ADC14IV_54,
|
||||
56 => ADC14IVR::ADC14IV_56,
|
||||
58 => ADC14IVR::ADC14IV_58,
|
||||
60 => ADC14IVR::ADC14IV_60,
|
||||
62 => ADC14IVR::ADC14IV_62,
|
||||
64 => ADC14IVR::ADC14IV_64,
|
||||
66 => ADC14IVR::ADC14IV_66,
|
||||
68 => ADC14IVR::ADC14IV_68,
|
||||
70 => ADC14IVR::ADC14IV_70,
|
||||
72 => ADC14IVR::ADC14IV_72,
|
||||
74 => ADC14IVR::ADC14IV_74,
|
||||
76 => ADC14IVR::ADC14IV_76,
|
||||
i => ADC14IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_0(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_2(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_4(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_6(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_8(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_10(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_12(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_14(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_16(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_16
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_18`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_18(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_18
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_20`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_20(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_20
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_22`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_22(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_22
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_24`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_24(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_24
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_26`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_26(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_26
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_28`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_28(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_28
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_30`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_30(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_30
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_32`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_32(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_32
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_34`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_34(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_34
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_36`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_36(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_36
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_38`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_38(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_38
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_40`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_40(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_40
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_42`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_42(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_42
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_44`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_44(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_44
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_46`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_46(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_46
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_48`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_48(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_48
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_50`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_50(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_50
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_52`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_52(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_52
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_54`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_54(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_54
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_56`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_56(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_56
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_58`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_58(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_58
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_60`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_60(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_60
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_62`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_62(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_62
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_64`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_64(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_64
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_66`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_66(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_66
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_68`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_68(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_68
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_70`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_70(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_70
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_72`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_72(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_72
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_74`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_74(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_74
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ADC14IV_76`"]
|
||||
#[inline]
|
||||
pub fn is_adc14iv_76(&self) -> bool {
|
||||
*self == ADC14IVR::ADC14IV_76
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `ADC14IV`"]
|
||||
pub enum ADC14IVW {
|
||||
#[doc = "No interrupt pending"]
|
||||
ADC14IV_0,
|
||||
#[doc = "Interrupt Source: ADC14MEMx overflow; Interrupt Flag: ADC14OVIFG; Interrupt Priority: Highest"]
|
||||
ADC14IV_2,
|
||||
#[doc = "Interrupt Source: Conversion time overflow; Interrupt Flag: ADC14TOVIFG"]
|
||||
ADC14IV_4,
|
||||
#[doc = "Interrupt Source: ADC14 window high interrupt flag; Interrupt Flag: ADC14HIIFG"]
|
||||
ADC14IV_6,
|
||||
#[doc = "Interrupt Source: ADC14 window low interrupt flag; Interrupt Flag: ADC14LOIFG"]
|
||||
ADC14IV_8,
|
||||
#[doc = "Interrupt Source: ADC14 in-window interrupt flag; Interrupt Flag: ADC14INIFG"]
|
||||
ADC14IV_10,
|
||||
#[doc = "Interrupt Source: ADC14MEM0 interrupt flag; Interrupt Flag: ADC14IFG0"]
|
||||
ADC14IV_12,
|
||||
#[doc = "Interrupt Source: ADC14MEM1 interrupt flag; Interrupt Flag: ADC14IFG1"]
|
||||
ADC14IV_14,
|
||||
#[doc = "Interrupt Source: ADC14MEM2 interrupt flag; Interrupt Flag: ADC14IFG2"]
|
||||
ADC14IV_16,
|
||||
#[doc = "Interrupt Source: ADC14MEM3 interrupt flag; Interrupt Flag: ADC14IFG3"]
|
||||
ADC14IV_18,
|
||||
#[doc = "Interrupt Source: ADC14MEM4 interrupt flag; Interrupt Flag: ADC14IFG4"]
|
||||
ADC14IV_20,
|
||||
#[doc = "Interrupt Source: ADC14MEM5 interrupt flag; Interrupt Flag: ADC14IFG5"]
|
||||
ADC14IV_22,
|
||||
#[doc = "Interrupt Source: ADC14MEM6 interrupt flag; Interrupt Flag: ADC14IFG6"]
|
||||
ADC14IV_24,
|
||||
#[doc = "Interrupt Source: ADC14MEM7 interrupt flag; Interrupt Flag: ADC14IFG7"]
|
||||
ADC14IV_26,
|
||||
#[doc = "Interrupt Source: ADC14MEM8 interrupt flag; Interrupt Flag: ADC14IFG8"]
|
||||
ADC14IV_28,
|
||||
#[doc = "Interrupt Source: ADC14MEM9 interrupt flag; Interrupt Flag: ADC14IFG9"]
|
||||
ADC14IV_30,
|
||||
#[doc = "Interrupt Source: ADC14MEM10 interrupt flag; Interrupt Flag: ADC14IFG10"]
|
||||
ADC14IV_32,
|
||||
#[doc = "Interrupt Source: ADC14MEM11 interrupt flag; Interrupt Flag: ADC14IFG11"]
|
||||
ADC14IV_34,
|
||||
#[doc = "Interrupt Source: ADC14MEM12 interrupt flag; Interrupt Flag: ADC14IFG12"]
|
||||
ADC14IV_36,
|
||||
#[doc = "Interrupt Source: ADC14MEM13 interrupt flag; Interrupt Flag: ADC14IFG13"]
|
||||
ADC14IV_38,
|
||||
#[doc = "Interrupt Source: ADC14MEM14 interrupt flag; Interrupt Flag: ADC14IFG14"]
|
||||
ADC14IV_40,
|
||||
#[doc = "Interrupt Source: ADC14MEM15 interrupt flag; Interrupt Flag: ADC14IFG15"]
|
||||
ADC14IV_42,
|
||||
#[doc = "Interrupt Source: ADC14MEM16 interrupt flag; Interrupt Flag: ADC14IFG16"]
|
||||
ADC14IV_44,
|
||||
#[doc = "Interrupt Source: ADC14MEM17 interrupt flag; Interrupt Flag: ADC14IFG17"]
|
||||
ADC14IV_46,
|
||||
#[doc = "Interrupt Source: ADC14MEM18 interrupt flag; Interrupt Flag: ADC14IFG18"]
|
||||
ADC14IV_48,
|
||||
#[doc = "Interrupt Source: ADC14MEM19 interrupt flag; Interrupt Flag: ADC14IFG19"]
|
||||
ADC14IV_50,
|
||||
#[doc = "Interrupt Source: ADC14MEM20 interrupt flag; Interrupt Flag: ADC14IFG20"]
|
||||
ADC14IV_52,
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
ADC14IV_54,
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
ADC14IV_56,
|
||||
#[doc = "Interrupt Source: ADC14MEM23 interrupt flag; Interrupt Flag: ADC14IFG23"]
|
||||
ADC14IV_58,
|
||||
#[doc = "Interrupt Source: ADC14MEM24 interrupt flag; Interrupt Flag: ADC14IFG24"]
|
||||
ADC14IV_60,
|
||||
#[doc = "Interrupt Source: ADC14MEM25 interrupt flag; Interrupt Flag: ADC14IFG25"]
|
||||
ADC14IV_62,
|
||||
#[doc = "Interrupt Source: ADC14MEM26 interrupt flag; Interrupt Flag: ADC14IFG26"]
|
||||
ADC14IV_64,
|
||||
#[doc = "Interrupt Source: ADC14MEM27 interrupt flag; Interrupt Flag: ADC14IFG27"]
|
||||
ADC14IV_66,
|
||||
#[doc = "Interrupt Source: ADC14MEM28 interrupt flag; Interrupt Flag: ADC14IFG28"]
|
||||
ADC14IV_68,
|
||||
#[doc = "Interrupt Source: ADC14MEM29 interrupt flag; Interrupt Flag: ADC14IFG29"]
|
||||
ADC14IV_70,
|
||||
#[doc = "Interrupt Source: ADC14MEM30 interrupt flag; Interrupt Flag: ADC14IFG30"]
|
||||
ADC14IV_72,
|
||||
#[doc = "Interrupt Source: ADC14MEM31 interrupt flag; Interrupt Flag: ADC14IFG31"]
|
||||
ADC14IV_74,
|
||||
#[doc = "Interrupt Source: ADC14RDYIFG interrupt flag; Interrupt Flag: ADC14RDYIFG; Interrupt Priority: Lowest"]
|
||||
ADC14IV_76,
|
||||
}
|
||||
impl ADC14IVW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u32 {
|
||||
match *self {
|
||||
ADC14IVW::ADC14IV_0 => 0,
|
||||
ADC14IVW::ADC14IV_2 => 2,
|
||||
ADC14IVW::ADC14IV_4 => 4,
|
||||
ADC14IVW::ADC14IV_6 => 6,
|
||||
ADC14IVW::ADC14IV_8 => 8,
|
||||
ADC14IVW::ADC14IV_10 => 10,
|
||||
ADC14IVW::ADC14IV_12 => 12,
|
||||
ADC14IVW::ADC14IV_14 => 14,
|
||||
ADC14IVW::ADC14IV_16 => 16,
|
||||
ADC14IVW::ADC14IV_18 => 18,
|
||||
ADC14IVW::ADC14IV_20 => 20,
|
||||
ADC14IVW::ADC14IV_22 => 22,
|
||||
ADC14IVW::ADC14IV_24 => 24,
|
||||
ADC14IVW::ADC14IV_26 => 26,
|
||||
ADC14IVW::ADC14IV_28 => 28,
|
||||
ADC14IVW::ADC14IV_30 => 30,
|
||||
ADC14IVW::ADC14IV_32 => 32,
|
||||
ADC14IVW::ADC14IV_34 => 34,
|
||||
ADC14IVW::ADC14IV_36 => 36,
|
||||
ADC14IVW::ADC14IV_38 => 38,
|
||||
ADC14IVW::ADC14IV_40 => 40,
|
||||
ADC14IVW::ADC14IV_42 => 42,
|
||||
ADC14IVW::ADC14IV_44 => 44,
|
||||
ADC14IVW::ADC14IV_46 => 46,
|
||||
ADC14IVW::ADC14IV_48 => 48,
|
||||
ADC14IVW::ADC14IV_50 => 50,
|
||||
ADC14IVW::ADC14IV_52 => 52,
|
||||
ADC14IVW::ADC14IV_54 => 54,
|
||||
ADC14IVW::ADC14IV_56 => 56,
|
||||
ADC14IVW::ADC14IV_58 => 58,
|
||||
ADC14IVW::ADC14IV_60 => 60,
|
||||
ADC14IVW::ADC14IV_62 => 62,
|
||||
ADC14IVW::ADC14IV_64 => 64,
|
||||
ADC14IVW::ADC14IV_66 => 66,
|
||||
ADC14IVW::ADC14IV_68 => 68,
|
||||
ADC14IVW::ADC14IV_70 => 70,
|
||||
ADC14IVW::ADC14IV_72 => 72,
|
||||
ADC14IVW::ADC14IV_74 => 74,
|
||||
ADC14IVW::ADC14IV_76 => 76,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14IVW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14IVW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: ADC14IVW) -> &'a mut W {
|
||||
unsafe { self.bits(variant._bits()) }
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn adc14iv_0(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_0)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEMx overflow; Interrupt Flag: ADC14OVIFG; Interrupt Priority: Highest"]
|
||||
#[inline]
|
||||
pub fn adc14iv_2(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_2)
|
||||
}
|
||||
#[doc = "Interrupt Source: Conversion time overflow; Interrupt Flag: ADC14TOVIFG"]
|
||||
#[inline]
|
||||
pub fn adc14iv_4(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_4)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14 window high interrupt flag; Interrupt Flag: ADC14HIIFG"]
|
||||
#[inline]
|
||||
pub fn adc14iv_6(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_6)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14 window low interrupt flag; Interrupt Flag: ADC14LOIFG"]
|
||||
#[inline]
|
||||
pub fn adc14iv_8(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_8)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14 in-window interrupt flag; Interrupt Flag: ADC14INIFG"]
|
||||
#[inline]
|
||||
pub fn adc14iv_10(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_10)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM0 interrupt flag; Interrupt Flag: ADC14IFG0"]
|
||||
#[inline]
|
||||
pub fn adc14iv_12(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_12)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM1 interrupt flag; Interrupt Flag: ADC14IFG1"]
|
||||
#[inline]
|
||||
pub fn adc14iv_14(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_14)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM2 interrupt flag; Interrupt Flag: ADC14IFG2"]
|
||||
#[inline]
|
||||
pub fn adc14iv_16(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_16)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM3 interrupt flag; Interrupt Flag: ADC14IFG3"]
|
||||
#[inline]
|
||||
pub fn adc14iv_18(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_18)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM4 interrupt flag; Interrupt Flag: ADC14IFG4"]
|
||||
#[inline]
|
||||
pub fn adc14iv_20(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_20)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM5 interrupt flag; Interrupt Flag: ADC14IFG5"]
|
||||
#[inline]
|
||||
pub fn adc14iv_22(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_22)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM6 interrupt flag; Interrupt Flag: ADC14IFG6"]
|
||||
#[inline]
|
||||
pub fn adc14iv_24(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_24)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM7 interrupt flag; Interrupt Flag: ADC14IFG7"]
|
||||
#[inline]
|
||||
pub fn adc14iv_26(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_26)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM8 interrupt flag; Interrupt Flag: ADC14IFG8"]
|
||||
#[inline]
|
||||
pub fn adc14iv_28(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_28)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM9 interrupt flag; Interrupt Flag: ADC14IFG9"]
|
||||
#[inline]
|
||||
pub fn adc14iv_30(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_30)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM10 interrupt flag; Interrupt Flag: ADC14IFG10"]
|
||||
#[inline]
|
||||
pub fn adc14iv_32(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_32)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM11 interrupt flag; Interrupt Flag: ADC14IFG11"]
|
||||
#[inline]
|
||||
pub fn adc14iv_34(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_34)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM12 interrupt flag; Interrupt Flag: ADC14IFG12"]
|
||||
#[inline]
|
||||
pub fn adc14iv_36(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_36)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM13 interrupt flag; Interrupt Flag: ADC14IFG13"]
|
||||
#[inline]
|
||||
pub fn adc14iv_38(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_38)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM14 interrupt flag; Interrupt Flag: ADC14IFG14"]
|
||||
#[inline]
|
||||
pub fn adc14iv_40(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_40)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM15 interrupt flag; Interrupt Flag: ADC14IFG15"]
|
||||
#[inline]
|
||||
pub fn adc14iv_42(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_42)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM16 interrupt flag; Interrupt Flag: ADC14IFG16"]
|
||||
#[inline]
|
||||
pub fn adc14iv_44(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_44)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM17 interrupt flag; Interrupt Flag: ADC14IFG17"]
|
||||
#[inline]
|
||||
pub fn adc14iv_46(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_46)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM18 interrupt flag; Interrupt Flag: ADC14IFG18"]
|
||||
#[inline]
|
||||
pub fn adc14iv_48(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_48)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM19 interrupt flag; Interrupt Flag: ADC14IFG19"]
|
||||
#[inline]
|
||||
pub fn adc14iv_50(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_50)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM20 interrupt flag; Interrupt Flag: ADC14IFG20"]
|
||||
#[inline]
|
||||
pub fn adc14iv_52(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_52)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
#[inline]
|
||||
pub fn adc14iv_54(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_54)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22"]
|
||||
#[inline]
|
||||
pub fn adc14iv_56(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_56)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM23 interrupt flag; Interrupt Flag: ADC14IFG23"]
|
||||
#[inline]
|
||||
pub fn adc14iv_58(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_58)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM24 interrupt flag; Interrupt Flag: ADC14IFG24"]
|
||||
#[inline]
|
||||
pub fn adc14iv_60(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_60)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM25 interrupt flag; Interrupt Flag: ADC14IFG25"]
|
||||
#[inline]
|
||||
pub fn adc14iv_62(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_62)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM26 interrupt flag; Interrupt Flag: ADC14IFG26"]
|
||||
#[inline]
|
||||
pub fn adc14iv_64(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_64)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM27 interrupt flag; Interrupt Flag: ADC14IFG27"]
|
||||
#[inline]
|
||||
pub fn adc14iv_66(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_66)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM28 interrupt flag; Interrupt Flag: ADC14IFG28"]
|
||||
#[inline]
|
||||
pub fn adc14iv_68(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_68)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM29 interrupt flag; Interrupt Flag: ADC14IFG29"]
|
||||
#[inline]
|
||||
pub fn adc14iv_70(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_70)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM30 interrupt flag; Interrupt Flag: ADC14IFG30"]
|
||||
#[inline]
|
||||
pub fn adc14iv_72(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_72)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14MEM31 interrupt flag; Interrupt Flag: ADC14IFG31"]
|
||||
#[inline]
|
||||
pub fn adc14iv_74(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_74)
|
||||
}
|
||||
#[doc = "Interrupt Source: ADC14RDYIFG interrupt flag; Interrupt Flag: ADC14RDYIFG; Interrupt Priority: Lowest"]
|
||||
#[inline]
|
||||
pub fn adc14iv_76(self) -> &'a mut W {
|
||||
self.variant(ADC14IVW::ADC14IV_76)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:31 - ADC14 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn adc14iv(&self) -> ADC14IVR {
|
||||
ADC14IVR::_from({
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u32
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:31 - ADC14 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn adc14iv(&mut self) -> _ADC14IVW {
|
||||
_ADC14IVW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14LO0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct ADC14LO0R {
|
||||
bits: u16,
|
||||
}
|
||||
impl ADC14LO0R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14LO0W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14LO0W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Low threshold 0"]
|
||||
#[inline]
|
||||
pub fn adc14lo0(&self) -> ADC14LO0R {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
ADC14LO0R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Low threshold 0"]
|
||||
#[inline]
|
||||
pub fn adc14lo0(&mut self) -> _ADC14LO0W {
|
||||
_ADC14LO0W { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14LO1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct ADC14LO1R {
|
||||
bits: u16,
|
||||
}
|
||||
impl ADC14LO1R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _ADC14LO1W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _ADC14LO1W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Low threshold 1"]
|
||||
#[inline]
|
||||
pub fn adc14lo1(&self) -> ADC14LO1R {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
ADC14LO1R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Low threshold 1"]
|
||||
#[inline]
|
||||
pub fn adc14lo1(&mut self) -> _ADC14LO1W {
|
||||
_ADC14LO1W { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::ADC14MEM {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CONVERSION_RESULTSR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CONVERSION_RESULTSR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CONVERSION_RESULTSW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CONVERSION_RESULTSW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Conversion Result"]
|
||||
#[inline]
|
||||
pub fn conversion_results(&self) -> CONVERSION_RESULTSR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
CONVERSION_RESULTSR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Conversion Result"]
|
||||
#[inline]
|
||||
pub fn conversion_results(&mut self) -> _CONVERSION_RESULTSW {
|
||||
_CONVERSION_RESULTSW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - AES Accelerator Control Register 0"]
|
||||
pub aesactl0: AESACTL0,
|
||||
#[doc = "0x02 - AES Accelerator Control Register 1"]
|
||||
pub aesactl1: AESACTL1,
|
||||
#[doc = "0x04 - AES Accelerator Status Register"]
|
||||
pub aesastat: AESASTAT,
|
||||
#[doc = "0x06 - AES Accelerator Key Register"]
|
||||
pub aesakey: AESAKEY,
|
||||
#[doc = "0x08 - AES Accelerator Data In Register"]
|
||||
pub aesadin: AESADIN,
|
||||
#[doc = "0x0a - AES Accelerator Data Out Register"]
|
||||
pub aesadout: AESADOUT,
|
||||
#[doc = "0x0c - AES Accelerator XORed Data In Register"]
|
||||
pub aesaxdin: AESAXDIN,
|
||||
#[doc = "0x0e - AES Accelerator XORed Data In Register"]
|
||||
pub aesaxin: AESAXIN,
|
||||
}
|
||||
#[doc = "AES Accelerator Control Register 0"]
|
||||
pub struct AESACTL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Control Register 0"]
|
||||
pub mod aesactl0;
|
||||
#[doc = "AES Accelerator Control Register 1"]
|
||||
pub struct AESACTL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Control Register 1"]
|
||||
pub mod aesactl1;
|
||||
#[doc = "AES Accelerator Status Register"]
|
||||
pub struct AESASTAT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Status Register"]
|
||||
pub mod aesastat;
|
||||
#[doc = "AES Accelerator Key Register"]
|
||||
pub struct AESAKEY {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Key Register"]
|
||||
pub mod aesakey;
|
||||
#[doc = "AES Accelerator Data In Register"]
|
||||
pub struct AESADIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Data In Register"]
|
||||
pub mod aesadin;
|
||||
#[doc = "AES Accelerator Data Out Register"]
|
||||
pub struct AESADOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator Data Out Register"]
|
||||
pub mod aesadout;
|
||||
#[doc = "AES Accelerator XORed Data In Register"]
|
||||
pub struct AESAXDIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator XORed Data In Register"]
|
||||
pub mod aesaxdin;
|
||||
#[doc = "AES Accelerator XORed Data In Register"]
|
||||
pub struct AESAXIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "AES Accelerator XORed Data In Register"]
|
||||
pub mod aesaxin;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESACTL1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct AESBLKCNTXR {
|
||||
bits: u8,
|
||||
}
|
||||
impl AESBLKCNTXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESBLKCNTXW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESBLKCNTXW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Cipher Block Counter"]
|
||||
#[inline]
|
||||
pub fn aesblkcntx(&self) -> AESBLKCNTXR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
AESBLKCNTXR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Cipher Block Counter"]
|
||||
#[inline]
|
||||
pub fn aesblkcntx(&mut self) -> _AESBLKCNTXW {
|
||||
_AESBLKCNTXW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESADIN {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESDIN0XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESDIN0XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESDIN1XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESDIN1XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - AES data in byte n when AESADIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesdin0x(&mut self) -> _AESDIN0XW {
|
||||
_AESDIN0XW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - AES data in byte n+1 when AESADIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesdin1x(&mut self) -> _AESDIN1XW {
|
||||
_AESDIN1XW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESADOUT {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESDOUT0XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESDOUT0XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESDOUT1XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESDOUT1XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - AES data out byte n when AESADOUT is read as half-word"]
|
||||
#[inline]
|
||||
pub fn aesdout0x(&mut self) -> _AESDOUT0XW {
|
||||
_AESDOUT0XW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - AES data out byte n+1 when AESADOUT is read as half-word"]
|
||||
#[inline]
|
||||
pub fn aesdout1x(&mut self) -> _AESDOUT1XW {
|
||||
_AESDOUT1XW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESAKEY {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESKEY0XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESKEY0XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESKEY1XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESKEY1XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - AES key byte n when AESAKEY is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aeskey0x(&mut self) -> _AESKEY0XW {
|
||||
_AESKEY0XW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - AES key byte n+1 when AESAKEY is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aeskey1x(&mut self) -> _AESKEY1XW {
|
||||
_AESKEY1XW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,540 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESASTAT {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `AESBUSY`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AESBUSYR {
|
||||
#[doc = "Not busy"]
|
||||
AESBUSY_0,
|
||||
#[doc = "Busy"]
|
||||
AESBUSY_1,
|
||||
}
|
||||
impl AESBUSYR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
AESBUSYR::AESBUSY_0 => false,
|
||||
AESBUSYR::AESBUSY_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> AESBUSYR {
|
||||
match value {
|
||||
false => AESBUSYR::AESBUSY_0,
|
||||
true => AESBUSYR::AESBUSY_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESBUSY_0`"]
|
||||
#[inline]
|
||||
pub fn is_aesbusy_0(&self) -> bool {
|
||||
*self == AESBUSYR::AESBUSY_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESBUSY_1`"]
|
||||
#[inline]
|
||||
pub fn is_aesbusy_1(&self) -> bool {
|
||||
*self == AESBUSYR::AESBUSY_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `AESKEYWR`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AESKEYWRR {
|
||||
#[doc = "Not all bytes written"]
|
||||
AESKEYWR_0,
|
||||
#[doc = "All bytes written"]
|
||||
AESKEYWR_1,
|
||||
}
|
||||
impl AESKEYWRR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
AESKEYWRR::AESKEYWR_0 => false,
|
||||
AESKEYWRR::AESKEYWR_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> AESKEYWRR {
|
||||
match value {
|
||||
false => AESKEYWRR::AESKEYWR_0,
|
||||
true => AESKEYWRR::AESKEYWR_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESKEYWR_0`"]
|
||||
#[inline]
|
||||
pub fn is_aeskeywr_0(&self) -> bool {
|
||||
*self == AESKEYWRR::AESKEYWR_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESKEYWR_1`"]
|
||||
#[inline]
|
||||
pub fn is_aeskeywr_1(&self) -> bool {
|
||||
*self == AESKEYWRR::AESKEYWR_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `AESDINWR`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AESDINWRR {
|
||||
#[doc = "Not all bytes written"]
|
||||
AESDINWR_0,
|
||||
#[doc = "All bytes written"]
|
||||
AESDINWR_1,
|
||||
}
|
||||
impl AESDINWRR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
AESDINWRR::AESDINWR_0 => false,
|
||||
AESDINWRR::AESDINWR_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> AESDINWRR {
|
||||
match value {
|
||||
false => AESDINWRR::AESDINWR_0,
|
||||
true => AESDINWRR::AESDINWR_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESDINWR_0`"]
|
||||
#[inline]
|
||||
pub fn is_aesdinwr_0(&self) -> bool {
|
||||
*self == AESDINWRR::AESDINWR_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESDINWR_1`"]
|
||||
#[inline]
|
||||
pub fn is_aesdinwr_1(&self) -> bool {
|
||||
*self == AESDINWRR::AESDINWR_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `AESDOUTRD`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AESDOUTRDR {
|
||||
#[doc = "Not all bytes read"]
|
||||
AESDOUTRD_0,
|
||||
#[doc = "All bytes read"]
|
||||
AESDOUTRD_1,
|
||||
}
|
||||
impl AESDOUTRDR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
AESDOUTRDR::AESDOUTRD_0 => false,
|
||||
AESDOUTRDR::AESDOUTRD_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> AESDOUTRDR {
|
||||
match value {
|
||||
false => AESDOUTRDR::AESDOUTRD_0,
|
||||
true => AESDOUTRDR::AESDOUTRD_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESDOUTRD_0`"]
|
||||
#[inline]
|
||||
pub fn is_aesdoutrd_0(&self) -> bool {
|
||||
*self == AESDOUTRDR::AESDOUTRD_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `AESDOUTRD_1`"]
|
||||
#[inline]
|
||||
pub fn is_aesdoutrd_1(&self) -> bool {
|
||||
*self == AESDOUTRDR::AESDOUTRD_1
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct AESKEYCNTXR {
|
||||
bits: u8,
|
||||
}
|
||||
impl AESKEYCNTXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct AESDINCNTXR {
|
||||
bits: u8,
|
||||
}
|
||||
impl AESDINCNTXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct AESDOUTCNTXR {
|
||||
bits: u8,
|
||||
}
|
||||
impl AESDOUTCNTXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `AESBUSY`"]
|
||||
pub enum AESBUSYW {
|
||||
#[doc = "Not busy"]
|
||||
AESBUSY_0,
|
||||
#[doc = "Busy"]
|
||||
AESBUSY_1,
|
||||
}
|
||||
impl AESBUSYW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
AESBUSYW::AESBUSY_0 => false,
|
||||
AESBUSYW::AESBUSY_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESBUSYW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESBUSYW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: AESBUSYW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Not busy"]
|
||||
#[inline]
|
||||
pub fn aesbusy_0(self) -> &'a mut W {
|
||||
self.variant(AESBUSYW::AESBUSY_0)
|
||||
}
|
||||
#[doc = "Busy"]
|
||||
#[inline]
|
||||
pub fn aesbusy_1(self) -> &'a mut W {
|
||||
self.variant(AESBUSYW::AESBUSY_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `AESKEYWR`"]
|
||||
pub enum AESKEYWRW {
|
||||
#[doc = "Not all bytes written"]
|
||||
AESKEYWR_0,
|
||||
#[doc = "All bytes written"]
|
||||
AESKEYWR_1,
|
||||
}
|
||||
impl AESKEYWRW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
AESKEYWRW::AESKEYWR_0 => false,
|
||||
AESKEYWRW::AESKEYWR_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESKEYWRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESKEYWRW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: AESKEYWRW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Not all bytes written"]
|
||||
#[inline]
|
||||
pub fn aeskeywr_0(self) -> &'a mut W {
|
||||
self.variant(AESKEYWRW::AESKEYWR_0)
|
||||
}
|
||||
#[doc = "All bytes written"]
|
||||
#[inline]
|
||||
pub fn aeskeywr_1(self) -> &'a mut W {
|
||||
self.variant(AESKEYWRW::AESKEYWR_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `AESDINWR`"]
|
||||
pub enum AESDINWRW {
|
||||
#[doc = "Not all bytes written"]
|
||||
AESDINWR_0,
|
||||
#[doc = "All bytes written"]
|
||||
AESDINWR_1,
|
||||
}
|
||||
impl AESDINWRW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
AESDINWRW::AESDINWR_0 => false,
|
||||
AESDINWRW::AESDINWR_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESDINWRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESDINWRW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: AESDINWRW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Not all bytes written"]
|
||||
#[inline]
|
||||
pub fn aesdinwr_0(self) -> &'a mut W {
|
||||
self.variant(AESDINWRW::AESDINWR_0)
|
||||
}
|
||||
#[doc = "All bytes written"]
|
||||
#[inline]
|
||||
pub fn aesdinwr_1(self) -> &'a mut W {
|
||||
self.variant(AESDINWRW::AESDINWR_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 0 - AES accelerator module busy"]
|
||||
#[inline]
|
||||
pub fn aesbusy(&self) -> AESBUSYR {
|
||||
AESBUSYR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 1 - All 16 bytes written to AESAKEY"]
|
||||
#[inline]
|
||||
pub fn aeskeywr(&self) -> AESKEYWRR {
|
||||
AESKEYWRR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 2 - All 16 bytes written to AESADIN, AESAXDIN or AESAXIN"]
|
||||
#[inline]
|
||||
pub fn aesdinwr(&self) -> AESDINWRR {
|
||||
AESDINWRR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 3 - All 16 bytes read from AESADOUT"]
|
||||
#[inline]
|
||||
pub fn aesdoutrd(&self) -> AESDOUTRDR {
|
||||
AESDOUTRDR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 4:7 - Bytes written via AESAKEY for AESKLx=00, half-words written via AESAKEY"]
|
||||
#[inline]
|
||||
pub fn aeskeycntx(&self) -> AESKEYCNTXR {
|
||||
let bits = {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
AESKEYCNTXR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:11 - Bytes written via AESADIN, AESAXDIN or AESAXIN"]
|
||||
#[inline]
|
||||
pub fn aesdincntx(&self) -> AESDINCNTXR {
|
||||
let bits = {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
AESDINCNTXR { bits }
|
||||
}
|
||||
#[doc = "Bits 12:15 - Bytes read via AESADOUT"]
|
||||
#[inline]
|
||||
pub fn aesdoutcntx(&self) -> AESDOUTCNTXR {
|
||||
let bits = {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 12;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
AESDOUTCNTXR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 0 - AES accelerator module busy"]
|
||||
#[inline]
|
||||
pub fn aesbusy(&mut self) -> _AESBUSYW {
|
||||
_AESBUSYW { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - All 16 bytes written to AESAKEY"]
|
||||
#[inline]
|
||||
pub fn aeskeywr(&mut self) -> _AESKEYWRW {
|
||||
_AESKEYWRW { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - All 16 bytes written to AESADIN, AESAXDIN or AESAXIN"]
|
||||
#[inline]
|
||||
pub fn aesdinwr(&mut self) -> _AESDINWRW {
|
||||
_AESDINWRW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESAXDIN {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESXDIN0XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESXDIN0XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESXDIN1XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESXDIN1XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - AES data in byte n when AESAXDIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesxdin0x(&mut self) -> _AESXDIN0XW {
|
||||
_AESXDIN0XW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - AES data in byte n+1 when AESAXDIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesxdin1x(&mut self) -> _AESXDIN1XW {
|
||||
_AESXDIN1XW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::AESAXIN {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESXIN0XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESXIN0XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _AESXIN1XW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _AESXIN1XW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - AES data in byte n when AESAXIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesxin0x(&mut self) -> _AESXIN0XW {
|
||||
_AESXIN0XW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - AES data in byte n+1 when AESAXIN is written as half-word"]
|
||||
#[inline]
|
||||
pub fn aesxin1x(&mut self) -> _AESXIN1XW {
|
||||
_AESXIN1XW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
_reserved0: [u8; 14usize],
|
||||
#[doc = "0x0e - Capacitive Touch IO x Control Register"]
|
||||
pub captiox_ctl: CAPTIOXCTL,
|
||||
}
|
||||
#[doc = "Capacitive Touch IO x Control Register"]
|
||||
pub struct CAPTIOXCTL {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Capacitive Touch IO x Control Register"]
|
||||
pub mod captiox_ctl;
|
|
@ -0,0 +1,783 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CAPTIOXCTL {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOPISELx`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOPISELXR {
|
||||
#[doc = "Px.0"]
|
||||
CAPTIOPISELX_0,
|
||||
#[doc = "Px.1"]
|
||||
CAPTIOPISELX_1,
|
||||
#[doc = "Px.2"]
|
||||
CAPTIOPISELX_2,
|
||||
#[doc = "Px.3"]
|
||||
CAPTIOPISELX_3,
|
||||
#[doc = "Px.4"]
|
||||
CAPTIOPISELX_4,
|
||||
#[doc = "Px.5"]
|
||||
CAPTIOPISELX_5,
|
||||
#[doc = "Px.6"]
|
||||
CAPTIOPISELX_6,
|
||||
#[doc = "Px.7"]
|
||||
CAPTIOPISELX_7,
|
||||
}
|
||||
impl CAPTIOPISELXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPISELXR::CAPTIOPISELX_0 => 0,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_1 => 1,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_2 => 2,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_3 => 3,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_4 => 4,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_5 => 5,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_6 => 6,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_7 => 7,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CAPTIOPISELXR {
|
||||
match value {
|
||||
0 => CAPTIOPISELXR::CAPTIOPISELX_0,
|
||||
1 => CAPTIOPISELXR::CAPTIOPISELX_1,
|
||||
2 => CAPTIOPISELXR::CAPTIOPISELX_2,
|
||||
3 => CAPTIOPISELXR::CAPTIOPISELX_3,
|
||||
4 => CAPTIOPISELXR::CAPTIOPISELX_4,
|
||||
5 => CAPTIOPISELXR::CAPTIOPISELX_5,
|
||||
6 => CAPTIOPISELXR::CAPTIOPISELX_6,
|
||||
7 => CAPTIOPISELXR::CAPTIOPISELX_7,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_0`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_0(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_1`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_1(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_2`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_2(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_3`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_3(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_4`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_4(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_5`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_5(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_6`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_6(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_7`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_7(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_7
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOPOSELx`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOPOSELXR {
|
||||
#[doc = "Px = PJ"]
|
||||
CAPTIOPOSELX_0,
|
||||
#[doc = "Px = P1"]
|
||||
CAPTIOPOSELX_1,
|
||||
#[doc = "Px = P2"]
|
||||
CAPTIOPOSELX_2,
|
||||
#[doc = "Px = P3"]
|
||||
CAPTIOPOSELX_3,
|
||||
#[doc = "Px = P4"]
|
||||
CAPTIOPOSELX_4,
|
||||
#[doc = "Px = P5"]
|
||||
CAPTIOPOSELX_5,
|
||||
#[doc = "Px = P6"]
|
||||
CAPTIOPOSELX_6,
|
||||
#[doc = "Px = P7"]
|
||||
CAPTIOPOSELX_7,
|
||||
#[doc = "Px = P8"]
|
||||
CAPTIOPOSELX_8,
|
||||
#[doc = "Px = P9"]
|
||||
CAPTIOPOSELX_9,
|
||||
#[doc = "Px = P10"]
|
||||
CAPTIOPOSELX_10,
|
||||
#[doc = "Px = P11"]
|
||||
CAPTIOPOSELX_11,
|
||||
#[doc = "Px = P12"]
|
||||
CAPTIOPOSELX_12,
|
||||
#[doc = "Px = P13"]
|
||||
CAPTIOPOSELX_13,
|
||||
#[doc = "Px = P14"]
|
||||
CAPTIOPOSELX_14,
|
||||
#[doc = "Px = P15"]
|
||||
CAPTIOPOSELX_15,
|
||||
}
|
||||
impl CAPTIOPOSELXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_0 => 0,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_1 => 1,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_2 => 2,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_3 => 3,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_4 => 4,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_5 => 5,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_6 => 6,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_7 => 7,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_8 => 8,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_9 => 9,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_10 => 10,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_11 => 11,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_12 => 12,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_13 => 13,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_14 => 14,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CAPTIOPOSELXR {
|
||||
match value {
|
||||
0 => CAPTIOPOSELXR::CAPTIOPOSELX_0,
|
||||
1 => CAPTIOPOSELXR::CAPTIOPOSELX_1,
|
||||
2 => CAPTIOPOSELXR::CAPTIOPOSELX_2,
|
||||
3 => CAPTIOPOSELXR::CAPTIOPOSELX_3,
|
||||
4 => CAPTIOPOSELXR::CAPTIOPOSELX_4,
|
||||
5 => CAPTIOPOSELXR::CAPTIOPOSELX_5,
|
||||
6 => CAPTIOPOSELXR::CAPTIOPOSELX_6,
|
||||
7 => CAPTIOPOSELXR::CAPTIOPOSELX_7,
|
||||
8 => CAPTIOPOSELXR::CAPTIOPOSELX_8,
|
||||
9 => CAPTIOPOSELXR::CAPTIOPOSELX_9,
|
||||
10 => CAPTIOPOSELXR::CAPTIOPOSELX_10,
|
||||
11 => CAPTIOPOSELXR::CAPTIOPOSELX_11,
|
||||
12 => CAPTIOPOSELXR::CAPTIOPOSELX_12,
|
||||
13 => CAPTIOPOSELXR::CAPTIOPOSELX_13,
|
||||
14 => CAPTIOPOSELXR::CAPTIOPOSELX_14,
|
||||
15 => CAPTIOPOSELXR::CAPTIOPOSELX_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_0`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_0(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_1`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_1(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_2`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_2(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_3`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_3(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_4`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_4(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_5`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_5(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_6`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_6(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_7`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_7(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_8`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_8(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_9`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_9(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_10`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_10(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_11`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_11(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_12`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_12(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_13`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_13(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_14`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_14(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_15`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_15(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOENR {
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
CAPTIOEN_0,
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
CAPTIOEN_1,
|
||||
}
|
||||
impl CAPTIOENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOENR::CAPTIOEN_0 => false,
|
||||
CAPTIOENR::CAPTIOEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CAPTIOENR {
|
||||
match value {
|
||||
false => CAPTIOENR::CAPTIOEN_0,
|
||||
true => CAPTIOENR::CAPTIOEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_captioen_0(&self) -> bool {
|
||||
*self == CAPTIOENR::CAPTIOEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_captioen_1(&self) -> bool {
|
||||
*self == CAPTIOENR::CAPTIOEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOSTATE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOSTATER {
|
||||
#[doc = "Curent state 0 or Capacitive Touch IO is disabled"]
|
||||
CAPTIOSTATE_0,
|
||||
#[doc = "Current state 1"]
|
||||
CAPTIOSTATE_1,
|
||||
}
|
||||
impl CAPTIOSTATER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOSTATER::CAPTIOSTATE_0 => false,
|
||||
CAPTIOSTATER::CAPTIOSTATE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CAPTIOSTATER {
|
||||
match value {
|
||||
false => CAPTIOSTATER::CAPTIOSTATE_0,
|
||||
true => CAPTIOSTATER::CAPTIOSTATE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOSTATE_0`"]
|
||||
#[inline]
|
||||
pub fn is_captiostate_0(&self) -> bool {
|
||||
*self == CAPTIOSTATER::CAPTIOSTATE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOSTATE_1`"]
|
||||
#[inline]
|
||||
pub fn is_captiostate_1(&self) -> bool {
|
||||
*self == CAPTIOSTATER::CAPTIOSTATE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOPISELx`"]
|
||||
pub enum CAPTIOPISELXW {
|
||||
#[doc = "Px.0"]
|
||||
CAPTIOPISELX_0,
|
||||
#[doc = "Px.1"]
|
||||
CAPTIOPISELX_1,
|
||||
#[doc = "Px.2"]
|
||||
CAPTIOPISELX_2,
|
||||
#[doc = "Px.3"]
|
||||
CAPTIOPISELX_3,
|
||||
#[doc = "Px.4"]
|
||||
CAPTIOPISELX_4,
|
||||
#[doc = "Px.5"]
|
||||
CAPTIOPISELX_5,
|
||||
#[doc = "Px.6"]
|
||||
CAPTIOPISELX_6,
|
||||
#[doc = "Px.7"]
|
||||
CAPTIOPISELX_7,
|
||||
}
|
||||
impl CAPTIOPISELXW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPISELXW::CAPTIOPISELX_0 => 0,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_1 => 1,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_2 => 2,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_3 => 3,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_4 => 4,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_5 => 5,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_6 => 6,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_7 => 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOPISELXW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOPISELXW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOPISELXW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Px.0"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_0)
|
||||
}
|
||||
#[doc = "Px.1"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_1)
|
||||
}
|
||||
#[doc = "Px.2"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_2(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_2)
|
||||
}
|
||||
#[doc = "Px.3"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_3(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_3)
|
||||
}
|
||||
#[doc = "Px.4"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_4(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_4)
|
||||
}
|
||||
#[doc = "Px.5"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_5(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_5)
|
||||
}
|
||||
#[doc = "Px.6"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_6(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_6)
|
||||
}
|
||||
#[doc = "Px.7"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_7(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_7)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOPOSELx`"]
|
||||
pub enum CAPTIOPOSELXW {
|
||||
#[doc = "Px = PJ"]
|
||||
CAPTIOPOSELX_0,
|
||||
#[doc = "Px = P1"]
|
||||
CAPTIOPOSELX_1,
|
||||
#[doc = "Px = P2"]
|
||||
CAPTIOPOSELX_2,
|
||||
#[doc = "Px = P3"]
|
||||
CAPTIOPOSELX_3,
|
||||
#[doc = "Px = P4"]
|
||||
CAPTIOPOSELX_4,
|
||||
#[doc = "Px = P5"]
|
||||
CAPTIOPOSELX_5,
|
||||
#[doc = "Px = P6"]
|
||||
CAPTIOPOSELX_6,
|
||||
#[doc = "Px = P7"]
|
||||
CAPTIOPOSELX_7,
|
||||
#[doc = "Px = P8"]
|
||||
CAPTIOPOSELX_8,
|
||||
#[doc = "Px = P9"]
|
||||
CAPTIOPOSELX_9,
|
||||
#[doc = "Px = P10"]
|
||||
CAPTIOPOSELX_10,
|
||||
#[doc = "Px = P11"]
|
||||
CAPTIOPOSELX_11,
|
||||
#[doc = "Px = P12"]
|
||||
CAPTIOPOSELX_12,
|
||||
#[doc = "Px = P13"]
|
||||
CAPTIOPOSELX_13,
|
||||
#[doc = "Px = P14"]
|
||||
CAPTIOPOSELX_14,
|
||||
#[doc = "Px = P15"]
|
||||
CAPTIOPOSELX_15,
|
||||
}
|
||||
impl CAPTIOPOSELXW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_0 => 0,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_1 => 1,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_2 => 2,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_3 => 3,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_4 => 4,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_5 => 5,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_6 => 6,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_7 => 7,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_8 => 8,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_9 => 9,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_10 => 10,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_11 => 11,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_12 => 12,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_13 => 13,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_14 => 14,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOPOSELXW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOPOSELXW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOPOSELXW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Px = PJ"]
|
||||
#[inline]
|
||||
pub fn captioposelx_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_0)
|
||||
}
|
||||
#[doc = "Px = P1"]
|
||||
#[inline]
|
||||
pub fn captioposelx_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_1)
|
||||
}
|
||||
#[doc = "Px = P2"]
|
||||
#[inline]
|
||||
pub fn captioposelx_2(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_2)
|
||||
}
|
||||
#[doc = "Px = P3"]
|
||||
#[inline]
|
||||
pub fn captioposelx_3(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_3)
|
||||
}
|
||||
#[doc = "Px = P4"]
|
||||
#[inline]
|
||||
pub fn captioposelx_4(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_4)
|
||||
}
|
||||
#[doc = "Px = P5"]
|
||||
#[inline]
|
||||
pub fn captioposelx_5(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_5)
|
||||
}
|
||||
#[doc = "Px = P6"]
|
||||
#[inline]
|
||||
pub fn captioposelx_6(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_6)
|
||||
}
|
||||
#[doc = "Px = P7"]
|
||||
#[inline]
|
||||
pub fn captioposelx_7(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_7)
|
||||
}
|
||||
#[doc = "Px = P8"]
|
||||
#[inline]
|
||||
pub fn captioposelx_8(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_8)
|
||||
}
|
||||
#[doc = "Px = P9"]
|
||||
#[inline]
|
||||
pub fn captioposelx_9(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_9)
|
||||
}
|
||||
#[doc = "Px = P10"]
|
||||
#[inline]
|
||||
pub fn captioposelx_10(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_10)
|
||||
}
|
||||
#[doc = "Px = P11"]
|
||||
#[inline]
|
||||
pub fn captioposelx_11(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_11)
|
||||
}
|
||||
#[doc = "Px = P12"]
|
||||
#[inline]
|
||||
pub fn captioposelx_12(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_12)
|
||||
}
|
||||
#[doc = "Px = P13"]
|
||||
#[inline]
|
||||
pub fn captioposelx_13(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_13)
|
||||
}
|
||||
#[doc = "Px = P14"]
|
||||
#[inline]
|
||||
pub fn captioposelx_14(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_14)
|
||||
}
|
||||
#[doc = "Px = P15"]
|
||||
#[inline]
|
||||
pub fn captioposelx_15(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOEN`"]
|
||||
pub enum CAPTIOENW {
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
CAPTIOEN_0,
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
CAPTIOEN_1,
|
||||
}
|
||||
impl CAPTIOENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOENW::CAPTIOEN_0 => false,
|
||||
CAPTIOENW::CAPTIOEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
#[inline]
|
||||
pub fn captioen_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOENW::CAPTIOEN_0)
|
||||
}
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
#[inline]
|
||||
pub fn captioen_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOENW::CAPTIOEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 1:3 - Capacitive Touch IO pin select"]
|
||||
#[inline]
|
||||
pub fn captiopiselx(&self) -> CAPTIOPISELXR {
|
||||
CAPTIOPISELXR::_from({
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 4:7 - Capacitive Touch IO port select"]
|
||||
#[inline]
|
||||
pub fn captioposelx(&self) -> CAPTIOPOSELXR {
|
||||
CAPTIOPOSELXR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 8 - Capacitive Touch IO enable"]
|
||||
#[inline]
|
||||
pub fn captioen(&self) -> CAPTIOENR {
|
||||
CAPTIOENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 9 - Capacitive Touch IO state"]
|
||||
#[inline]
|
||||
pub fn captiostate(&self) -> CAPTIOSTATER {
|
||||
CAPTIOSTATER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 1:3 - Capacitive Touch IO pin select"]
|
||||
#[inline]
|
||||
pub fn captiopiselx(&mut self) -> _CAPTIOPISELXW {
|
||||
_CAPTIOPISELXW { w: self }
|
||||
}
|
||||
#[doc = "Bits 4:7 - Capacitive Touch IO port select"]
|
||||
#[inline]
|
||||
pub fn captioposelx(&mut self) -> _CAPTIOPOSELXW {
|
||||
_CAPTIOPOSELXW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Capacitive Touch IO enable"]
|
||||
#[inline]
|
||||
pub fn captioen(&mut self) -> _CAPTIOENW {
|
||||
_CAPTIOENW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
_reserved0: [u8; 14usize],
|
||||
#[doc = "0x0e - Capacitive Touch IO x Control Register"]
|
||||
pub captiox_ctl: CAPTIOXCTL,
|
||||
}
|
||||
#[doc = "Capacitive Touch IO x Control Register"]
|
||||
pub struct CAPTIOXCTL {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Capacitive Touch IO x Control Register"]
|
||||
pub mod captiox_ctl;
|
|
@ -0,0 +1,783 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CAPTIOXCTL {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOPISELx`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOPISELXR {
|
||||
#[doc = "Px.0"]
|
||||
CAPTIOPISELX_0,
|
||||
#[doc = "Px.1"]
|
||||
CAPTIOPISELX_1,
|
||||
#[doc = "Px.2"]
|
||||
CAPTIOPISELX_2,
|
||||
#[doc = "Px.3"]
|
||||
CAPTIOPISELX_3,
|
||||
#[doc = "Px.4"]
|
||||
CAPTIOPISELX_4,
|
||||
#[doc = "Px.5"]
|
||||
CAPTIOPISELX_5,
|
||||
#[doc = "Px.6"]
|
||||
CAPTIOPISELX_6,
|
||||
#[doc = "Px.7"]
|
||||
CAPTIOPISELX_7,
|
||||
}
|
||||
impl CAPTIOPISELXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPISELXR::CAPTIOPISELX_0 => 0,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_1 => 1,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_2 => 2,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_3 => 3,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_4 => 4,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_5 => 5,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_6 => 6,
|
||||
CAPTIOPISELXR::CAPTIOPISELX_7 => 7,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CAPTIOPISELXR {
|
||||
match value {
|
||||
0 => CAPTIOPISELXR::CAPTIOPISELX_0,
|
||||
1 => CAPTIOPISELXR::CAPTIOPISELX_1,
|
||||
2 => CAPTIOPISELXR::CAPTIOPISELX_2,
|
||||
3 => CAPTIOPISELXR::CAPTIOPISELX_3,
|
||||
4 => CAPTIOPISELXR::CAPTIOPISELX_4,
|
||||
5 => CAPTIOPISELXR::CAPTIOPISELX_5,
|
||||
6 => CAPTIOPISELXR::CAPTIOPISELX_6,
|
||||
7 => CAPTIOPISELXR::CAPTIOPISELX_7,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_0`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_0(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_1`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_1(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_2`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_2(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_3`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_3(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_4`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_4(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_5`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_5(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_6`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_6(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPISELX_7`"]
|
||||
#[inline]
|
||||
pub fn is_captiopiselx_7(&self) -> bool {
|
||||
*self == CAPTIOPISELXR::CAPTIOPISELX_7
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOPOSELx`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOPOSELXR {
|
||||
#[doc = "Px = PJ"]
|
||||
CAPTIOPOSELX_0,
|
||||
#[doc = "Px = P1"]
|
||||
CAPTIOPOSELX_1,
|
||||
#[doc = "Px = P2"]
|
||||
CAPTIOPOSELX_2,
|
||||
#[doc = "Px = P3"]
|
||||
CAPTIOPOSELX_3,
|
||||
#[doc = "Px = P4"]
|
||||
CAPTIOPOSELX_4,
|
||||
#[doc = "Px = P5"]
|
||||
CAPTIOPOSELX_5,
|
||||
#[doc = "Px = P6"]
|
||||
CAPTIOPOSELX_6,
|
||||
#[doc = "Px = P7"]
|
||||
CAPTIOPOSELX_7,
|
||||
#[doc = "Px = P8"]
|
||||
CAPTIOPOSELX_8,
|
||||
#[doc = "Px = P9"]
|
||||
CAPTIOPOSELX_9,
|
||||
#[doc = "Px = P10"]
|
||||
CAPTIOPOSELX_10,
|
||||
#[doc = "Px = P11"]
|
||||
CAPTIOPOSELX_11,
|
||||
#[doc = "Px = P12"]
|
||||
CAPTIOPOSELX_12,
|
||||
#[doc = "Px = P13"]
|
||||
CAPTIOPOSELX_13,
|
||||
#[doc = "Px = P14"]
|
||||
CAPTIOPOSELX_14,
|
||||
#[doc = "Px = P15"]
|
||||
CAPTIOPOSELX_15,
|
||||
}
|
||||
impl CAPTIOPOSELXR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_0 => 0,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_1 => 1,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_2 => 2,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_3 => 3,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_4 => 4,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_5 => 5,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_6 => 6,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_7 => 7,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_8 => 8,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_9 => 9,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_10 => 10,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_11 => 11,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_12 => 12,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_13 => 13,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_14 => 14,
|
||||
CAPTIOPOSELXR::CAPTIOPOSELX_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CAPTIOPOSELXR {
|
||||
match value {
|
||||
0 => CAPTIOPOSELXR::CAPTIOPOSELX_0,
|
||||
1 => CAPTIOPOSELXR::CAPTIOPOSELX_1,
|
||||
2 => CAPTIOPOSELXR::CAPTIOPOSELX_2,
|
||||
3 => CAPTIOPOSELXR::CAPTIOPOSELX_3,
|
||||
4 => CAPTIOPOSELXR::CAPTIOPOSELX_4,
|
||||
5 => CAPTIOPOSELXR::CAPTIOPOSELX_5,
|
||||
6 => CAPTIOPOSELXR::CAPTIOPOSELX_6,
|
||||
7 => CAPTIOPOSELXR::CAPTIOPOSELX_7,
|
||||
8 => CAPTIOPOSELXR::CAPTIOPOSELX_8,
|
||||
9 => CAPTIOPOSELXR::CAPTIOPOSELX_9,
|
||||
10 => CAPTIOPOSELXR::CAPTIOPOSELX_10,
|
||||
11 => CAPTIOPOSELXR::CAPTIOPOSELX_11,
|
||||
12 => CAPTIOPOSELXR::CAPTIOPOSELX_12,
|
||||
13 => CAPTIOPOSELXR::CAPTIOPOSELX_13,
|
||||
14 => CAPTIOPOSELXR::CAPTIOPOSELX_14,
|
||||
15 => CAPTIOPOSELXR::CAPTIOPOSELX_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_0`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_0(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_1`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_1(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_2`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_2(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_3`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_3(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_4`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_4(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_5`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_5(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_6`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_6(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_7`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_7(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_8`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_8(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_9`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_9(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_10`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_10(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_11`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_11(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_12`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_12(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_13`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_13(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_14`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_14(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOPOSELX_15`"]
|
||||
#[inline]
|
||||
pub fn is_captioposelx_15(&self) -> bool {
|
||||
*self == CAPTIOPOSELXR::CAPTIOPOSELX_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOENR {
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
CAPTIOEN_0,
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
CAPTIOEN_1,
|
||||
}
|
||||
impl CAPTIOENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOENR::CAPTIOEN_0 => false,
|
||||
CAPTIOENR::CAPTIOEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CAPTIOENR {
|
||||
match value {
|
||||
false => CAPTIOENR::CAPTIOEN_0,
|
||||
true => CAPTIOENR::CAPTIOEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_captioen_0(&self) -> bool {
|
||||
*self == CAPTIOENR::CAPTIOEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_captioen_1(&self) -> bool {
|
||||
*self == CAPTIOENR::CAPTIOEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CAPTIOSTATE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CAPTIOSTATER {
|
||||
#[doc = "Curent state 0 or Capacitive Touch IO is disabled"]
|
||||
CAPTIOSTATE_0,
|
||||
#[doc = "Current state 1"]
|
||||
CAPTIOSTATE_1,
|
||||
}
|
||||
impl CAPTIOSTATER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOSTATER::CAPTIOSTATE_0 => false,
|
||||
CAPTIOSTATER::CAPTIOSTATE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CAPTIOSTATER {
|
||||
match value {
|
||||
false => CAPTIOSTATER::CAPTIOSTATE_0,
|
||||
true => CAPTIOSTATER::CAPTIOSTATE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOSTATE_0`"]
|
||||
#[inline]
|
||||
pub fn is_captiostate_0(&self) -> bool {
|
||||
*self == CAPTIOSTATER::CAPTIOSTATE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CAPTIOSTATE_1`"]
|
||||
#[inline]
|
||||
pub fn is_captiostate_1(&self) -> bool {
|
||||
*self == CAPTIOSTATER::CAPTIOSTATE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOPISELx`"]
|
||||
pub enum CAPTIOPISELXW {
|
||||
#[doc = "Px.0"]
|
||||
CAPTIOPISELX_0,
|
||||
#[doc = "Px.1"]
|
||||
CAPTIOPISELX_1,
|
||||
#[doc = "Px.2"]
|
||||
CAPTIOPISELX_2,
|
||||
#[doc = "Px.3"]
|
||||
CAPTIOPISELX_3,
|
||||
#[doc = "Px.4"]
|
||||
CAPTIOPISELX_4,
|
||||
#[doc = "Px.5"]
|
||||
CAPTIOPISELX_5,
|
||||
#[doc = "Px.6"]
|
||||
CAPTIOPISELX_6,
|
||||
#[doc = "Px.7"]
|
||||
CAPTIOPISELX_7,
|
||||
}
|
||||
impl CAPTIOPISELXW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPISELXW::CAPTIOPISELX_0 => 0,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_1 => 1,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_2 => 2,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_3 => 3,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_4 => 4,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_5 => 5,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_6 => 6,
|
||||
CAPTIOPISELXW::CAPTIOPISELX_7 => 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOPISELXW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOPISELXW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOPISELXW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Px.0"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_0)
|
||||
}
|
||||
#[doc = "Px.1"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_1)
|
||||
}
|
||||
#[doc = "Px.2"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_2(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_2)
|
||||
}
|
||||
#[doc = "Px.3"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_3(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_3)
|
||||
}
|
||||
#[doc = "Px.4"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_4(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_4)
|
||||
}
|
||||
#[doc = "Px.5"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_5(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_5)
|
||||
}
|
||||
#[doc = "Px.6"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_6(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_6)
|
||||
}
|
||||
#[doc = "Px.7"]
|
||||
#[inline]
|
||||
pub fn captiopiselx_7(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPISELXW::CAPTIOPISELX_7)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOPOSELx`"]
|
||||
pub enum CAPTIOPOSELXW {
|
||||
#[doc = "Px = PJ"]
|
||||
CAPTIOPOSELX_0,
|
||||
#[doc = "Px = P1"]
|
||||
CAPTIOPOSELX_1,
|
||||
#[doc = "Px = P2"]
|
||||
CAPTIOPOSELX_2,
|
||||
#[doc = "Px = P3"]
|
||||
CAPTIOPOSELX_3,
|
||||
#[doc = "Px = P4"]
|
||||
CAPTIOPOSELX_4,
|
||||
#[doc = "Px = P5"]
|
||||
CAPTIOPOSELX_5,
|
||||
#[doc = "Px = P6"]
|
||||
CAPTIOPOSELX_6,
|
||||
#[doc = "Px = P7"]
|
||||
CAPTIOPOSELX_7,
|
||||
#[doc = "Px = P8"]
|
||||
CAPTIOPOSELX_8,
|
||||
#[doc = "Px = P9"]
|
||||
CAPTIOPOSELX_9,
|
||||
#[doc = "Px = P10"]
|
||||
CAPTIOPOSELX_10,
|
||||
#[doc = "Px = P11"]
|
||||
CAPTIOPOSELX_11,
|
||||
#[doc = "Px = P12"]
|
||||
CAPTIOPOSELX_12,
|
||||
#[doc = "Px = P13"]
|
||||
CAPTIOPOSELX_13,
|
||||
#[doc = "Px = P14"]
|
||||
CAPTIOPOSELX_14,
|
||||
#[doc = "Px = P15"]
|
||||
CAPTIOPOSELX_15,
|
||||
}
|
||||
impl CAPTIOPOSELXW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_0 => 0,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_1 => 1,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_2 => 2,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_3 => 3,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_4 => 4,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_5 => 5,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_6 => 6,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_7 => 7,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_8 => 8,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_9 => 9,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_10 => 10,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_11 => 11,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_12 => 12,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_13 => 13,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_14 => 14,
|
||||
CAPTIOPOSELXW::CAPTIOPOSELX_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOPOSELXW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOPOSELXW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOPOSELXW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Px = PJ"]
|
||||
#[inline]
|
||||
pub fn captioposelx_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_0)
|
||||
}
|
||||
#[doc = "Px = P1"]
|
||||
#[inline]
|
||||
pub fn captioposelx_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_1)
|
||||
}
|
||||
#[doc = "Px = P2"]
|
||||
#[inline]
|
||||
pub fn captioposelx_2(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_2)
|
||||
}
|
||||
#[doc = "Px = P3"]
|
||||
#[inline]
|
||||
pub fn captioposelx_3(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_3)
|
||||
}
|
||||
#[doc = "Px = P4"]
|
||||
#[inline]
|
||||
pub fn captioposelx_4(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_4)
|
||||
}
|
||||
#[doc = "Px = P5"]
|
||||
#[inline]
|
||||
pub fn captioposelx_5(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_5)
|
||||
}
|
||||
#[doc = "Px = P6"]
|
||||
#[inline]
|
||||
pub fn captioposelx_6(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_6)
|
||||
}
|
||||
#[doc = "Px = P7"]
|
||||
#[inline]
|
||||
pub fn captioposelx_7(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_7)
|
||||
}
|
||||
#[doc = "Px = P8"]
|
||||
#[inline]
|
||||
pub fn captioposelx_8(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_8)
|
||||
}
|
||||
#[doc = "Px = P9"]
|
||||
#[inline]
|
||||
pub fn captioposelx_9(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_9)
|
||||
}
|
||||
#[doc = "Px = P10"]
|
||||
#[inline]
|
||||
pub fn captioposelx_10(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_10)
|
||||
}
|
||||
#[doc = "Px = P11"]
|
||||
#[inline]
|
||||
pub fn captioposelx_11(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_11)
|
||||
}
|
||||
#[doc = "Px = P12"]
|
||||
#[inline]
|
||||
pub fn captioposelx_12(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_12)
|
||||
}
|
||||
#[doc = "Px = P13"]
|
||||
#[inline]
|
||||
pub fn captioposelx_13(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_13)
|
||||
}
|
||||
#[doc = "Px = P14"]
|
||||
#[inline]
|
||||
pub fn captioposelx_14(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_14)
|
||||
}
|
||||
#[doc = "Px = P15"]
|
||||
#[inline]
|
||||
pub fn captioposelx_15(self) -> &'a mut W {
|
||||
self.variant(CAPTIOPOSELXW::CAPTIOPOSELX_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CAPTIOEN`"]
|
||||
pub enum CAPTIOENW {
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
CAPTIOEN_0,
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
CAPTIOEN_1,
|
||||
}
|
||||
impl CAPTIOENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CAPTIOENW::CAPTIOEN_0 => false,
|
||||
CAPTIOENW::CAPTIOEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CAPTIOENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CAPTIOENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CAPTIOENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "All Capacitive Touch IOs are disabled. Signal towards timers is 0."]
|
||||
#[inline]
|
||||
pub fn captioen_0(self) -> &'a mut W {
|
||||
self.variant(CAPTIOENW::CAPTIOEN_0)
|
||||
}
|
||||
#[doc = "Selected Capacitive Touch IO is enabled"]
|
||||
#[inline]
|
||||
pub fn captioen_1(self) -> &'a mut W {
|
||||
self.variant(CAPTIOENW::CAPTIOEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 1:3 - Capacitive Touch IO pin select"]
|
||||
#[inline]
|
||||
pub fn captiopiselx(&self) -> CAPTIOPISELXR {
|
||||
CAPTIOPISELXR::_from({
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 4:7 - Capacitive Touch IO port select"]
|
||||
#[inline]
|
||||
pub fn captioposelx(&self) -> CAPTIOPOSELXR {
|
||||
CAPTIOPOSELXR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 8 - Capacitive Touch IO enable"]
|
||||
#[inline]
|
||||
pub fn captioen(&self) -> CAPTIOENR {
|
||||
CAPTIOENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 9 - Capacitive Touch IO state"]
|
||||
#[inline]
|
||||
pub fn captiostate(&self) -> CAPTIOSTATER {
|
||||
CAPTIOSTATER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 1:3 - Capacitive Touch IO pin select"]
|
||||
#[inline]
|
||||
pub fn captiopiselx(&mut self) -> _CAPTIOPISELXW {
|
||||
_CAPTIOPISELXW { w: self }
|
||||
}
|
||||
#[doc = "Bits 4:7 - Capacitive Touch IO port select"]
|
||||
#[inline]
|
||||
pub fn captioposelx(&mut self) -> _CAPTIOPOSELXW {
|
||||
_CAPTIOPOSELXW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Capacitive Touch IO enable"]
|
||||
#[inline]
|
||||
pub fn captioen(&mut self) -> _CAPTIOENW {
|
||||
_CAPTIOENW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Comparator Control Register 0"]
|
||||
pub cex_ctl0: CEXCTL0,
|
||||
#[doc = "0x02 - Comparator Control Register 1"]
|
||||
pub cex_ctl1: CEXCTL1,
|
||||
#[doc = "0x04 - Comparator Control Register 2"]
|
||||
pub cex_ctl2: CEXCTL2,
|
||||
#[doc = "0x06 - Comparator Control Register 3"]
|
||||
pub cex_ctl3: CEXCTL3,
|
||||
_reserved0: [u8; 4usize],
|
||||
#[doc = "0x0c - Comparator Interrupt Control Register"]
|
||||
pub cex_int: CEXINT,
|
||||
#[doc = "0x0e - Comparator Interrupt Vector Word Register"]
|
||||
pub cex_iv: CEXIV,
|
||||
}
|
||||
#[doc = "Comparator Control Register 0"]
|
||||
pub struct CEXCTL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 0"]
|
||||
pub mod cex_ctl0;
|
||||
#[doc = "Comparator Control Register 1"]
|
||||
pub struct CEXCTL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 1"]
|
||||
pub mod cex_ctl1;
|
||||
#[doc = "Comparator Control Register 2"]
|
||||
pub struct CEXCTL2 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 2"]
|
||||
pub mod cex_ctl2;
|
||||
#[doc = "Comparator Control Register 3"]
|
||||
pub struct CEXCTL3 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 3"]
|
||||
pub mod cex_ctl3;
|
||||
#[doc = "Comparator Interrupt Control Register"]
|
||||
pub struct CEXINT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Interrupt Control Register"]
|
||||
pub mod cex_int;
|
||||
#[doc = "Comparator Interrupt Vector Word Register"]
|
||||
pub struct CEXIV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Interrupt Vector Word Register"]
|
||||
pub mod cex_iv;
|
|
@ -0,0 +1,982 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXCTL0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIPSEL`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIPSELR {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIPSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIPSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIPSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIPSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIPSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIPSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIPSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIPSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIPSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIPSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIPSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIPSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIPSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIPSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIPSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIPSEL_15,
|
||||
}
|
||||
impl CEIPSELR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIPSELR::CEIPSEL_0 => 0,
|
||||
CEIPSELR::CEIPSEL_1 => 1,
|
||||
CEIPSELR::CEIPSEL_2 => 2,
|
||||
CEIPSELR::CEIPSEL_3 => 3,
|
||||
CEIPSELR::CEIPSEL_4 => 4,
|
||||
CEIPSELR::CEIPSEL_5 => 5,
|
||||
CEIPSELR::CEIPSEL_6 => 6,
|
||||
CEIPSELR::CEIPSEL_7 => 7,
|
||||
CEIPSELR::CEIPSEL_8 => 8,
|
||||
CEIPSELR::CEIPSEL_9 => 9,
|
||||
CEIPSELR::CEIPSEL_10 => 10,
|
||||
CEIPSELR::CEIPSEL_11 => 11,
|
||||
CEIPSELR::CEIPSEL_12 => 12,
|
||||
CEIPSELR::CEIPSEL_13 => 13,
|
||||
CEIPSELR::CEIPSEL_14 => 14,
|
||||
CEIPSELR::CEIPSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CEIPSELR {
|
||||
match value {
|
||||
0 => CEIPSELR::CEIPSEL_0,
|
||||
1 => CEIPSELR::CEIPSEL_1,
|
||||
2 => CEIPSELR::CEIPSEL_2,
|
||||
3 => CEIPSELR::CEIPSEL_3,
|
||||
4 => CEIPSELR::CEIPSEL_4,
|
||||
5 => CEIPSELR::CEIPSEL_5,
|
||||
6 => CEIPSELR::CEIPSEL_6,
|
||||
7 => CEIPSELR::CEIPSEL_7,
|
||||
8 => CEIPSELR::CEIPSEL_8,
|
||||
9 => CEIPSELR::CEIPSEL_9,
|
||||
10 => CEIPSELR::CEIPSEL_10,
|
||||
11 => CEIPSELR::CEIPSEL_11,
|
||||
12 => CEIPSELR::CEIPSEL_12,
|
||||
13 => CEIPSELR::CEIPSEL_13,
|
||||
14 => CEIPSELR::CEIPSEL_14,
|
||||
15 => CEIPSELR::CEIPSEL_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_0(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_1(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_2(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_3`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_3(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_4(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_5`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_5(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_6`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_6(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_7`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_7(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_8`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_8(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_9`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_9(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_10(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_11`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_11(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_12`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_12(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_13`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_13(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_14`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_14(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_15`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_15(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIPEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIPENR {
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
CEIPEN_0,
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
CEIPEN_1,
|
||||
}
|
||||
impl CEIPENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIPENR::CEIPEN_0 => false,
|
||||
CEIPENR::CEIPEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIPENR {
|
||||
match value {
|
||||
false => CEIPENR::CEIPEN_0,
|
||||
true => CEIPENR::CEIPEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceipen_0(&self) -> bool {
|
||||
*self == CEIPENR::CEIPEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceipen_1(&self) -> bool {
|
||||
*self == CEIPENR::CEIPEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIMSEL`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIMSELR {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIMSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIMSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIMSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIMSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIMSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIMSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIMSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIMSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIMSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIMSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIMSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIMSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIMSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIMSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIMSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIMSEL_15,
|
||||
}
|
||||
impl CEIMSELR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIMSELR::CEIMSEL_0 => 0,
|
||||
CEIMSELR::CEIMSEL_1 => 1,
|
||||
CEIMSELR::CEIMSEL_2 => 2,
|
||||
CEIMSELR::CEIMSEL_3 => 3,
|
||||
CEIMSELR::CEIMSEL_4 => 4,
|
||||
CEIMSELR::CEIMSEL_5 => 5,
|
||||
CEIMSELR::CEIMSEL_6 => 6,
|
||||
CEIMSELR::CEIMSEL_7 => 7,
|
||||
CEIMSELR::CEIMSEL_8 => 8,
|
||||
CEIMSELR::CEIMSEL_9 => 9,
|
||||
CEIMSELR::CEIMSEL_10 => 10,
|
||||
CEIMSELR::CEIMSEL_11 => 11,
|
||||
CEIMSELR::CEIMSEL_12 => 12,
|
||||
CEIMSELR::CEIMSEL_13 => 13,
|
||||
CEIMSELR::CEIMSEL_14 => 14,
|
||||
CEIMSELR::CEIMSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CEIMSELR {
|
||||
match value {
|
||||
0 => CEIMSELR::CEIMSEL_0,
|
||||
1 => CEIMSELR::CEIMSEL_1,
|
||||
2 => CEIMSELR::CEIMSEL_2,
|
||||
3 => CEIMSELR::CEIMSEL_3,
|
||||
4 => CEIMSELR::CEIMSEL_4,
|
||||
5 => CEIMSELR::CEIMSEL_5,
|
||||
6 => CEIMSELR::CEIMSEL_6,
|
||||
7 => CEIMSELR::CEIMSEL_7,
|
||||
8 => CEIMSELR::CEIMSEL_8,
|
||||
9 => CEIMSELR::CEIMSEL_9,
|
||||
10 => CEIMSELR::CEIMSEL_10,
|
||||
11 => CEIMSELR::CEIMSEL_11,
|
||||
12 => CEIMSELR::CEIMSEL_12,
|
||||
13 => CEIMSELR::CEIMSEL_13,
|
||||
14 => CEIMSELR::CEIMSEL_14,
|
||||
15 => CEIMSELR::CEIMSEL_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_0(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_1(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_2(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_3`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_3(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_4(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_5`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_5(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_6`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_6(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_7`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_7(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_8`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_8(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_9`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_9(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_10(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_11`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_11(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_12`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_12(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_13`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_13(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_14`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_14(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_15`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_15(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIMEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIMENR {
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
CEIMEN_0,
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
CEIMEN_1,
|
||||
}
|
||||
impl CEIMENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIMENR::CEIMEN_0 => false,
|
||||
CEIMENR::CEIMEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIMENR {
|
||||
match value {
|
||||
false => CEIMENR::CEIMEN_0,
|
||||
true => CEIMENR::CEIMEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceimen_0(&self) -> bool {
|
||||
*self == CEIMENR::CEIMEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceimen_1(&self) -> bool {
|
||||
*self == CEIMENR::CEIMEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIPSEL`"]
|
||||
pub enum CEIPSELW {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIPSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIPSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIPSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIPSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIPSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIPSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIPSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIPSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIPSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIPSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIPSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIPSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIPSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIPSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIPSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIPSEL_15,
|
||||
}
|
||||
impl CEIPSELW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIPSELW::CEIPSEL_0 => 0,
|
||||
CEIPSELW::CEIPSEL_1 => 1,
|
||||
CEIPSELW::CEIPSEL_2 => 2,
|
||||
CEIPSELW::CEIPSEL_3 => 3,
|
||||
CEIPSELW::CEIPSEL_4 => 4,
|
||||
CEIPSELW::CEIPSEL_5 => 5,
|
||||
CEIPSELW::CEIPSEL_6 => 6,
|
||||
CEIPSELW::CEIPSEL_7 => 7,
|
||||
CEIPSELW::CEIPSEL_8 => 8,
|
||||
CEIPSELW::CEIPSEL_9 => 9,
|
||||
CEIPSELW::CEIPSEL_10 => 10,
|
||||
CEIPSELW::CEIPSEL_11 => 11,
|
||||
CEIPSELW::CEIPSEL_12 => 12,
|
||||
CEIPSELW::CEIPSEL_13 => 13,
|
||||
CEIPSELW::CEIPSEL_14 => 14,
|
||||
CEIPSELW::CEIPSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIPSELW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIPSELW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIPSELW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Channel 0 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_0(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_0)
|
||||
}
|
||||
#[doc = "Channel 1 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_1(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_1)
|
||||
}
|
||||
#[doc = "Channel 2 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_2(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_2)
|
||||
}
|
||||
#[doc = "Channel 3 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_3(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_3)
|
||||
}
|
||||
#[doc = "Channel 4 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_4(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_4)
|
||||
}
|
||||
#[doc = "Channel 5 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_5(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_5)
|
||||
}
|
||||
#[doc = "Channel 6 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_6(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_6)
|
||||
}
|
||||
#[doc = "Channel 7 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_7(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_7)
|
||||
}
|
||||
#[doc = "Channel 8 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_8(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_8)
|
||||
}
|
||||
#[doc = "Channel 9 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_9(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_9)
|
||||
}
|
||||
#[doc = "Channel 10 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_10(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_10)
|
||||
}
|
||||
#[doc = "Channel 11 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_11(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_11)
|
||||
}
|
||||
#[doc = "Channel 12 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_12(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_12)
|
||||
}
|
||||
#[doc = "Channel 13 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_13(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_13)
|
||||
}
|
||||
#[doc = "Channel 14 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_14(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_14)
|
||||
}
|
||||
#[doc = "Channel 15 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_15(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIPEN`"]
|
||||
pub enum CEIPENW {
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
CEIPEN_0,
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
CEIPEN_1,
|
||||
}
|
||||
impl CEIPENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIPENW::CEIPEN_0 => false,
|
||||
CEIPENW::CEIPEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIPENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIPENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIPENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
#[inline]
|
||||
pub fn ceipen_0(self) -> &'a mut W {
|
||||
self.variant(CEIPENW::CEIPEN_0)
|
||||
}
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
#[inline]
|
||||
pub fn ceipen_1(self) -> &'a mut W {
|
||||
self.variant(CEIPENW::CEIPEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 7;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIMSEL`"]
|
||||
pub enum CEIMSELW {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIMSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIMSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIMSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIMSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIMSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIMSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIMSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIMSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIMSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIMSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIMSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIMSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIMSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIMSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIMSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIMSEL_15,
|
||||
}
|
||||
impl CEIMSELW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIMSELW::CEIMSEL_0 => 0,
|
||||
CEIMSELW::CEIMSEL_1 => 1,
|
||||
CEIMSELW::CEIMSEL_2 => 2,
|
||||
CEIMSELW::CEIMSEL_3 => 3,
|
||||
CEIMSELW::CEIMSEL_4 => 4,
|
||||
CEIMSELW::CEIMSEL_5 => 5,
|
||||
CEIMSELW::CEIMSEL_6 => 6,
|
||||
CEIMSELW::CEIMSEL_7 => 7,
|
||||
CEIMSELW::CEIMSEL_8 => 8,
|
||||
CEIMSELW::CEIMSEL_9 => 9,
|
||||
CEIMSELW::CEIMSEL_10 => 10,
|
||||
CEIMSELW::CEIMSEL_11 => 11,
|
||||
CEIMSELW::CEIMSEL_12 => 12,
|
||||
CEIMSELW::CEIMSEL_13 => 13,
|
||||
CEIMSELW::CEIMSEL_14 => 14,
|
||||
CEIMSELW::CEIMSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIMSELW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIMSELW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIMSELW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Channel 0 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_0(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_0)
|
||||
}
|
||||
#[doc = "Channel 1 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_1(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_1)
|
||||
}
|
||||
#[doc = "Channel 2 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_2(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_2)
|
||||
}
|
||||
#[doc = "Channel 3 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_3(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_3)
|
||||
}
|
||||
#[doc = "Channel 4 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_4(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_4)
|
||||
}
|
||||
#[doc = "Channel 5 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_5(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_5)
|
||||
}
|
||||
#[doc = "Channel 6 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_6(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_6)
|
||||
}
|
||||
#[doc = "Channel 7 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_7(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_7)
|
||||
}
|
||||
#[doc = "Channel 8 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_8(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_8)
|
||||
}
|
||||
#[doc = "Channel 9 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_9(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_9)
|
||||
}
|
||||
#[doc = "Channel 10 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_10(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_10)
|
||||
}
|
||||
#[doc = "Channel 11 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_11(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_11)
|
||||
}
|
||||
#[doc = "Channel 12 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_12(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_12)
|
||||
}
|
||||
#[doc = "Channel 13 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_13(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_13)
|
||||
}
|
||||
#[doc = "Channel 14 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_14(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_14)
|
||||
}
|
||||
#[doc = "Channel 15 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_15(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIMEN`"]
|
||||
pub enum CEIMENW {
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
CEIMEN_0,
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
CEIMEN_1,
|
||||
}
|
||||
impl CEIMENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIMENW::CEIMEN_0 => false,
|
||||
CEIMENW::CEIMEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIMENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIMENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIMENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
#[inline]
|
||||
pub fn ceimen_0(self) -> &'a mut W {
|
||||
self.variant(CEIMENW::CEIMEN_0)
|
||||
}
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
#[inline]
|
||||
pub fn ceimen_1(self) -> &'a mut W {
|
||||
self.variant(CEIMENW::CEIMEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:3 - Channel input selected for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipsel(&self) -> CEIPSELR {
|
||||
CEIPSELR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 7 - Channel input enable for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipen(&self) -> CEIPENR {
|
||||
CEIPENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 7;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 8:11 - Channel input selected for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimsel(&self) -> CEIMSELR {
|
||||
CEIMSELR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 15 - Channel input enable for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimen(&self) -> CEIMENR {
|
||||
CEIMENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:3 - Channel input selected for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipsel(&mut self) -> _CEIPSELW {
|
||||
_CEIPSELW { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - Channel input enable for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipen(&mut self) -> _CEIPENW {
|
||||
_CEIPENW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:11 - Channel input selected for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimsel(&mut self) -> _CEIMSELW {
|
||||
_CEIMSELW { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - Channel input enable for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimen(&mut self) -> _CEIMENW {
|
||||
_CEIMENW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,778 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXINT {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIFG_1,
|
||||
}
|
||||
impl CEIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIFGR::CEIFG_0 => false,
|
||||
CEIFGR::CEIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIFGR {
|
||||
match value {
|
||||
false => CEIFGR::CEIFG_0,
|
||||
true => CEIFGR::CEIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceifg_0(&self) -> bool {
|
||||
*self == CEIFGR::CEIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceifg_1(&self) -> bool {
|
||||
*self == CEIFGR::CEIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIIFG_1,
|
||||
}
|
||||
impl CEIIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIIFGR::CEIIFG_0 => false,
|
||||
CEIIFGR::CEIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIIFGR {
|
||||
match value {
|
||||
false => CEIIFGR::CEIIFG_0,
|
||||
true => CEIIFGR::CEIIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiifg_0(&self) -> bool {
|
||||
*self == CEIIFGR::CEIIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceiifg_1(&self) -> bool {
|
||||
*self == CEIIFGR::CEIIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CERDYIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CERDYIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CERDYIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CERDYIFG_1,
|
||||
}
|
||||
impl CERDYIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIFGR::CERDYIFG_0 => false,
|
||||
CERDYIFGR::CERDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CERDYIFGR {
|
||||
match value {
|
||||
false => CERDYIFGR::CERDYIFG_0,
|
||||
true => CERDYIFGR::CERDYIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyifg_0(&self) -> bool {
|
||||
*self == CERDYIFGR::CERDYIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyifg_1(&self) -> bool {
|
||||
*self == CERDYIFGR::CERDYIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIE_1,
|
||||
}
|
||||
impl CEIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIER::CEIE_0 => false,
|
||||
CEIER::CEIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIER {
|
||||
match value {
|
||||
false => CEIER::CEIE_0,
|
||||
true => CEIER::CEIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceie_0(&self) -> bool {
|
||||
*self == CEIER::CEIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceie_1(&self) -> bool {
|
||||
*self == CEIER::CEIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIIE_1,
|
||||
}
|
||||
impl CEIIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIIER::CEIIE_0 => false,
|
||||
CEIIER::CEIIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIIER {
|
||||
match value {
|
||||
false => CEIIER::CEIIE_0,
|
||||
true => CEIIER::CEIIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiie_0(&self) -> bool {
|
||||
*self == CEIIER::CEIIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceiie_1(&self) -> bool {
|
||||
*self == CEIIER::CEIIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CERDYIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CERDYIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CERDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CERDYIE_1,
|
||||
}
|
||||
impl CERDYIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIER::CERDYIE_0 => false,
|
||||
CERDYIER::CERDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CERDYIER {
|
||||
match value {
|
||||
false => CERDYIER::CERDYIE_0,
|
||||
true => CERDYIER::CERDYIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyie_0(&self) -> bool {
|
||||
*self == CERDYIER::CERDYIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyie_1(&self) -> bool {
|
||||
*self == CERDYIER::CERDYIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIFG`"]
|
||||
pub enum CEIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIFG_1,
|
||||
}
|
||||
impl CEIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIFGW::CEIFG_0 => false,
|
||||
CEIFGW::CEIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceifg_0(self) -> &'a mut W {
|
||||
self.variant(CEIFGW::CEIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceifg_1(self) -> &'a mut W {
|
||||
self.variant(CEIFGW::CEIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIIFG`"]
|
||||
pub enum CEIIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIIFG_1,
|
||||
}
|
||||
impl CEIIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIIFGW::CEIIFG_0 => false,
|
||||
CEIIFGW::CEIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceiifg_0(self) -> &'a mut W {
|
||||
self.variant(CEIIFGW::CEIIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceiifg_1(self) -> &'a mut W {
|
||||
self.variant(CEIIFGW::CEIIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CERDYIFG`"]
|
||||
pub enum CERDYIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CERDYIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CERDYIFG_1,
|
||||
}
|
||||
impl CERDYIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIFGW::CERDYIFG_0 => false,
|
||||
CERDYIFGW::CERDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CERDYIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CERDYIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CERDYIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn cerdyifg_0(self) -> &'a mut W {
|
||||
self.variant(CERDYIFGW::CERDYIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn cerdyifg_1(self) -> &'a mut W {
|
||||
self.variant(CERDYIFGW::CERDYIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIE`"]
|
||||
pub enum CEIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIE_1,
|
||||
}
|
||||
impl CEIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIEW::CEIE_0 => false,
|
||||
CEIEW::CEIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn ceie_0(self) -> &'a mut W {
|
||||
self.variant(CEIEW::CEIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn ceie_1(self) -> &'a mut W {
|
||||
self.variant(CEIEW::CEIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIIE`"]
|
||||
pub enum CEIIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIIE_1,
|
||||
}
|
||||
impl CEIIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIIEW::CEIIE_0 => false,
|
||||
CEIIEW::CEIIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn ceiie_0(self) -> &'a mut W {
|
||||
self.variant(CEIIEW::CEIIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn ceiie_1(self) -> &'a mut W {
|
||||
self.variant(CEIIEW::CEIIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CERDYIE`"]
|
||||
pub enum CERDYIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CERDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CERDYIE_1,
|
||||
}
|
||||
impl CERDYIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIEW::CERDYIE_0 => false,
|
||||
CERDYIEW::CERDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CERDYIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CERDYIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CERDYIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn cerdyie_0(self) -> &'a mut W {
|
||||
self.variant(CERDYIEW::CERDYIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn cerdyie_1(self) -> &'a mut W {
|
||||
self.variant(CERDYIEW::CERDYIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 0 - Comparator output interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceifg(&self) -> CEIFGR {
|
||||
CEIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 1 - Comparator output inverted interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceiifg(&self) -> CEIIFGR {
|
||||
CEIIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 4 - Comparator ready interrupt flag"]
|
||||
#[inline]
|
||||
pub fn cerdyifg(&self) -> CERDYIFGR {
|
||||
CERDYIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 8 - Comparator output interrupt enable"]
|
||||
#[inline]
|
||||
pub fn ceie(&self) -> CEIER {
|
||||
CEIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 9 - Comparator output interrupt enable inverted polarity"]
|
||||
#[inline]
|
||||
pub fn ceiie(&self) -> CEIIER {
|
||||
CEIIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 12 - Comparator ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn cerdyie(&self) -> CERDYIER {
|
||||
CERDYIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 0 - Comparator output interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceifg(&mut self) -> _CEIFGW {
|
||||
_CEIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Comparator output inverted interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceiifg(&mut self) -> _CEIIFGW {
|
||||
_CEIIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - Comparator ready interrupt flag"]
|
||||
#[inline]
|
||||
pub fn cerdyifg(&mut self) -> _CERDYIFGW {
|
||||
_CERDYIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Comparator output interrupt enable"]
|
||||
#[inline]
|
||||
pub fn ceie(&mut self) -> _CEIEW {
|
||||
_CEIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Comparator output interrupt enable inverted polarity"]
|
||||
#[inline]
|
||||
pub fn ceiie(&mut self) -> _CEIIEW {
|
||||
_CEIIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - Comparator ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn cerdyie(&mut self) -> _CERDYIEW {
|
||||
_CERDYIEW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXIV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIV_0,
|
||||
#[doc = "Interrupt Source: CEOUT interrupt; Interrupt Flag: CEIFG; Interrupt Priority: Highest"]
|
||||
CEIV_2,
|
||||
#[doc = "Interrupt Source: CEOUT interrupt inverted polarity; Interrupt Flag: CEIIFG"]
|
||||
CEIV_4,
|
||||
#[doc = "Interrupt Source: Comparator ready interrupt; Interrupt Flag: CERDYIFG; Interrupt Priority: Lowest"]
|
||||
CEIV_10,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u16),
|
||||
}
|
||||
impl CEIVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
match *self {
|
||||
CEIVR::CEIV_0 => 0,
|
||||
CEIVR::CEIV_2 => 2,
|
||||
CEIVR::CEIV_4 => 4,
|
||||
CEIVR::CEIV_10 => 10,
|
||||
CEIVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u16) -> CEIVR {
|
||||
match value {
|
||||
0 => CEIVR::CEIV_0,
|
||||
2 => CEIVR::CEIV_2,
|
||||
4 => CEIVR::CEIV_4,
|
||||
10 => CEIVR::CEIV_10,
|
||||
i => CEIVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_0(&self) -> bool {
|
||||
*self == CEIVR::CEIV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_2(&self) -> bool {
|
||||
*self == CEIVR::CEIV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_4(&self) -> bool {
|
||||
*self == CEIVR::CEIV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_10(&self) -> bool {
|
||||
*self == CEIVR::CEIV_10
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Comparator interrupt vector word register"]
|
||||
#[inline]
|
||||
pub fn ceiv(&self) -> CEIVR {
|
||||
CEIVR::_from({
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Comparator Control Register 0"]
|
||||
pub cex_ctl0: CEXCTL0,
|
||||
#[doc = "0x02 - Comparator Control Register 1"]
|
||||
pub cex_ctl1: CEXCTL1,
|
||||
#[doc = "0x04 - Comparator Control Register 2"]
|
||||
pub cex_ctl2: CEXCTL2,
|
||||
#[doc = "0x06 - Comparator Control Register 3"]
|
||||
pub cex_ctl3: CEXCTL3,
|
||||
_reserved0: [u8; 4usize],
|
||||
#[doc = "0x0c - Comparator Interrupt Control Register"]
|
||||
pub cex_int: CEXINT,
|
||||
#[doc = "0x0e - Comparator Interrupt Vector Word Register"]
|
||||
pub cex_iv: CEXIV,
|
||||
}
|
||||
#[doc = "Comparator Control Register 0"]
|
||||
pub struct CEXCTL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 0"]
|
||||
pub mod cex_ctl0;
|
||||
#[doc = "Comparator Control Register 1"]
|
||||
pub struct CEXCTL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 1"]
|
||||
pub mod cex_ctl1;
|
||||
#[doc = "Comparator Control Register 2"]
|
||||
pub struct CEXCTL2 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 2"]
|
||||
pub mod cex_ctl2;
|
||||
#[doc = "Comparator Control Register 3"]
|
||||
pub struct CEXCTL3 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Control Register 3"]
|
||||
pub mod cex_ctl3;
|
||||
#[doc = "Comparator Interrupt Control Register"]
|
||||
pub struct CEXINT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Interrupt Control Register"]
|
||||
pub mod cex_int;
|
||||
#[doc = "Comparator Interrupt Vector Word Register"]
|
||||
pub struct CEXIV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Comparator Interrupt Vector Word Register"]
|
||||
pub mod cex_iv;
|
|
@ -0,0 +1,982 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXCTL0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIPSEL`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIPSELR {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIPSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIPSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIPSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIPSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIPSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIPSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIPSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIPSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIPSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIPSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIPSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIPSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIPSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIPSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIPSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIPSEL_15,
|
||||
}
|
||||
impl CEIPSELR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIPSELR::CEIPSEL_0 => 0,
|
||||
CEIPSELR::CEIPSEL_1 => 1,
|
||||
CEIPSELR::CEIPSEL_2 => 2,
|
||||
CEIPSELR::CEIPSEL_3 => 3,
|
||||
CEIPSELR::CEIPSEL_4 => 4,
|
||||
CEIPSELR::CEIPSEL_5 => 5,
|
||||
CEIPSELR::CEIPSEL_6 => 6,
|
||||
CEIPSELR::CEIPSEL_7 => 7,
|
||||
CEIPSELR::CEIPSEL_8 => 8,
|
||||
CEIPSELR::CEIPSEL_9 => 9,
|
||||
CEIPSELR::CEIPSEL_10 => 10,
|
||||
CEIPSELR::CEIPSEL_11 => 11,
|
||||
CEIPSELR::CEIPSEL_12 => 12,
|
||||
CEIPSELR::CEIPSEL_13 => 13,
|
||||
CEIPSELR::CEIPSEL_14 => 14,
|
||||
CEIPSELR::CEIPSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CEIPSELR {
|
||||
match value {
|
||||
0 => CEIPSELR::CEIPSEL_0,
|
||||
1 => CEIPSELR::CEIPSEL_1,
|
||||
2 => CEIPSELR::CEIPSEL_2,
|
||||
3 => CEIPSELR::CEIPSEL_3,
|
||||
4 => CEIPSELR::CEIPSEL_4,
|
||||
5 => CEIPSELR::CEIPSEL_5,
|
||||
6 => CEIPSELR::CEIPSEL_6,
|
||||
7 => CEIPSELR::CEIPSEL_7,
|
||||
8 => CEIPSELR::CEIPSEL_8,
|
||||
9 => CEIPSELR::CEIPSEL_9,
|
||||
10 => CEIPSELR::CEIPSEL_10,
|
||||
11 => CEIPSELR::CEIPSEL_11,
|
||||
12 => CEIPSELR::CEIPSEL_12,
|
||||
13 => CEIPSELR::CEIPSEL_13,
|
||||
14 => CEIPSELR::CEIPSEL_14,
|
||||
15 => CEIPSELR::CEIPSEL_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_0(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_1(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_2(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_3`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_3(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_4(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_5`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_5(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_6`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_6(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_7`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_7(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_8`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_8(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_9`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_9(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_10(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_11`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_11(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_12`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_12(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_13`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_13(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_14`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_14(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPSEL_15`"]
|
||||
#[inline]
|
||||
pub fn is_ceipsel_15(&self) -> bool {
|
||||
*self == CEIPSELR::CEIPSEL_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIPEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIPENR {
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
CEIPEN_0,
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
CEIPEN_1,
|
||||
}
|
||||
impl CEIPENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIPENR::CEIPEN_0 => false,
|
||||
CEIPENR::CEIPEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIPENR {
|
||||
match value {
|
||||
false => CEIPENR::CEIPEN_0,
|
||||
true => CEIPENR::CEIPEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceipen_0(&self) -> bool {
|
||||
*self == CEIPENR::CEIPEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIPEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceipen_1(&self) -> bool {
|
||||
*self == CEIPENR::CEIPEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIMSEL`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIMSELR {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIMSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIMSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIMSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIMSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIMSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIMSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIMSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIMSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIMSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIMSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIMSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIMSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIMSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIMSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIMSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIMSEL_15,
|
||||
}
|
||||
impl CEIMSELR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIMSELR::CEIMSEL_0 => 0,
|
||||
CEIMSELR::CEIMSEL_1 => 1,
|
||||
CEIMSELR::CEIMSEL_2 => 2,
|
||||
CEIMSELR::CEIMSEL_3 => 3,
|
||||
CEIMSELR::CEIMSEL_4 => 4,
|
||||
CEIMSELR::CEIMSEL_5 => 5,
|
||||
CEIMSELR::CEIMSEL_6 => 6,
|
||||
CEIMSELR::CEIMSEL_7 => 7,
|
||||
CEIMSELR::CEIMSEL_8 => 8,
|
||||
CEIMSELR::CEIMSEL_9 => 9,
|
||||
CEIMSELR::CEIMSEL_10 => 10,
|
||||
CEIMSELR::CEIMSEL_11 => 11,
|
||||
CEIMSELR::CEIMSEL_12 => 12,
|
||||
CEIMSELR::CEIMSEL_13 => 13,
|
||||
CEIMSELR::CEIMSEL_14 => 14,
|
||||
CEIMSELR::CEIMSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> CEIMSELR {
|
||||
match value {
|
||||
0 => CEIMSELR::CEIMSEL_0,
|
||||
1 => CEIMSELR::CEIMSEL_1,
|
||||
2 => CEIMSELR::CEIMSEL_2,
|
||||
3 => CEIMSELR::CEIMSEL_3,
|
||||
4 => CEIMSELR::CEIMSEL_4,
|
||||
5 => CEIMSELR::CEIMSEL_5,
|
||||
6 => CEIMSELR::CEIMSEL_6,
|
||||
7 => CEIMSELR::CEIMSEL_7,
|
||||
8 => CEIMSELR::CEIMSEL_8,
|
||||
9 => CEIMSELR::CEIMSEL_9,
|
||||
10 => CEIMSELR::CEIMSEL_10,
|
||||
11 => CEIMSELR::CEIMSEL_11,
|
||||
12 => CEIMSELR::CEIMSEL_12,
|
||||
13 => CEIMSELR::CEIMSEL_13,
|
||||
14 => CEIMSELR::CEIMSEL_14,
|
||||
15 => CEIMSELR::CEIMSEL_15,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_0(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_1(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_2(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_3`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_3(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_4(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_5`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_5(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_5
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_6`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_6(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_7`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_7(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_7
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_8`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_8(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_9`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_9(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_9
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_10(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_11`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_11(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_11
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_12`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_12(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_13`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_13(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_13
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_14`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_14(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMSEL_15`"]
|
||||
#[inline]
|
||||
pub fn is_ceimsel_15(&self) -> bool {
|
||||
*self == CEIMSELR::CEIMSEL_15
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIMEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIMENR {
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
CEIMEN_0,
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
CEIMEN_1,
|
||||
}
|
||||
impl CEIMENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIMENR::CEIMEN_0 => false,
|
||||
CEIMENR::CEIMEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIMENR {
|
||||
match value {
|
||||
false => CEIMENR::CEIMEN_0,
|
||||
true => CEIMENR::CEIMEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceimen_0(&self) -> bool {
|
||||
*self == CEIMENR::CEIMEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIMEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceimen_1(&self) -> bool {
|
||||
*self == CEIMENR::CEIMEN_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIPSEL`"]
|
||||
pub enum CEIPSELW {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIPSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIPSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIPSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIPSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIPSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIPSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIPSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIPSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIPSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIPSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIPSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIPSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIPSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIPSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIPSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIPSEL_15,
|
||||
}
|
||||
impl CEIPSELW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIPSELW::CEIPSEL_0 => 0,
|
||||
CEIPSELW::CEIPSEL_1 => 1,
|
||||
CEIPSELW::CEIPSEL_2 => 2,
|
||||
CEIPSELW::CEIPSEL_3 => 3,
|
||||
CEIPSELW::CEIPSEL_4 => 4,
|
||||
CEIPSELW::CEIPSEL_5 => 5,
|
||||
CEIPSELW::CEIPSEL_6 => 6,
|
||||
CEIPSELW::CEIPSEL_7 => 7,
|
||||
CEIPSELW::CEIPSEL_8 => 8,
|
||||
CEIPSELW::CEIPSEL_9 => 9,
|
||||
CEIPSELW::CEIPSEL_10 => 10,
|
||||
CEIPSELW::CEIPSEL_11 => 11,
|
||||
CEIPSELW::CEIPSEL_12 => 12,
|
||||
CEIPSELW::CEIPSEL_13 => 13,
|
||||
CEIPSELW::CEIPSEL_14 => 14,
|
||||
CEIPSELW::CEIPSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIPSELW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIPSELW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIPSELW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Channel 0 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_0(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_0)
|
||||
}
|
||||
#[doc = "Channel 1 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_1(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_1)
|
||||
}
|
||||
#[doc = "Channel 2 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_2(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_2)
|
||||
}
|
||||
#[doc = "Channel 3 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_3(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_3)
|
||||
}
|
||||
#[doc = "Channel 4 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_4(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_4)
|
||||
}
|
||||
#[doc = "Channel 5 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_5(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_5)
|
||||
}
|
||||
#[doc = "Channel 6 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_6(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_6)
|
||||
}
|
||||
#[doc = "Channel 7 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_7(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_7)
|
||||
}
|
||||
#[doc = "Channel 8 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_8(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_8)
|
||||
}
|
||||
#[doc = "Channel 9 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_9(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_9)
|
||||
}
|
||||
#[doc = "Channel 10 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_10(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_10)
|
||||
}
|
||||
#[doc = "Channel 11 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_11(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_11)
|
||||
}
|
||||
#[doc = "Channel 12 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_12(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_12)
|
||||
}
|
||||
#[doc = "Channel 13 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_13(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_13)
|
||||
}
|
||||
#[doc = "Channel 14 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_14(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_14)
|
||||
}
|
||||
#[doc = "Channel 15 selected"]
|
||||
#[inline]
|
||||
pub fn ceipsel_15(self) -> &'a mut W {
|
||||
self.variant(CEIPSELW::CEIPSEL_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIPEN`"]
|
||||
pub enum CEIPENW {
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
CEIPEN_0,
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
CEIPEN_1,
|
||||
}
|
||||
impl CEIPENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIPENW::CEIPEN_0 => false,
|
||||
CEIPENW::CEIPEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIPENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIPENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIPENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Selected analog input channel for V+ terminal is disabled"]
|
||||
#[inline]
|
||||
pub fn ceipen_0(self) -> &'a mut W {
|
||||
self.variant(CEIPENW::CEIPEN_0)
|
||||
}
|
||||
#[doc = "Selected analog input channel for V+ terminal is enabled"]
|
||||
#[inline]
|
||||
pub fn ceipen_1(self) -> &'a mut W {
|
||||
self.variant(CEIPENW::CEIPEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 7;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIMSEL`"]
|
||||
pub enum CEIMSELW {
|
||||
#[doc = "Channel 0 selected"]
|
||||
CEIMSEL_0,
|
||||
#[doc = "Channel 1 selected"]
|
||||
CEIMSEL_1,
|
||||
#[doc = "Channel 2 selected"]
|
||||
CEIMSEL_2,
|
||||
#[doc = "Channel 3 selected"]
|
||||
CEIMSEL_3,
|
||||
#[doc = "Channel 4 selected"]
|
||||
CEIMSEL_4,
|
||||
#[doc = "Channel 5 selected"]
|
||||
CEIMSEL_5,
|
||||
#[doc = "Channel 6 selected"]
|
||||
CEIMSEL_6,
|
||||
#[doc = "Channel 7 selected"]
|
||||
CEIMSEL_7,
|
||||
#[doc = "Channel 8 selected"]
|
||||
CEIMSEL_8,
|
||||
#[doc = "Channel 9 selected"]
|
||||
CEIMSEL_9,
|
||||
#[doc = "Channel 10 selected"]
|
||||
CEIMSEL_10,
|
||||
#[doc = "Channel 11 selected"]
|
||||
CEIMSEL_11,
|
||||
#[doc = "Channel 12 selected"]
|
||||
CEIMSEL_12,
|
||||
#[doc = "Channel 13 selected"]
|
||||
CEIMSEL_13,
|
||||
#[doc = "Channel 14 selected"]
|
||||
CEIMSEL_14,
|
||||
#[doc = "Channel 15 selected"]
|
||||
CEIMSEL_15,
|
||||
}
|
||||
impl CEIMSELW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
CEIMSELW::CEIMSEL_0 => 0,
|
||||
CEIMSELW::CEIMSEL_1 => 1,
|
||||
CEIMSELW::CEIMSEL_2 => 2,
|
||||
CEIMSELW::CEIMSEL_3 => 3,
|
||||
CEIMSELW::CEIMSEL_4 => 4,
|
||||
CEIMSELW::CEIMSEL_5 => 5,
|
||||
CEIMSELW::CEIMSEL_6 => 6,
|
||||
CEIMSELW::CEIMSEL_7 => 7,
|
||||
CEIMSELW::CEIMSEL_8 => 8,
|
||||
CEIMSELW::CEIMSEL_9 => 9,
|
||||
CEIMSELW::CEIMSEL_10 => 10,
|
||||
CEIMSELW::CEIMSEL_11 => 11,
|
||||
CEIMSELW::CEIMSEL_12 => 12,
|
||||
CEIMSELW::CEIMSEL_13 => 13,
|
||||
CEIMSELW::CEIMSEL_14 => 14,
|
||||
CEIMSELW::CEIMSEL_15 => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIMSELW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIMSELW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIMSELW) -> &'a mut W {
|
||||
{
|
||||
self.bits(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Channel 0 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_0(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_0)
|
||||
}
|
||||
#[doc = "Channel 1 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_1(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_1)
|
||||
}
|
||||
#[doc = "Channel 2 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_2(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_2)
|
||||
}
|
||||
#[doc = "Channel 3 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_3(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_3)
|
||||
}
|
||||
#[doc = "Channel 4 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_4(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_4)
|
||||
}
|
||||
#[doc = "Channel 5 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_5(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_5)
|
||||
}
|
||||
#[doc = "Channel 6 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_6(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_6)
|
||||
}
|
||||
#[doc = "Channel 7 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_7(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_7)
|
||||
}
|
||||
#[doc = "Channel 8 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_8(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_8)
|
||||
}
|
||||
#[doc = "Channel 9 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_9(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_9)
|
||||
}
|
||||
#[doc = "Channel 10 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_10(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_10)
|
||||
}
|
||||
#[doc = "Channel 11 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_11(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_11)
|
||||
}
|
||||
#[doc = "Channel 12 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_12(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_12)
|
||||
}
|
||||
#[doc = "Channel 13 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_13(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_13)
|
||||
}
|
||||
#[doc = "Channel 14 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_14(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_14)
|
||||
}
|
||||
#[doc = "Channel 15 selected"]
|
||||
#[inline]
|
||||
pub fn ceimsel_15(self) -> &'a mut W {
|
||||
self.variant(CEIMSELW::CEIMSEL_15)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIMEN`"]
|
||||
pub enum CEIMENW {
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
CEIMEN_0,
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
CEIMEN_1,
|
||||
}
|
||||
impl CEIMENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIMENW::CEIMEN_0 => false,
|
||||
CEIMENW::CEIMEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIMENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIMENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIMENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Selected analog input channel for V- terminal is disabled"]
|
||||
#[inline]
|
||||
pub fn ceimen_0(self) -> &'a mut W {
|
||||
self.variant(CEIMENW::CEIMEN_0)
|
||||
}
|
||||
#[doc = "Selected analog input channel for V- terminal is enabled"]
|
||||
#[inline]
|
||||
pub fn ceimen_1(self) -> &'a mut W {
|
||||
self.variant(CEIMENW::CEIMEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:3 - Channel input selected for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipsel(&self) -> CEIPSELR {
|
||||
CEIPSELR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 7 - Channel input enable for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipen(&self) -> CEIPENR {
|
||||
CEIPENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 7;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 8:11 - Channel input selected for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimsel(&self) -> CEIMSELR {
|
||||
CEIMSELR::_from({
|
||||
const MASK: u8 = 15;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 15 - Channel input enable for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimen(&self) -> CEIMENR {
|
||||
CEIMENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:3 - Channel input selected for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipsel(&mut self) -> _CEIPSELW {
|
||||
_CEIPSELW { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - Channel input enable for the V+ terminal"]
|
||||
#[inline]
|
||||
pub fn ceipen(&mut self) -> _CEIPENW {
|
||||
_CEIPENW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:11 - Channel input selected for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimsel(&mut self) -> _CEIMSELW {
|
||||
_CEIMSELW { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - Channel input enable for the - terminal"]
|
||||
#[inline]
|
||||
pub fn ceimen(&mut self) -> _CEIMENW {
|
||||
_CEIMENW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,778 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXINT {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIFG_1,
|
||||
}
|
||||
impl CEIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIFGR::CEIFG_0 => false,
|
||||
CEIFGR::CEIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIFGR {
|
||||
match value {
|
||||
false => CEIFGR::CEIFG_0,
|
||||
true => CEIFGR::CEIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceifg_0(&self) -> bool {
|
||||
*self == CEIFGR::CEIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceifg_1(&self) -> bool {
|
||||
*self == CEIFGR::CEIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIIFG_1,
|
||||
}
|
||||
impl CEIIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIIFGR::CEIIFG_0 => false,
|
||||
CEIIFGR::CEIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIIFGR {
|
||||
match value {
|
||||
false => CEIIFGR::CEIIFG_0,
|
||||
true => CEIIFGR::CEIIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiifg_0(&self) -> bool {
|
||||
*self == CEIIFGR::CEIIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceiifg_1(&self) -> bool {
|
||||
*self == CEIIFGR::CEIIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CERDYIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CERDYIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CERDYIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CERDYIFG_1,
|
||||
}
|
||||
impl CERDYIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIFGR::CERDYIFG_0 => false,
|
||||
CERDYIFGR::CERDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CERDYIFGR {
|
||||
match value {
|
||||
false => CERDYIFGR::CERDYIFG_0,
|
||||
true => CERDYIFGR::CERDYIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyifg_0(&self) -> bool {
|
||||
*self == CERDYIFGR::CERDYIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyifg_1(&self) -> bool {
|
||||
*self == CERDYIFGR::CERDYIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIE_1,
|
||||
}
|
||||
impl CEIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIER::CEIE_0 => false,
|
||||
CEIER::CEIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIER {
|
||||
match value {
|
||||
false => CEIER::CEIE_0,
|
||||
true => CEIER::CEIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceie_0(&self) -> bool {
|
||||
*self == CEIER::CEIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceie_1(&self) -> bool {
|
||||
*self == CEIER::CEIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIIE_1,
|
||||
}
|
||||
impl CEIIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CEIIER::CEIIE_0 => false,
|
||||
CEIIER::CEIIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CEIIER {
|
||||
match value {
|
||||
false => CEIIER::CEIIE_0,
|
||||
true => CEIIER::CEIIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiie_0(&self) -> bool {
|
||||
*self == CEIIER::CEIIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_ceiie_1(&self) -> bool {
|
||||
*self == CEIIER::CEIIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CERDYIE`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CERDYIER {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CERDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CERDYIE_1,
|
||||
}
|
||||
impl CERDYIER {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIER::CERDYIE_0 => false,
|
||||
CERDYIER::CERDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CERDYIER {
|
||||
match value {
|
||||
false => CERDYIER::CERDYIE_0,
|
||||
true => CERDYIER::CERDYIE_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIE_0`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyie_0(&self) -> bool {
|
||||
*self == CERDYIER::CERDYIE_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CERDYIE_1`"]
|
||||
#[inline]
|
||||
pub fn is_cerdyie_1(&self) -> bool {
|
||||
*self == CERDYIER::CERDYIE_1
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIFG`"]
|
||||
pub enum CEIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIFG_1,
|
||||
}
|
||||
impl CEIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIFGW::CEIFG_0 => false,
|
||||
CEIFGW::CEIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceifg_0(self) -> &'a mut W {
|
||||
self.variant(CEIFGW::CEIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceifg_1(self) -> &'a mut W {
|
||||
self.variant(CEIFGW::CEIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIIFG`"]
|
||||
pub enum CEIIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CEIIFG_1,
|
||||
}
|
||||
impl CEIIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIIFGW::CEIIFG_0 => false,
|
||||
CEIIFGW::CEIIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceiifg_0(self) -> &'a mut W {
|
||||
self.variant(CEIIFGW::CEIIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn ceiifg_1(self) -> &'a mut W {
|
||||
self.variant(CEIIFGW::CEIIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CERDYIFG`"]
|
||||
pub enum CERDYIFGW {
|
||||
#[doc = "No interrupt pending"]
|
||||
CERDYIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
CERDYIFG_1,
|
||||
}
|
||||
impl CERDYIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIFGW::CERDYIFG_0 => false,
|
||||
CERDYIFGW::CERDYIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CERDYIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CERDYIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CERDYIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No interrupt pending"]
|
||||
#[inline]
|
||||
pub fn cerdyifg_0(self) -> &'a mut W {
|
||||
self.variant(CERDYIFGW::CERDYIFG_0)
|
||||
}
|
||||
#[doc = "Interrupt pending"]
|
||||
#[inline]
|
||||
pub fn cerdyifg_1(self) -> &'a mut W {
|
||||
self.variant(CERDYIFGW::CERDYIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIE`"]
|
||||
pub enum CEIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIE_1,
|
||||
}
|
||||
impl CEIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIEW::CEIE_0 => false,
|
||||
CEIEW::CEIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn ceie_0(self) -> &'a mut W {
|
||||
self.variant(CEIEW::CEIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn ceie_1(self) -> &'a mut W {
|
||||
self.variant(CEIEW::CEIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CEIIE`"]
|
||||
pub enum CEIIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CEIIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CEIIE_1,
|
||||
}
|
||||
impl CEIIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CEIIEW::CEIIE_0 => false,
|
||||
CEIIEW::CEIIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CEIIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CEIIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CEIIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn ceiie_0(self) -> &'a mut W {
|
||||
self.variant(CEIIEW::CEIIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn ceiie_1(self) -> &'a mut W {
|
||||
self.variant(CEIIEW::CEIIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CERDYIE`"]
|
||||
pub enum CERDYIEW {
|
||||
#[doc = "Interrupt disabled"]
|
||||
CERDYIE_0,
|
||||
#[doc = "Interrupt enabled"]
|
||||
CERDYIE_1,
|
||||
}
|
||||
impl CERDYIEW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CERDYIEW::CERDYIE_0 => false,
|
||||
CERDYIEW::CERDYIE_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CERDYIEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CERDYIEW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CERDYIEW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt disabled"]
|
||||
#[inline]
|
||||
pub fn cerdyie_0(self) -> &'a mut W {
|
||||
self.variant(CERDYIEW::CERDYIE_0)
|
||||
}
|
||||
#[doc = "Interrupt enabled"]
|
||||
#[inline]
|
||||
pub fn cerdyie_1(self) -> &'a mut W {
|
||||
self.variant(CERDYIEW::CERDYIE_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 0 - Comparator output interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceifg(&self) -> CEIFGR {
|
||||
CEIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 1 - Comparator output inverted interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceiifg(&self) -> CEIIFGR {
|
||||
CEIIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 4 - Comparator ready interrupt flag"]
|
||||
#[inline]
|
||||
pub fn cerdyifg(&self) -> CERDYIFGR {
|
||||
CERDYIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 8 - Comparator output interrupt enable"]
|
||||
#[inline]
|
||||
pub fn ceie(&self) -> CEIER {
|
||||
CEIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 9 - Comparator output interrupt enable inverted polarity"]
|
||||
#[inline]
|
||||
pub fn ceiie(&self) -> CEIIER {
|
||||
CEIIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 12 - Comparator ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn cerdyie(&self) -> CERDYIER {
|
||||
CERDYIER::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
((self.bits >> OFFSET) & MASK as u16) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 0 - Comparator output interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceifg(&mut self) -> _CEIFGW {
|
||||
_CEIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Comparator output inverted interrupt flag"]
|
||||
#[inline]
|
||||
pub fn ceiifg(&mut self) -> _CEIIFGW {
|
||||
_CEIIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - Comparator ready interrupt flag"]
|
||||
#[inline]
|
||||
pub fn cerdyifg(&mut self) -> _CERDYIFGW {
|
||||
_CERDYIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Comparator output interrupt enable"]
|
||||
#[inline]
|
||||
pub fn ceie(&mut self) -> _CEIEW {
|
||||
_CEIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Comparator output interrupt enable inverted polarity"]
|
||||
#[inline]
|
||||
pub fn ceiie(&mut self) -> _CEIIEW {
|
||||
_CEIIEW { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - Comparator ready interrupt enable"]
|
||||
#[inline]
|
||||
pub fn cerdyie(&mut self) -> _CERDYIEW {
|
||||
_CERDYIEW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CEXIV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CEIV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CEIVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
CEIV_0,
|
||||
#[doc = "Interrupt Source: CEOUT interrupt; Interrupt Flag: CEIFG; Interrupt Priority: Highest"]
|
||||
CEIV_2,
|
||||
#[doc = "Interrupt Source: CEOUT interrupt inverted polarity; Interrupt Flag: CEIIFG"]
|
||||
CEIV_4,
|
||||
#[doc = "Interrupt Source: Comparator ready interrupt; Interrupt Flag: CERDYIFG; Interrupt Priority: Lowest"]
|
||||
CEIV_10,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u16),
|
||||
}
|
||||
impl CEIVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
match *self {
|
||||
CEIVR::CEIV_0 => 0,
|
||||
CEIVR::CEIV_2 => 2,
|
||||
CEIVR::CEIV_4 => 4,
|
||||
CEIVR::CEIV_10 => 10,
|
||||
CEIVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u16) -> CEIVR {
|
||||
match value {
|
||||
0 => CEIVR::CEIV_0,
|
||||
2 => CEIVR::CEIV_2,
|
||||
4 => CEIVR::CEIV_4,
|
||||
10 => CEIVR::CEIV_10,
|
||||
i => CEIVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_0`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_0(&self) -> bool {
|
||||
*self == CEIVR::CEIV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_2`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_2(&self) -> bool {
|
||||
*self == CEIVR::CEIV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_4`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_4(&self) -> bool {
|
||||
*self == CEIVR::CEIV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CEIV_10`"]
|
||||
#[inline]
|
||||
pub fn is_ceiv_10(&self) -> bool {
|
||||
*self == CEIVR::CEIV_10
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Comparator interrupt vector word register"]
|
||||
#[inline]
|
||||
pub fn ceiv(&self) -> CEIVR {
|
||||
CEIVR::_from({
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Data Input for CRC32 Signature Computation"]
|
||||
pub crc32di: CRC32DI,
|
||||
_reserved0: [u8; 2usize],
|
||||
#[doc = "0x04 - Data In Reverse for CRC32 Computation"]
|
||||
pub crc32dirb: CRC32DIRB,
|
||||
_reserved1: [u8; 2usize],
|
||||
#[doc = "0x08 - CRC32 Initialization and Result, lower 16 bits"]
|
||||
pub crc32inires_lo: CRC32INIRES_LO,
|
||||
#[doc = "0x0a - CRC32 Initialization and Result, upper 16 bits"]
|
||||
pub crc32inires_hi: CRC32INIRES_HI,
|
||||
#[doc = "0x0c - CRC32 Result Reverse, lower 16 bits"]
|
||||
pub crc32resr_lo: CRC32RESR_LO,
|
||||
#[doc = "0x0e - CRC32 Result Reverse, Upper 16 bits"]
|
||||
pub crc32resr_hi: CRC32RESR_HI,
|
||||
#[doc = "0x10 - Data Input for CRC16 computation"]
|
||||
pub crc16di: CRC16DI,
|
||||
_reserved2: [u8; 2usize],
|
||||
#[doc = "0x14 - CRC16 Data In Reverse"]
|
||||
pub crc16dirb: CRC16DIRB,
|
||||
_reserved3: [u8; 2usize],
|
||||
#[doc = "0x18 - CRC16 Initialization and Result register"]
|
||||
pub crc16inires: CRC16INIRES,
|
||||
_reserved4: [u8; 4usize],
|
||||
#[doc = "0x1e - CRC16 Result Reverse"]
|
||||
pub crc16resr: CRC16RESR,
|
||||
}
|
||||
#[doc = "Data Input for CRC32 Signature Computation"]
|
||||
pub struct CRC32DI {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Data Input for CRC32 Signature Computation"]
|
||||
pub mod crc32di;
|
||||
#[doc = "Data In Reverse for CRC32 Computation"]
|
||||
pub struct CRC32DIRB {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Data In Reverse for CRC32 Computation"]
|
||||
pub mod crc32dirb;
|
||||
#[doc = "CRC32 Initialization and Result, lower 16 bits"]
|
||||
pub struct CRC32INIRES_LO {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC32 Initialization and Result, lower 16 bits"]
|
||||
pub mod crc32inires_lo;
|
||||
#[doc = "CRC32 Initialization and Result, upper 16 bits"]
|
||||
pub struct CRC32INIRES_HI {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC32 Initialization and Result, upper 16 bits"]
|
||||
pub mod crc32inires_hi;
|
||||
#[doc = "CRC32 Result Reverse, lower 16 bits"]
|
||||
pub struct CRC32RESR_LO {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC32 Result Reverse, lower 16 bits"]
|
||||
pub mod crc32resr_lo;
|
||||
#[doc = "CRC32 Result Reverse, Upper 16 bits"]
|
||||
pub struct CRC32RESR_HI {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC32 Result Reverse, Upper 16 bits"]
|
||||
pub mod crc32resr_hi;
|
||||
#[doc = "Data Input for CRC16 computation"]
|
||||
pub struct CRC16DI {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Data Input for CRC16 computation"]
|
||||
pub mod crc16di;
|
||||
#[doc = "CRC16 Data In Reverse"]
|
||||
pub struct CRC16DIRB {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC16 Data In Reverse"]
|
||||
pub mod crc16dirb;
|
||||
#[doc = "CRC16 Initialization and Result register"]
|
||||
pub struct CRC16INIRES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC16 Initialization and Result register"]
|
||||
pub mod crc16inires;
|
||||
#[doc = "CRC16 Result Reverse"]
|
||||
pub struct CRC16RESR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "CRC16 Result Reverse"]
|
||||
pub mod crc16resr;
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC16DI {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC16DIR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC16DIR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC16DIW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC16DIW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 data in"]
|
||||
#[inline]
|
||||
pub fn crc16di(&self) -> CRC16DIR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC16DIR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 data in"]
|
||||
#[inline]
|
||||
pub fn crc16di(&mut self) -> _CRC16DIW {
|
||||
_CRC16DIW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC16DIRB {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC16DIRBR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC16DIRBR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC16DIRBW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC16DIRBW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 data in reverse byte"]
|
||||
#[inline]
|
||||
pub fn crc16dirb(&self) -> CRC16DIRBR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC16DIRBR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 data in reverse byte"]
|
||||
#[inline]
|
||||
pub fn crc16dirb(&mut self) -> _CRC16DIRBW {
|
||||
_CRC16DIRBW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC16INIRES {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC16INIRESR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC16INIRESR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC16INIRESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC16INIRESW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 initialization and result"]
|
||||
#[inline]
|
||||
pub fn crc16inires(&self) -> CRC16INIRESR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC16INIRESR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 65535 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 initialization and result"]
|
||||
#[inline]
|
||||
pub fn crc16inires(&mut self) -> _CRC16INIRESW {
|
||||
_CRC16INIRESW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC16RESR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC16RESRR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC16RESRR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC16RESRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC16RESRW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 reverse result"]
|
||||
#[inline]
|
||||
pub fn crc16resr(&self) -> CRC16RESRR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC16RESRR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 65535 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC16 reverse result"]
|
||||
#[inline]
|
||||
pub fn crc16resr(&mut self) -> _CRC16RESRW {
|
||||
_CRC16RESRW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32DI {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32DIR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32DIR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32DIW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32DIW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Data input register"]
|
||||
#[inline]
|
||||
pub fn crc32di(&self) -> CRC32DIR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32DIR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Data input register"]
|
||||
#[inline]
|
||||
pub fn crc32di(&mut self) -> _CRC32DIW {
|
||||
_CRC32DIW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32DIRB {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32DIRBR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32DIRBR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32DIRBW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32DIRBW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Data input register reversed"]
|
||||
#[inline]
|
||||
pub fn crc32dirb(&self) -> CRC32DIRBR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32DIRBR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Data input register reversed"]
|
||||
#[inline]
|
||||
pub fn crc32dirb(&mut self) -> _CRC32DIRBW {
|
||||
_CRC32DIRBW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32INIRES_HI {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32INIRES_HIR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32INIRES_HIR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32INIRES_HIW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32INIRES_HIW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 initialization and result, upper 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32inires_hi(&self) -> CRC32INIRES_HIR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32INIRES_HIR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 initialization and result, upper 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32inires_hi(&mut self) -> _CRC32INIRES_HIW {
|
||||
_CRC32INIRES_HIW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32INIRES_LO {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32INIRES_LOR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32INIRES_LOR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32INIRES_LOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32INIRES_LOW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 initialization and result, lower 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32inires_lo(&self) -> CRC32INIRES_LOR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32INIRES_LOR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 initialization and result, lower 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32inires_lo(&mut self) -> _CRC32INIRES_LOW {
|
||||
_CRC32INIRES_LOW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32RESR_HI {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32RESR_HIR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32RESR_HIR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32RESR_HIW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32RESR_HIW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 reverse result, upper 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32resr_hi(&self) -> CRC32RESR_HIR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32RESR_HIR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 65535 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 reverse result, upper 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32resr_hi(&mut self) -> _CRC32RESR_HIW {
|
||||
_CRC32RESR_HIW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::CRC32RESR_LO {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CRC32RESR_LOR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CRC32RESR_LOR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CRC32RESR_LOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CRC32RESR_LOW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 reverse result, lower 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32resr_lo(&self) -> CRC32RESR_LOR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u16
|
||||
};
|
||||
CRC32RESR_LOR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 65535 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - CRC32 reverse result, lower 16 bits"]
|
||||
#[inline]
|
||||
pub fn crc32resr_lo(&mut self) -> _CRC32RESR_LOW {
|
||||
_CRC32RESR_LOW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Key Register"]
|
||||
pub cskey: CSKEY,
|
||||
#[doc = "0x04 - Control 0 Register"]
|
||||
pub csctl0: CSCTL0,
|
||||
#[doc = "0x08 - Control 1 Register"]
|
||||
pub csctl1: CSCTL1,
|
||||
#[doc = "0x0c - Control 2 Register"]
|
||||
pub csctl2: CSCTL2,
|
||||
#[doc = "0x10 - Control 3 Register"]
|
||||
pub csctl3: CSCTL3,
|
||||
_reserved0: [u8; 28usize],
|
||||
#[doc = "0x30 - Clock Enable Register"]
|
||||
pub csclken: CSCLKEN,
|
||||
#[doc = "0x34 - Status Register"]
|
||||
pub csstat: CSSTAT,
|
||||
_reserved1: [u8; 8usize],
|
||||
#[doc = "0x40 - Interrupt Enable Register"]
|
||||
pub csie: CSIE,
|
||||
_reserved2: [u8; 4usize],
|
||||
#[doc = "0x48 - Interrupt Flag Register"]
|
||||
pub csifg: CSIFG,
|
||||
_reserved3: [u8; 4usize],
|
||||
#[doc = "0x50 - Clear Interrupt Flag Register"]
|
||||
pub csclrifg: CSCLRIFG,
|
||||
_reserved4: [u8; 4usize],
|
||||
#[doc = "0x58 - Set Interrupt Flag Register"]
|
||||
pub cssetifg: CSSETIFG,
|
||||
_reserved5: [u8; 4usize],
|
||||
#[doc = "0x60 - DCO External Resistor Cailbration 0 Register"]
|
||||
pub csdcoercal0: CSDCOERCAL0,
|
||||
#[doc = "0x64 - DCO External Resistor Calibration 1 Register"]
|
||||
pub csdcoercal1: CSDCOERCAL1,
|
||||
}
|
||||
#[doc = "Key Register"]
|
||||
pub struct CSKEY {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Key Register"]
|
||||
pub mod cskey;
|
||||
#[doc = "Control 0 Register"]
|
||||
pub struct CSCTL0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 0 Register"]
|
||||
pub mod csctl0;
|
||||
#[doc = "Control 1 Register"]
|
||||
pub struct CSCTL1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 1 Register"]
|
||||
pub mod csctl1;
|
||||
#[doc = "Control 2 Register"]
|
||||
pub struct CSCTL2 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 2 Register"]
|
||||
pub mod csctl2;
|
||||
#[doc = "Control 3 Register"]
|
||||
pub struct CSCTL3 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Control 3 Register"]
|
||||
pub mod csctl3;
|
||||
#[doc = "Clock Enable Register"]
|
||||
pub struct CSCLKEN {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Clock Enable Register"]
|
||||
pub mod csclken;
|
||||
#[doc = "Status Register"]
|
||||
pub struct CSSTAT {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Status Register"]
|
||||
pub mod csstat;
|
||||
#[doc = "Interrupt Enable Register"]
|
||||
pub struct CSIE {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Enable Register"]
|
||||
pub mod csie;
|
||||
#[doc = "Interrupt Flag Register"]
|
||||
pub struct CSIFG {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Interrupt Flag Register"]
|
||||
pub mod csifg;
|
||||
#[doc = "Clear Interrupt Flag Register"]
|
||||
pub struct CSCLRIFG {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Clear Interrupt Flag Register"]
|
||||
pub mod csclrifg;
|
||||
#[doc = "Set Interrupt Flag Register"]
|
||||
pub struct CSSETIFG {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "Set Interrupt Flag Register"]
|
||||
pub mod cssetifg;
|
||||
#[doc = "DCO External Resistor Cailbration 0 Register"]
|
||||
pub struct CSDCOERCAL0 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "DCO External Resistor Cailbration 0 Register"]
|
||||
pub mod csdcoercal0;
|
||||
#[doc = "DCO External Resistor Calibration 1 Register"]
|
||||
pub struct CSDCOERCAL1 {
|
||||
register: ::vcell::VolatileCell<u32>,
|
||||
}
|
||||
#[doc = "DCO External Resistor Calibration 1 Register"]
|
||||
pub mod csdcoercal1;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,722 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSCLRIFG {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_LFXTIFG`"]
|
||||
pub enum CLR_LFXTIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_LFXTIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_LFXTIFG_1,
|
||||
}
|
||||
impl CLR_LFXTIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_LFXTIFGW::CLR_LFXTIFG_0 => false,
|
||||
CLR_LFXTIFGW::CLR_LFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_LFXTIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_LFXTIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_LFXTIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_lfxtifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_LFXTIFGW::CLR_LFXTIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_lfxtifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_LFXTIFGW::CLR_LFXTIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_HFXTIFG`"]
|
||||
pub enum CLR_HFXTIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_HFXTIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_HFXTIFG_1,
|
||||
}
|
||||
impl CLR_HFXTIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_HFXTIFGW::CLR_HFXTIFG_0 => false,
|
||||
CLR_HFXTIFGW::CLR_HFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_HFXTIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_HFXTIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_HFXTIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_hfxtifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_HFXTIFGW::CLR_HFXTIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_hfxtifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_HFXTIFGW::CLR_HFXTIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_HFXT2IFG`"]
|
||||
pub enum CLR_HFXT2IFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_HFXT2IFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_HFXT2IFG_1,
|
||||
}
|
||||
impl CLR_HFXT2IFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_HFXT2IFGW::CLR_HFXT2IFG_0 => false,
|
||||
CLR_HFXT2IFGW::CLR_HFXT2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_HFXT2IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_HFXT2IFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_HFXT2IFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_hfxt2ifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_HFXT2IFGW::CLR_HFXT2IFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_hfxt2ifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_HFXT2IFGW::CLR_HFXT2IFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_DCOR_OPNIFG`"]
|
||||
pub enum CLR_DCOR_OPNIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_DCOR_OPNIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_DCOR_OPNIFG_1,
|
||||
}
|
||||
impl CLR_DCOR_OPNIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_DCOR_OPNIFGW::CLR_DCOR_OPNIFG_0 => false,
|
||||
CLR_DCOR_OPNIFGW::CLR_DCOR_OPNIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_DCOR_OPNIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_DCOR_OPNIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_DCOR_OPNIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_dcor_opnifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_DCOR_OPNIFGW::CLR_DCOR_OPNIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_dcor_opnifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_DCOR_OPNIFGW::CLR_DCOR_OPNIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_CALIFG`"]
|
||||
pub enum CLR_CALIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_CALIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_CALIFG_1,
|
||||
}
|
||||
impl CLR_CALIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_CALIFGW::CLR_CALIFG_0 => false,
|
||||
CLR_CALIFGW::CLR_CALIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_CALIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_CALIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_CALIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_califg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_CALIFGW::CLR_CALIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_califg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_CALIFGW::CLR_CALIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_FCNTLFIFG`"]
|
||||
pub enum CLR_FCNTLFIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_FCNTLFIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_FCNTLFIFG_1,
|
||||
}
|
||||
impl CLR_FCNTLFIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_FCNTLFIFGW::CLR_FCNTLFIFG_0 => false,
|
||||
CLR_FCNTLFIFGW::CLR_FCNTLFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_FCNTLFIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_FCNTLFIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_FCNTLFIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_fcntlfifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTLFIFGW::CLR_FCNTLFIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_fcntlfifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTLFIFGW::CLR_FCNTLFIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_FCNTHFIFG`"]
|
||||
pub enum CLR_FCNTHFIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_FCNTHFIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_FCNTHFIFG_1,
|
||||
}
|
||||
impl CLR_FCNTHFIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_FCNTHFIFGW::CLR_FCNTHFIFG_0 => false,
|
||||
CLR_FCNTHFIFGW::CLR_FCNTHFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_FCNTHFIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_FCNTHFIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_FCNTHFIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthfifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTHFIFGW::CLR_FCNTHFIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthfifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTHFIFGW::CLR_FCNTHFIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_FCNTHF2IFG`"]
|
||||
pub enum CLR_FCNTHF2IFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_FCNTHF2IFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_FCNTHF2IFG_1,
|
||||
}
|
||||
impl CLR_FCNTHF2IFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_FCNTHF2IFGW::CLR_FCNTHF2IFG_0 => false,
|
||||
CLR_FCNTHF2IFGW::CLR_FCNTHF2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_FCNTHF2IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_FCNTHF2IFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_FCNTHF2IFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthf2ifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTHF2IFGW::CLR_FCNTHF2IFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthf2ifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_FCNTHF2IFGW::CLR_FCNTHF2IFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 10;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_PLLOOLIFG`"]
|
||||
pub enum CLR_PLLOOLIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_PLLOOLIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_PLLOOLIFG_1,
|
||||
}
|
||||
impl CLR_PLLOOLIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_PLLOOLIFGW::CLR_PLLOOLIFG_0 => false,
|
||||
CLR_PLLOOLIFGW::CLR_PLLOOLIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_PLLOOLIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_PLLOOLIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_PLLOOLIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_plloolifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLOOLIFGW::CLR_PLLOOLIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plloolifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLOOLIFGW::CLR_PLLOOLIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_PLLLOSIFG`"]
|
||||
pub enum CLR_PLLLOSIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_PLLLOSIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_PLLLOSIFG_1,
|
||||
}
|
||||
impl CLR_PLLLOSIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_PLLLOSIFGW::CLR_PLLLOSIFG_0 => false,
|
||||
CLR_PLLLOSIFGW::CLR_PLLLOSIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_PLLLOSIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_PLLLOSIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_PLLLOSIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_plllosifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLLOSIFGW::CLR_PLLLOSIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plllosifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLLOSIFGW::CLR_PLLLOSIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 13;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `CLR_PLLOORIFG`"]
|
||||
pub enum CLR_PLLOORIFGW {
|
||||
#[doc = "No effect"]
|
||||
CLR_PLLOORIFG_0,
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
CLR_PLLOORIFG_1,
|
||||
}
|
||||
impl CLR_PLLOORIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
CLR_PLLOORIFGW::CLR_PLLOORIFG_0 => false,
|
||||
CLR_PLLOORIFGW::CLR_PLLOORIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CLR_PLLOORIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CLR_PLLOORIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: CLR_PLLOORIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn clr_plloorifg_0(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLOORIFGW::CLR_PLLOORIFG_0)
|
||||
}
|
||||
#[doc = "Clear pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plloorifg_1(self) -> &'a mut W {
|
||||
self.variant(CLR_PLLOORIFGW::CLR_PLLOORIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 14;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 0 - Clear LFXT oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_lfxtifg(&mut self) -> _CLR_LFXTIFGW {
|
||||
_CLR_LFXTIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Clear HFXT oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_hfxtifg(&mut self) -> _CLR_HFXTIFGW {
|
||||
_CLR_HFXTIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Clear HFXT2 oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_hfxt2ifg(&mut self) -> _CLR_HFXT2IFGW {
|
||||
_CLR_HFXT2IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Clear DCO external resistor open circuit fault interrupt flag."]
|
||||
#[inline]
|
||||
pub fn clr_dcor_opnifg(&mut self) -> _CLR_DCOR_OPNIFGW {
|
||||
_CLR_DCOR_OPNIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - REFCNT period counter clear interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_califg(&mut self) -> _CLR_CALIFGW {
|
||||
_CLR_CALIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Start fault counter clear interrupt flag LFXT"]
|
||||
#[inline]
|
||||
pub fn clr_fcntlfifg(&mut self) -> _CLR_FCNTLFIFGW {
|
||||
_CLR_FCNTLFIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Start fault counter clear interrupt flag HFXT"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthfifg(&mut self) -> _CLR_FCNTHFIFGW {
|
||||
_CLR_FCNTHFIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - Start fault counter clear interrupt flag HFXT2"]
|
||||
#[inline]
|
||||
pub fn clr_fcnthf2ifg(&mut self) -> _CLR_FCNTHF2IFGW {
|
||||
_CLR_FCNTHF2IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - PLL out-of-lock clear interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plloolifg(&mut self) -> _CLR_PLLOOLIFGW {
|
||||
_CLR_PLLOOLIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - PLL loss-of-signal clear interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plllosifg(&mut self) -> _CLR_PLLLOSIFGW {
|
||||
_CLR_PLLLOSIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - PLL out-of-range clear interrupt flag"]
|
||||
#[inline]
|
||||
pub fn clr_plloorifg(&mut self) -> _CLR_PLLOORIFGW {
|
||||
_CLR_PLLOORIFGW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,514 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSCTL0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct DCOTUNER {
|
||||
bits: u16,
|
||||
}
|
||||
impl DCOTUNER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `DCORSEL`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCORSELR {
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 1 to 2"]
|
||||
DCORSEL_0,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 2 to 4"]
|
||||
DCORSEL_1,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 4 to 8"]
|
||||
DCORSEL_2,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 8 to 16"]
|
||||
DCORSEL_3,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 16 to 32"]
|
||||
DCORSEL_4,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 32 to 64"]
|
||||
DCORSEL_5,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl DCORSELR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
DCORSELR::DCORSEL_0 => 0,
|
||||
DCORSELR::DCORSEL_1 => 1,
|
||||
DCORSELR::DCORSEL_2 => 2,
|
||||
DCORSELR::DCORSEL_3 => 3,
|
||||
DCORSELR::DCORSEL_4 => 4,
|
||||
DCORSELR::DCORSEL_5 => 5,
|
||||
DCORSELR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> DCORSELR {
|
||||
match value {
|
||||
0 => DCORSELR::DCORSEL_0,
|
||||
1 => DCORSELR::DCORSEL_1,
|
||||
2 => DCORSELR::DCORSEL_2,
|
||||
3 => DCORSELR::DCORSEL_3,
|
||||
4 => DCORSELR::DCORSEL_4,
|
||||
5 => DCORSELR::DCORSEL_5,
|
||||
i => DCORSELR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_0`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_0(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_1`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_1(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_1
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_2`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_2(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_3`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_3(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_3
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_4`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_4(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORSEL_5`"]
|
||||
#[inline]
|
||||
pub fn is_dcorsel_5(&self) -> bool {
|
||||
*self == DCORSELR::DCORSEL_5
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `DCORES`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCORESR {
|
||||
#[doc = "Internal resistor mode"]
|
||||
DCORES_0,
|
||||
#[doc = "External resistor mode"]
|
||||
DCORES_1,
|
||||
}
|
||||
impl DCORESR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
DCORESR::DCORES_0 => false,
|
||||
DCORESR::DCORES_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> DCORESR {
|
||||
match value {
|
||||
false => DCORESR::DCORES_0,
|
||||
true => DCORESR::DCORES_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORES_0`"]
|
||||
#[inline]
|
||||
pub fn is_dcores_0(&self) -> bool {
|
||||
*self == DCORESR::DCORES_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCORES_1`"]
|
||||
#[inline]
|
||||
pub fn is_dcores_1(&self) -> bool {
|
||||
*self == DCORESR::DCORES_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `DCOEN`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCOENR {
|
||||
#[doc = "DCO is on if it is used as a source for MCLK, HSMCLK , or SMCLK and clock is requested, otherwise it is disabled."]
|
||||
DCOEN_0,
|
||||
#[doc = "DCO is on"]
|
||||
DCOEN_1,
|
||||
}
|
||||
impl DCOENR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
DCOENR::DCOEN_0 => false,
|
||||
DCOENR::DCOEN_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> DCOENR {
|
||||
match value {
|
||||
false => DCOENR::DCOEN_0,
|
||||
true => DCOENR::DCOEN_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOEN_0`"]
|
||||
#[inline]
|
||||
pub fn is_dcoen_0(&self) -> bool {
|
||||
*self == DCOENR::DCOEN_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOEN_1`"]
|
||||
#[inline]
|
||||
pub fn is_dcoen_1(&self) -> bool {
|
||||
*self == DCOENR::DCOEN_1
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCOTUNEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCOTUNEW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `DCORSEL`"]
|
||||
pub enum DCORSELW {
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 1 to 2"]
|
||||
DCORSEL_0,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 2 to 4"]
|
||||
DCORSEL_1,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 4 to 8"]
|
||||
DCORSEL_2,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 8 to 16"]
|
||||
DCORSEL_3,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 16 to 32"]
|
||||
DCORSEL_4,
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 32 to 64"]
|
||||
DCORSEL_5,
|
||||
}
|
||||
impl DCORSELW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> u8 {
|
||||
match *self {
|
||||
DCORSELW::DCORSEL_0 => 0,
|
||||
DCORSELW::DCORSEL_1 => 1,
|
||||
DCORSELW::DCORSEL_2 => 2,
|
||||
DCORSELW::DCORSEL_3 => 3,
|
||||
DCORSELW::DCORSEL_4 => 4,
|
||||
DCORSELW::DCORSEL_5 => 5,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCORSELW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCORSELW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: DCORSELW) -> &'a mut W {
|
||||
unsafe { self.bits(variant._bits()) }
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 1 to 2"]
|
||||
#[inline]
|
||||
pub fn dcorsel_0(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_0)
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 2 to 4"]
|
||||
#[inline]
|
||||
pub fn dcorsel_1(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_1)
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 4 to 8"]
|
||||
#[inline]
|
||||
pub fn dcorsel_2(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_2)
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 8 to 16"]
|
||||
#[inline]
|
||||
pub fn dcorsel_3(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_3)
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 16 to 32"]
|
||||
#[inline]
|
||||
pub fn dcorsel_4(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_4)
|
||||
}
|
||||
#[doc = "Nominal DCO Frequency Range (MHz): 32 to 64"]
|
||||
#[inline]
|
||||
pub fn dcorsel_5(self) -> &'a mut W {
|
||||
self.variant(DCORSELW::DCORSEL_5)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 16;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `DCORES`"]
|
||||
pub enum DCORESW {
|
||||
#[doc = "Internal resistor mode"]
|
||||
DCORES_0,
|
||||
#[doc = "External resistor mode"]
|
||||
DCORES_1,
|
||||
}
|
||||
impl DCORESW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
DCORESW::DCORES_0 => false,
|
||||
DCORESW::DCORES_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCORESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCORESW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: DCORESW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Internal resistor mode"]
|
||||
#[inline]
|
||||
pub fn dcores_0(self) -> &'a mut W {
|
||||
self.variant(DCORESW::DCORES_0)
|
||||
}
|
||||
#[doc = "External resistor mode"]
|
||||
#[inline]
|
||||
pub fn dcores_1(self) -> &'a mut W {
|
||||
self.variant(DCORESW::DCORES_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 22;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `DCOEN`"]
|
||||
pub enum DCOENW {
|
||||
#[doc = "DCO is on if it is used as a source for MCLK, HSMCLK , or SMCLK and clock is requested, otherwise it is disabled."]
|
||||
DCOEN_0,
|
||||
#[doc = "DCO is on"]
|
||||
DCOEN_1,
|
||||
}
|
||||
impl DCOENW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
DCOENW::DCOEN_0 => false,
|
||||
DCOENW::DCOEN_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCOENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCOENW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: DCOENW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "DCO is on if it is used as a source for MCLK, HSMCLK , or SMCLK and clock is requested, otherwise it is disabled."]
|
||||
#[inline]
|
||||
pub fn dcoen_0(self) -> &'a mut W {
|
||||
self.variant(DCOENW::DCOEN_0)
|
||||
}
|
||||
#[doc = "DCO is on"]
|
||||
#[inline]
|
||||
pub fn dcoen_1(self) -> &'a mut W {
|
||||
self.variant(DCOENW::DCOEN_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 23;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:9 - DCO frequency tuning select"]
|
||||
#[inline]
|
||||
pub fn dcotune(&self) -> DCOTUNER {
|
||||
let bits = {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
DCOTUNER { bits }
|
||||
}
|
||||
#[doc = "Bits 16:18 - DCO frequency range select"]
|
||||
#[inline]
|
||||
pub fn dcorsel(&self) -> DCORSELR {
|
||||
DCORSELR::_from({
|
||||
const MASK: u8 = 7;
|
||||
const OFFSET: u8 = 16;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u8
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 22 - Enables the DCO external resistor mode"]
|
||||
#[inline]
|
||||
pub fn dcores(&self) -> DCORESR {
|
||||
DCORESR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 22;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 23 - Enables the DCO oscillator"]
|
||||
#[inline]
|
||||
pub fn dcoen(&self) -> DCOENR {
|
||||
DCOENR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 23;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 65536 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:9 - DCO frequency tuning select"]
|
||||
#[inline]
|
||||
pub fn dcotune(&mut self) -> _DCOTUNEW {
|
||||
_DCOTUNEW { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:18 - DCO frequency range select"]
|
||||
#[inline]
|
||||
pub fn dcorsel(&mut self) -> _DCORSELW {
|
||||
_DCORSELW { w: self }
|
||||
}
|
||||
#[doc = "Bit 22 - Enables the DCO external resistor mode"]
|
||||
#[inline]
|
||||
pub fn dcores(&mut self) -> _DCORESW {
|
||||
_DCORESW { w: self }
|
||||
}
|
||||
#[doc = "Bit 23 - Enables the DCO oscillator"]
|
||||
#[inline]
|
||||
pub fn dcoen(&mut self) -> _DCOENW {
|
||||
_DCOENW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSDCOERCAL0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct DCO_TCCALR {
|
||||
bits: u8,
|
||||
}
|
||||
impl DCO_TCCALR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct DCO_FCAL_RSEL04R {
|
||||
bits: u16,
|
||||
}
|
||||
impl DCO_FCAL_RSEL04R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCO_TCCALW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCO_TCCALW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 3;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCO_FCAL_RSEL04W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCO_FCAL_RSEL04W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 16;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:1 - DCO Temperature compensation calibration"]
|
||||
#[inline]
|
||||
pub fn dco_tccal(&self) -> DCO_TCCALR {
|
||||
let bits = {
|
||||
const MASK: u8 = 3;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u8
|
||||
};
|
||||
DCO_TCCALR { bits }
|
||||
}
|
||||
#[doc = "Bits 16:25 - DCO frequency calibration for DCO frequency range (DCORSEL) 0 to 4."]
|
||||
#[inline]
|
||||
pub fn dco_fcal_rsel04(&self) -> DCO_FCAL_RSEL04R {
|
||||
let bits = {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 16;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
DCO_FCAL_RSEL04R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 16777216 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:1 - DCO Temperature compensation calibration"]
|
||||
#[inline]
|
||||
pub fn dco_tccal(&mut self) -> _DCO_TCCALW {
|
||||
_DCO_TCCALW { w: self }
|
||||
}
|
||||
#[doc = "Bits 16:25 - DCO frequency calibration for DCO frequency range (DCORSEL) 0 to 4."]
|
||||
#[inline]
|
||||
pub fn dco_fcal_rsel04(&mut self) -> _DCO_FCAL_RSEL04W {
|
||||
_DCO_FCAL_RSEL04W { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSDCOERCAL1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct DCO_FCAL_RSEL5R {
|
||||
bits: u16,
|
||||
}
|
||||
impl DCO_FCAL_RSEL5R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _DCO_FCAL_RSEL5W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _DCO_FCAL_RSEL5W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:9 - DCO frequency calibration for DCO frequency range (DCORSEL) 5."]
|
||||
#[inline]
|
||||
pub fn dco_fcal_rsel5(&self) -> DCO_FCAL_RSEL5R {
|
||||
let bits = {
|
||||
const MASK: u16 = 1023;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
DCO_FCAL_RSEL5R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 256 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:9 - DCO frequency calibration for DCO frequency range (DCORSEL) 5."]
|
||||
#[inline]
|
||||
pub fn dco_fcal_rsel5(&mut self) -> _DCO_FCAL_RSEL5W {
|
||||
_DCO_FCAL_RSEL5W { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,692 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSIFG {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `LFXTIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LFXTIFGR {
|
||||
#[doc = "No fault condition occurred after the last reset"]
|
||||
LFXTIFG_0,
|
||||
#[doc = "LFXT fault. A LFXT fault occurred after the last reset"]
|
||||
LFXTIFG_1,
|
||||
}
|
||||
impl LFXTIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
LFXTIFGR::LFXTIFG_0 => false,
|
||||
LFXTIFGR::LFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> LFXTIFGR {
|
||||
match value {
|
||||
false => LFXTIFGR::LFXTIFG_0,
|
||||
true => LFXTIFGR::LFXTIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `LFXTIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_lfxtifg_0(&self) -> bool {
|
||||
*self == LFXTIFGR::LFXTIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `LFXTIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_lfxtifg_1(&self) -> bool {
|
||||
*self == LFXTIFGR::LFXTIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `HFXTIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFXTIFGR {
|
||||
#[doc = "No fault condition occurred after the last reset"]
|
||||
HFXTIFG_0,
|
||||
#[doc = "HFXT fault. A HFXT fault occurred after the last reset"]
|
||||
HFXTIFG_1,
|
||||
}
|
||||
impl HFXTIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
HFXTIFGR::HFXTIFG_0 => false,
|
||||
HFXTIFGR::HFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> HFXTIFGR {
|
||||
match value {
|
||||
false => HFXTIFGR::HFXTIFG_0,
|
||||
true => HFXTIFGR::HFXTIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HFXTIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_hfxtifg_0(&self) -> bool {
|
||||
*self == HFXTIFGR::HFXTIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HFXTIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_hfxtifg_1(&self) -> bool {
|
||||
*self == HFXTIFGR::HFXTIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `HFXT2IFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFXT2IFGR {
|
||||
#[doc = "No fault condition occurred after the last reset"]
|
||||
HFXT2IFG_0,
|
||||
#[doc = "HFXT2 fault. A HFXT2 fault occurred after the last reset"]
|
||||
HFXT2IFG_1,
|
||||
}
|
||||
impl HFXT2IFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
HFXT2IFGR::HFXT2IFG_0 => false,
|
||||
HFXT2IFGR::HFXT2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> HFXT2IFGR {
|
||||
match value {
|
||||
false => HFXT2IFGR::HFXT2IFG_0,
|
||||
true => HFXT2IFGR::HFXT2IFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HFXT2IFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_hfxt2ifg_0(&self) -> bool {
|
||||
*self == HFXT2IFGR::HFXT2IFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HFXT2IFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_hfxt2ifg_1(&self) -> bool {
|
||||
*self == HFXT2IFGR::HFXT2IFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `DCOR_SHTIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCOR_SHTIFGR {
|
||||
#[doc = "DCO external resistor present"]
|
||||
DCOR_SHTIFG_0,
|
||||
#[doc = "DCO external resistor short circuit fault"]
|
||||
DCOR_SHTIFG_1,
|
||||
}
|
||||
impl DCOR_SHTIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
DCOR_SHTIFGR::DCOR_SHTIFG_0 => false,
|
||||
DCOR_SHTIFGR::DCOR_SHTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> DCOR_SHTIFGR {
|
||||
match value {
|
||||
false => DCOR_SHTIFGR::DCOR_SHTIFG_0,
|
||||
true => DCOR_SHTIFGR::DCOR_SHTIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOR_SHTIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_dcor_shtifg_0(&self) -> bool {
|
||||
*self == DCOR_SHTIFGR::DCOR_SHTIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOR_SHTIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_dcor_shtifg_1(&self) -> bool {
|
||||
*self == DCOR_SHTIFGR::DCOR_SHTIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `DCOR_OPNIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCOR_OPNIFGR {
|
||||
#[doc = "DCO external resistor present"]
|
||||
DCOR_OPNIFG_0,
|
||||
#[doc = "DCO external resistor open circuit fault"]
|
||||
DCOR_OPNIFG_1,
|
||||
}
|
||||
impl DCOR_OPNIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
DCOR_OPNIFGR::DCOR_OPNIFG_0 => false,
|
||||
DCOR_OPNIFGR::DCOR_OPNIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> DCOR_OPNIFGR {
|
||||
match value {
|
||||
false => DCOR_OPNIFGR::DCOR_OPNIFG_0,
|
||||
true => DCOR_OPNIFGR::DCOR_OPNIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOR_OPNIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_dcor_opnifg_0(&self) -> bool {
|
||||
*self == DCOR_OPNIFGR::DCOR_OPNIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DCOR_OPNIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_dcor_opnifg_1(&self) -> bool {
|
||||
*self == DCOR_OPNIFGR::DCOR_OPNIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `FCNTLFIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FCNTLFIFGR {
|
||||
#[doc = "Start counter not expired"]
|
||||
FCNTLFIFG_0,
|
||||
#[doc = "Start counter expired"]
|
||||
FCNTLFIFG_1,
|
||||
}
|
||||
impl FCNTLFIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
FCNTLFIFGR::FCNTLFIFG_0 => false,
|
||||
FCNTLFIFGR::FCNTLFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> FCNTLFIFGR {
|
||||
match value {
|
||||
false => FCNTLFIFGR::FCNTLFIFG_0,
|
||||
true => FCNTLFIFGR::FCNTLFIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTLFIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_fcntlfifg_0(&self) -> bool {
|
||||
*self == FCNTLFIFGR::FCNTLFIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTLFIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_fcntlfifg_1(&self) -> bool {
|
||||
*self == FCNTLFIFGR::FCNTLFIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `FCNTHFIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FCNTHFIFGR {
|
||||
#[doc = "Start counter not expired"]
|
||||
FCNTHFIFG_0,
|
||||
#[doc = "Start counter expired"]
|
||||
FCNTHFIFG_1,
|
||||
}
|
||||
impl FCNTHFIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
FCNTHFIFGR::FCNTHFIFG_0 => false,
|
||||
FCNTHFIFGR::FCNTHFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> FCNTHFIFGR {
|
||||
match value {
|
||||
false => FCNTHFIFGR::FCNTHFIFG_0,
|
||||
true => FCNTHFIFGR::FCNTHFIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTHFIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_fcnthfifg_0(&self) -> bool {
|
||||
*self == FCNTHFIFGR::FCNTHFIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTHFIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_fcnthfifg_1(&self) -> bool {
|
||||
*self == FCNTHFIFGR::FCNTHFIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `FCNTHF2IFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FCNTHF2IFGR {
|
||||
#[doc = "Start counter not expired"]
|
||||
FCNTHF2IFG_0,
|
||||
#[doc = "Start counter expired"]
|
||||
FCNTHF2IFG_1,
|
||||
}
|
||||
impl FCNTHF2IFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
FCNTHF2IFGR::FCNTHF2IFG_0 => false,
|
||||
FCNTHF2IFGR::FCNTHF2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> FCNTHF2IFGR {
|
||||
match value {
|
||||
false => FCNTHF2IFGR::FCNTHF2IFG_0,
|
||||
true => FCNTHF2IFGR::FCNTHF2IFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTHF2IFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_fcnthf2ifg_0(&self) -> bool {
|
||||
*self == FCNTHF2IFGR::FCNTHF2IFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FCNTHF2IFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_fcnthf2ifg_1(&self) -> bool {
|
||||
*self == FCNTHF2IFGR::FCNTHF2IFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `PLLOOLIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum PLLOOLIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
PLLOOLIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
PLLOOLIFG_1,
|
||||
}
|
||||
impl PLLOOLIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
PLLOOLIFGR::PLLOOLIFG_0 => false,
|
||||
PLLOOLIFGR::PLLOOLIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> PLLOOLIFGR {
|
||||
match value {
|
||||
false => PLLOOLIFGR::PLLOOLIFG_0,
|
||||
true => PLLOOLIFGR::PLLOOLIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLOOLIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_plloolifg_0(&self) -> bool {
|
||||
*self == PLLOOLIFGR::PLLOOLIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLOOLIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_plloolifg_1(&self) -> bool {
|
||||
*self == PLLOOLIFGR::PLLOOLIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `PLLLOSIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum PLLLOSIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
PLLLOSIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
PLLLOSIFG_1,
|
||||
}
|
||||
impl PLLLOSIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
PLLLOSIFGR::PLLLOSIFG_0 => false,
|
||||
PLLLOSIFGR::PLLLOSIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> PLLLOSIFGR {
|
||||
match value {
|
||||
false => PLLLOSIFGR::PLLLOSIFG_0,
|
||||
true => PLLLOSIFGR::PLLLOSIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLLOSIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_plllosifg_0(&self) -> bool {
|
||||
*self == PLLLOSIFGR::PLLLOSIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLLOSIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_plllosifg_1(&self) -> bool {
|
||||
*self == PLLLOSIFGR::PLLLOSIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `PLLOORIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum PLLOORIFGR {
|
||||
#[doc = "No interrupt pending"]
|
||||
PLLOORIFG_0,
|
||||
#[doc = "Interrupt pending"]
|
||||
PLLOORIFG_1,
|
||||
}
|
||||
impl PLLOORIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
PLLOORIFGR::PLLOORIFG_0 => false,
|
||||
PLLOORIFGR::PLLOORIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> PLLOORIFGR {
|
||||
match value {
|
||||
false => PLLOORIFGR::PLLOORIFG_0,
|
||||
true => PLLOORIFGR::PLLOORIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLOORIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_plloorifg_0(&self) -> bool {
|
||||
*self == PLLOORIFGR::PLLOORIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PLLOORIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_plloorifg_1(&self) -> bool {
|
||||
*self == PLLOORIFGR::PLLOORIFG_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CALIFG`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CALIFGR {
|
||||
#[doc = "REFCNT period counter not expired"]
|
||||
CALIFG_0,
|
||||
#[doc = "REFCNT period counter expired"]
|
||||
CALIFG_1,
|
||||
}
|
||||
impl CALIFGR {
|
||||
#[doc = r" Returns `true` if the bit is clear (0)"]
|
||||
#[inline]
|
||||
pub fn bit_is_clear(&self) -> bool {
|
||||
!self.bit()
|
||||
}
|
||||
#[doc = r" Returns `true` if the bit is set (1)"]
|
||||
#[inline]
|
||||
pub fn bit_is_set(&self) -> bool {
|
||||
self.bit()
|
||||
}
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CALIFGR::CALIFG_0 => false,
|
||||
CALIFGR::CALIFG_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CALIFGR {
|
||||
match value {
|
||||
false => CALIFGR::CALIFG_0,
|
||||
true => CALIFGR::CALIFG_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CALIFG_0`"]
|
||||
#[inline]
|
||||
pub fn is_califg_0(&self) -> bool {
|
||||
*self == CALIFGR::CALIFG_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CALIFG_1`"]
|
||||
#[inline]
|
||||
pub fn is_califg_1(&self) -> bool {
|
||||
*self == CALIFGR::CALIFG_1
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 0 - LFXT oscillator fault flag"]
|
||||
#[inline]
|
||||
pub fn lfxtifg(&self) -> LFXTIFGR {
|
||||
LFXTIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 1 - HFXT oscillator fault flag"]
|
||||
#[inline]
|
||||
pub fn hfxtifg(&self) -> HFXTIFGR {
|
||||
HFXTIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 2 - HFXT2 oscillator fault flag"]
|
||||
#[inline]
|
||||
pub fn hfxt2ifg(&self) -> HFXT2IFGR {
|
||||
HFXT2IFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 5 - DCO external resistor short circuit fault flag."]
|
||||
#[inline]
|
||||
pub fn dcor_shtifg(&self) -> DCOR_SHTIFGR {
|
||||
DCOR_SHTIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 6 - DCO external resistor open circuit fault flag."]
|
||||
#[inline]
|
||||
pub fn dcor_opnifg(&self) -> DCOR_OPNIFGR {
|
||||
DCOR_OPNIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 8 - Start fault counter interrupt flag LFXT"]
|
||||
#[inline]
|
||||
pub fn fcntlfifg(&self) -> FCNTLFIFGR {
|
||||
FCNTLFIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 9 - Start fault counter interrupt flag HFXT"]
|
||||
#[inline]
|
||||
pub fn fcnthfifg(&self) -> FCNTHFIFGR {
|
||||
FCNTHFIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 11 - Start fault counter interrupt flag HFXT2"]
|
||||
#[inline]
|
||||
pub fn fcnthf2ifg(&self) -> FCNTHF2IFGR {
|
||||
FCNTHF2IFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 11;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 12 - PLL out-of-lock interrupt flag"]
|
||||
#[inline]
|
||||
pub fn plloolifg(&self) -> PLLOOLIFGR {
|
||||
PLLOOLIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 13 - PLL loss-of-signal interrupt flag"]
|
||||
#[inline]
|
||||
pub fn plllosifg(&self) -> PLLLOSIFGR {
|
||||
PLLLOSIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 13;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 14 - PLL out-of-range interrupt flag"]
|
||||
#[inline]
|
||||
pub fn plloorifg(&self) -> PLLOORIFGR {
|
||||
PLLOORIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 14;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 15 - REFCNT period counter expired"]
|
||||
#[inline]
|
||||
pub fn califg(&self) -> CALIFGR {
|
||||
CALIFGR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSKEY {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct CSKEYR {
|
||||
bits: u16,
|
||||
}
|
||||
impl CSKEYR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _CSKEYW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _CSKEYW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u16) -> &'a mut W {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Write xxxx_695Ah to unlock"]
|
||||
#[inline]
|
||||
pub fn cskey(&self) -> CSKEYR {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
CSKEYR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 42390 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:15 - Write xxxx_695Ah to unlock"]
|
||||
#[inline]
|
||||
pub fn cskey(&mut self) -> _CSKEYW {
|
||||
_CSKEYW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,722 @@
|
|||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CSSETIFG {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_LFXTIFG`"]
|
||||
pub enum SET_LFXTIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_LFXTIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_LFXTIFG_1,
|
||||
}
|
||||
impl SET_LFXTIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_LFXTIFGW::SET_LFXTIFG_0 => false,
|
||||
SET_LFXTIFGW::SET_LFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_LFXTIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_LFXTIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_LFXTIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_lfxtifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_LFXTIFGW::SET_LFXTIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_lfxtifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_LFXTIFGW::SET_LFXTIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_HFXTIFG`"]
|
||||
pub enum SET_HFXTIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_HFXTIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_HFXTIFG_1,
|
||||
}
|
||||
impl SET_HFXTIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_HFXTIFGW::SET_HFXTIFG_0 => false,
|
||||
SET_HFXTIFGW::SET_HFXTIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_HFXTIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_HFXTIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_HFXTIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_hfxtifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_HFXTIFGW::SET_HFXTIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_hfxtifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_HFXTIFGW::SET_HFXTIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_HFXT2IFG`"]
|
||||
pub enum SET_HFXT2IFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_HFXT2IFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_HFXT2IFG_1,
|
||||
}
|
||||
impl SET_HFXT2IFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_HFXT2IFGW::SET_HFXT2IFG_0 => false,
|
||||
SET_HFXT2IFGW::SET_HFXT2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_HFXT2IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_HFXT2IFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_HFXT2IFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_hfxt2ifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_HFXT2IFGW::SET_HFXT2IFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_hfxt2ifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_HFXT2IFGW::SET_HFXT2IFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_DCOR_OPNIFG`"]
|
||||
pub enum SET_DCOR_OPNIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_DCOR_OPNIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_DCOR_OPNIFG_1,
|
||||
}
|
||||
impl SET_DCOR_OPNIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_0 => false,
|
||||
SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_DCOR_OPNIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_DCOR_OPNIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_DCOR_OPNIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_dcor_opnifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_dcor_opnifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_CALIFG`"]
|
||||
pub enum SET_CALIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_CALIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_CALIFG_1,
|
||||
}
|
||||
impl SET_CALIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_CALIFGW::SET_CALIFG_0 => false,
|
||||
SET_CALIFGW::SET_CALIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_CALIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_CALIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_CALIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_califg_0(self) -> &'a mut W {
|
||||
self.variant(SET_CALIFGW::SET_CALIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_califg_1(self) -> &'a mut W {
|
||||
self.variant(SET_CALIFGW::SET_CALIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 15;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_FCNTHFIFG`"]
|
||||
pub enum SET_FCNTHFIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_FCNTHFIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_FCNTHFIFG_1,
|
||||
}
|
||||
impl SET_FCNTHFIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_FCNTHFIFGW::SET_FCNTHFIFG_0 => false,
|
||||
SET_FCNTHFIFGW::SET_FCNTHFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_FCNTHFIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_FCNTHFIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_FCNTHFIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_fcnthfifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTHFIFGW::SET_FCNTHFIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_fcnthfifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTHFIFGW::SET_FCNTHFIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 9;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_FCNTHF2IFG`"]
|
||||
pub enum SET_FCNTHF2IFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_FCNTHF2IFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_FCNTHF2IFG_1,
|
||||
}
|
||||
impl SET_FCNTHF2IFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_FCNTHF2IFGW::SET_FCNTHF2IFG_0 => false,
|
||||
SET_FCNTHF2IFGW::SET_FCNTHF2IFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_FCNTHF2IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_FCNTHF2IFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_FCNTHF2IFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_fcnthf2ifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTHF2IFGW::SET_FCNTHF2IFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_fcnthf2ifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTHF2IFGW::SET_FCNTHF2IFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 10;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_FCNTLFIFG`"]
|
||||
pub enum SET_FCNTLFIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_FCNTLFIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_FCNTLFIFG_1,
|
||||
}
|
||||
impl SET_FCNTLFIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_FCNTLFIFGW::SET_FCNTLFIFG_0 => false,
|
||||
SET_FCNTLFIFGW::SET_FCNTLFIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_FCNTLFIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_FCNTLFIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_FCNTLFIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_fcntlfifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTLFIFGW::SET_FCNTLFIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_fcntlfifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_FCNTLFIFGW::SET_FCNTLFIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_PLLOOLIFG`"]
|
||||
pub enum SET_PLLOOLIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_PLLOOLIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_PLLOOLIFG_1,
|
||||
}
|
||||
impl SET_PLLOOLIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_PLLOOLIFGW::SET_PLLOOLIFG_0 => false,
|
||||
SET_PLLOOLIFGW::SET_PLLOOLIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_PLLOOLIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_PLLOOLIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_PLLOOLIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_plloolifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_PLLOOLIFGW::SET_PLLOOLIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plloolifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_PLLOOLIFGW::SET_PLLOOLIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 12;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_PLLLOSIFG`"]
|
||||
pub enum SET_PLLLOSIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_PLLLOSIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_PLLLOSIFG_1,
|
||||
}
|
||||
impl SET_PLLLOSIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_PLLLOSIFGW::SET_PLLLOSIFG_0 => false,
|
||||
SET_PLLLOSIFGW::SET_PLLLOSIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_PLLLOSIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_PLLLOSIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_PLLLOSIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_plllosifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_PLLLOSIFGW::SET_PLLLOSIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plllosifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_PLLLOSIFGW::SET_PLLLOSIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 13;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Values that can be written to the field `SET_PLLOORIFG`"]
|
||||
pub enum SET_PLLOORIFGW {
|
||||
#[doc = "No effect"]
|
||||
SET_PLLOORIFG_0,
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
SET_PLLOORIFG_1,
|
||||
}
|
||||
impl SET_PLLOORIFGW {
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _bits(&self) -> bool {
|
||||
match *self {
|
||||
SET_PLLOORIFGW::SET_PLLOORIFG_0 => false,
|
||||
SET_PLLOORIFGW::SET_PLLOORIFG_1 => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _SET_PLLOORIFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _SET_PLLOORIFGW<'a> {
|
||||
#[doc = r" Writes `variant` to the field"]
|
||||
#[inline]
|
||||
pub fn variant(self, variant: SET_PLLOORIFGW) -> &'a mut W {
|
||||
{
|
||||
self.bit(variant._bits())
|
||||
}
|
||||
}
|
||||
#[doc = "No effect"]
|
||||
#[inline]
|
||||
pub fn set_plloorifg_0(self) -> &'a mut W {
|
||||
self.variant(SET_PLLOORIFGW::SET_PLLOORIFG_0)
|
||||
}
|
||||
#[doc = "Set pending interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plloorifg_1(self) -> &'a mut W {
|
||||
self.variant(SET_PLLOORIFGW::SET_PLLOORIFG_1)
|
||||
}
|
||||
#[doc = r" Sets the field bit"]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r" Clears the field bit"]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 14;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bit 0 - Set LFXT oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_lfxtifg(&mut self) -> _SET_LFXTIFGW {
|
||||
_SET_LFXTIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Set HFXT oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_hfxtifg(&mut self) -> _SET_HFXTIFGW {
|
||||
_SET_HFXTIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Set HFXT2 oscillator fault interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_hfxt2ifg(&mut self) -> _SET_HFXT2IFGW {
|
||||
_SET_HFXT2IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Set DCO external resistor open circuit fault interrupt flag."]
|
||||
#[inline]
|
||||
pub fn set_dcor_opnifg(&mut self) -> _SET_DCOR_OPNIFGW {
|
||||
_SET_DCOR_OPNIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 15 - REFCNT period counter set interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_califg(&mut self) -> _SET_CALIFGW {
|
||||
_SET_CALIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Start fault counter set interrupt flag HFXT"]
|
||||
#[inline]
|
||||
pub fn set_fcnthfifg(&mut self) -> _SET_FCNTHFIFGW {
|
||||
_SET_FCNTHFIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - Start fault counter set interrupt flag HFXT2"]
|
||||
#[inline]
|
||||
pub fn set_fcnthf2ifg(&mut self) -> _SET_FCNTHF2IFGW {
|
||||
_SET_FCNTHF2IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Start fault counter set interrupt flag LFXT"]
|
||||
#[inline]
|
||||
pub fn set_fcntlfifg(&mut self) -> _SET_FCNTLFIFGW {
|
||||
_SET_FCNTLFIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 12 - PLL out-of-lock set interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plloolifg(&mut self) -> _SET_PLLOOLIFGW {
|
||||
_SET_PLLOOLIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 13 - PLL loss-of-signal set interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plllosifg(&mut self) -> _SET_PLLLOSIFGW {
|
||||
_SET_PLLLOSIFGW { w: self }
|
||||
}
|
||||
#[doc = "Bit 14 - PLL out-of-range set interrupt flag"]
|
||||
#[inline]
|
||||
pub fn set_plloorifg(&mut self) -> _SET_PLLOORIFGW {
|
||||
_SET_PLLOORIFGW { w: self }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,595 @@
|
|||
#[doc = r" Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Port A Input"]
|
||||
pub pain: PAIN,
|
||||
#[doc = "0x02 - Port A Output"]
|
||||
pub paout: PAOUT,
|
||||
#[doc = "0x04 - Port A Direction"]
|
||||
pub padir: PADIR,
|
||||
#[doc = "0x06 - Port A Resistor Enable"]
|
||||
pub paren: PAREN,
|
||||
#[doc = "0x08 - Port A Drive Strength"]
|
||||
pub pads: PADS,
|
||||
#[doc = "0x0a - Port A Select 0"]
|
||||
pub pasel0: PASEL0,
|
||||
#[doc = "0x0c - Port A Select 1"]
|
||||
pub pasel1: PASEL1,
|
||||
#[doc = "0x0e - Port 1 Interrupt Vector Register"]
|
||||
pub p1iv: P1IV,
|
||||
_reserved0: [u8; 6usize],
|
||||
#[doc = "0x16 - Port A Complement Select"]
|
||||
pub paselc: PASELC,
|
||||
#[doc = "0x18 - Port A Interrupt Edge Select"]
|
||||
pub paies: PAIES,
|
||||
#[doc = "0x1a - Port A Interrupt Enable"]
|
||||
pub paie: PAIE,
|
||||
#[doc = "0x1c - Port A Interrupt Flag"]
|
||||
pub paifg: PAIFG,
|
||||
#[doc = "0x1e - Port 2 Interrupt Vector Register"]
|
||||
pub p2iv: P2IV,
|
||||
#[doc = "0x20 - Port B Input"]
|
||||
pub pbin: PBIN,
|
||||
#[doc = "0x22 - Port B Output"]
|
||||
pub pbout: PBOUT,
|
||||
#[doc = "0x24 - Port B Direction"]
|
||||
pub pbdir: PBDIR,
|
||||
#[doc = "0x26 - Port B Resistor Enable"]
|
||||
pub pbren: PBREN,
|
||||
#[doc = "0x28 - Port B Drive Strength"]
|
||||
pub pbds: PBDS,
|
||||
#[doc = "0x2a - Port B Select 0"]
|
||||
pub pbsel0: PBSEL0,
|
||||
#[doc = "0x2c - Port B Select 1"]
|
||||
pub pbsel1: PBSEL1,
|
||||
#[doc = "0x2e - Port 3 Interrupt Vector Register"]
|
||||
pub p3iv: P3IV,
|
||||
_reserved1: [u8; 6usize],
|
||||
#[doc = "0x36 - Port B Complement Select"]
|
||||
pub pbselc: PBSELC,
|
||||
#[doc = "0x38 - Port B Interrupt Edge Select"]
|
||||
pub pbies: PBIES,
|
||||
#[doc = "0x3a - Port B Interrupt Enable"]
|
||||
pub pbie: PBIE,
|
||||
#[doc = "0x3c - Port B Interrupt Flag"]
|
||||
pub pbifg: PBIFG,
|
||||
#[doc = "0x3e - Port 4 Interrupt Vector Register"]
|
||||
pub p4iv: P4IV,
|
||||
#[doc = "0x40 - Port C Input"]
|
||||
pub pcin: PCIN,
|
||||
#[doc = "0x42 - Port C Output"]
|
||||
pub pcout: PCOUT,
|
||||
#[doc = "0x44 - Port C Direction"]
|
||||
pub pcdir: PCDIR,
|
||||
#[doc = "0x46 - Port C Resistor Enable"]
|
||||
pub pcren: PCREN,
|
||||
#[doc = "0x48 - Port C Drive Strength"]
|
||||
pub pcds: PCDS,
|
||||
#[doc = "0x4a - Port C Select 0"]
|
||||
pub pcsel0: PCSEL0,
|
||||
#[doc = "0x4c - Port C Select 1"]
|
||||
pub pcsel1: PCSEL1,
|
||||
#[doc = "0x4e - Port 5 Interrupt Vector Register"]
|
||||
pub p5iv: P5IV,
|
||||
_reserved2: [u8; 6usize],
|
||||
#[doc = "0x56 - Port C Complement Select"]
|
||||
pub pcselc: PCSELC,
|
||||
#[doc = "0x58 - Port C Interrupt Edge Select"]
|
||||
pub pcies: PCIES,
|
||||
#[doc = "0x5a - Port C Interrupt Enable"]
|
||||
pub pcie: PCIE,
|
||||
#[doc = "0x5c - Port C Interrupt Flag"]
|
||||
pub pcifg: PCIFG,
|
||||
#[doc = "0x5e - Port 6 Interrupt Vector Register"]
|
||||
pub p6iv: P6IV,
|
||||
#[doc = "0x60 - Port D Input"]
|
||||
pub pdin: PDIN,
|
||||
#[doc = "0x62 - Port D Output"]
|
||||
pub pdout: PDOUT,
|
||||
#[doc = "0x64 - Port D Direction"]
|
||||
pub pddir: PDDIR,
|
||||
#[doc = "0x66 - Port D Resistor Enable"]
|
||||
pub pdren: PDREN,
|
||||
#[doc = "0x68 - Port D Drive Strength"]
|
||||
pub pdds: PDDS,
|
||||
#[doc = "0x6a - Port D Select 0"]
|
||||
pub pdsel0: PDSEL0,
|
||||
#[doc = "0x6c - Port D Select 1"]
|
||||
pub pdsel1: PDSEL1,
|
||||
#[doc = "0x6e - Port 7 Interrupt Vector Register"]
|
||||
pub p7iv: P7IV,
|
||||
_reserved3: [u8; 6usize],
|
||||
#[doc = "0x76 - Port D Complement Select"]
|
||||
pub pdselc: PDSELC,
|
||||
#[doc = "0x78 - Port D Interrupt Edge Select"]
|
||||
pub pdies: PDIES,
|
||||
#[doc = "0x7a - Port D Interrupt Enable"]
|
||||
pub pdie: PDIE,
|
||||
#[doc = "0x7c - Port D Interrupt Flag"]
|
||||
pub pdifg: PDIFG,
|
||||
#[doc = "0x7e - Port 8 Interrupt Vector Register"]
|
||||
pub p8iv: P8IV,
|
||||
#[doc = "0x80 - Port E Input"]
|
||||
pub pein: PEIN,
|
||||
#[doc = "0x82 - Port E Output"]
|
||||
pub peout: PEOUT,
|
||||
#[doc = "0x84 - Port E Direction"]
|
||||
pub pedir: PEDIR,
|
||||
#[doc = "0x86 - Port E Resistor Enable"]
|
||||
pub peren: PEREN,
|
||||
#[doc = "0x88 - Port E Drive Strength"]
|
||||
pub peds: PEDS,
|
||||
#[doc = "0x8a - Port E Select 0"]
|
||||
pub pesel0: PESEL0,
|
||||
#[doc = "0x8c - Port E Select 1"]
|
||||
pub pesel1: PESEL1,
|
||||
#[doc = "0x8e - Port 9 Interrupt Vector Register"]
|
||||
pub p9iv: P9IV,
|
||||
_reserved4: [u8; 6usize],
|
||||
#[doc = "0x96 - Port E Complement Select"]
|
||||
pub peselc: PESELC,
|
||||
#[doc = "0x98 - Port E Interrupt Edge Select"]
|
||||
pub peies: PEIES,
|
||||
#[doc = "0x9a - Port E Interrupt Enable"]
|
||||
pub peie: PEIE,
|
||||
#[doc = "0x9c - Port E Interrupt Flag"]
|
||||
pub peifg: PEIFG,
|
||||
#[doc = "0x9e - Port 10 Interrupt Vector Register"]
|
||||
pub p10iv: P10IV,
|
||||
_reserved5: [u8; 128usize],
|
||||
#[doc = "0x120 - Port J Input"]
|
||||
pub pjin: PJIN,
|
||||
#[doc = "0x122 - Port J Output"]
|
||||
pub pjout: PJOUT,
|
||||
#[doc = "0x124 - Port J Direction"]
|
||||
pub pjdir: PJDIR,
|
||||
#[doc = "0x126 - Port J Resistor Enable"]
|
||||
pub pjren: PJREN,
|
||||
#[doc = "0x128 - Port J Drive Strength"]
|
||||
pub pjds: PJDS,
|
||||
#[doc = "0x12a - Port J Select 0"]
|
||||
pub pjsel0: PJSEL0,
|
||||
#[doc = "0x12c - Port J Select 1"]
|
||||
pub pjsel1: PJSEL1,
|
||||
_reserved6: [u8; 8usize],
|
||||
#[doc = "0x136 - Port J Complement Select"]
|
||||
pub pjselc: PJSELC,
|
||||
}
|
||||
#[doc = "Port A Input"]
|
||||
pub struct PAIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Input"]
|
||||
pub mod pain;
|
||||
#[doc = "Port A Output"]
|
||||
pub struct PAOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Output"]
|
||||
pub mod paout;
|
||||
#[doc = "Port A Direction"]
|
||||
pub struct PADIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Direction"]
|
||||
pub mod padir;
|
||||
#[doc = "Port A Resistor Enable"]
|
||||
pub struct PAREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Resistor Enable"]
|
||||
pub mod paren;
|
||||
#[doc = "Port A Drive Strength"]
|
||||
pub struct PADS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Drive Strength"]
|
||||
pub mod pads;
|
||||
#[doc = "Port A Select 0"]
|
||||
pub struct PASEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Select 0"]
|
||||
pub mod pasel0;
|
||||
#[doc = "Port A Select 1"]
|
||||
pub struct PASEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Select 1"]
|
||||
pub mod pasel1;
|
||||
#[doc = "Port 1 Interrupt Vector Register"]
|
||||
pub struct P1IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 1 Interrupt Vector Register"]
|
||||
pub mod p1iv;
|
||||
#[doc = "Port A Complement Select"]
|
||||
pub struct PASELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Complement Select"]
|
||||
pub mod paselc;
|
||||
#[doc = "Port A Interrupt Edge Select"]
|
||||
pub struct PAIES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Interrupt Edge Select"]
|
||||
pub mod paies;
|
||||
#[doc = "Port A Interrupt Enable"]
|
||||
pub struct PAIE {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Interrupt Enable"]
|
||||
pub mod paie;
|
||||
#[doc = "Port A Interrupt Flag"]
|
||||
pub struct PAIFG {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port A Interrupt Flag"]
|
||||
pub mod paifg;
|
||||
#[doc = "Port 2 Interrupt Vector Register"]
|
||||
pub struct P2IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 2 Interrupt Vector Register"]
|
||||
pub mod p2iv;
|
||||
#[doc = "Port B Input"]
|
||||
pub struct PBIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Input"]
|
||||
pub mod pbin;
|
||||
#[doc = "Port B Output"]
|
||||
pub struct PBOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Output"]
|
||||
pub mod pbout;
|
||||
#[doc = "Port B Direction"]
|
||||
pub struct PBDIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Direction"]
|
||||
pub mod pbdir;
|
||||
#[doc = "Port B Resistor Enable"]
|
||||
pub struct PBREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Resistor Enable"]
|
||||
pub mod pbren;
|
||||
#[doc = "Port B Drive Strength"]
|
||||
pub struct PBDS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Drive Strength"]
|
||||
pub mod pbds;
|
||||
#[doc = "Port B Select 0"]
|
||||
pub struct PBSEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Select 0"]
|
||||
pub mod pbsel0;
|
||||
#[doc = "Port B Select 1"]
|
||||
pub struct PBSEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Select 1"]
|
||||
pub mod pbsel1;
|
||||
#[doc = "Port 3 Interrupt Vector Register"]
|
||||
pub struct P3IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 3 Interrupt Vector Register"]
|
||||
pub mod p3iv;
|
||||
#[doc = "Port B Complement Select"]
|
||||
pub struct PBSELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Complement Select"]
|
||||
pub mod pbselc;
|
||||
#[doc = "Port B Interrupt Edge Select"]
|
||||
pub struct PBIES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Interrupt Edge Select"]
|
||||
pub mod pbies;
|
||||
#[doc = "Port B Interrupt Enable"]
|
||||
pub struct PBIE {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Interrupt Enable"]
|
||||
pub mod pbie;
|
||||
#[doc = "Port B Interrupt Flag"]
|
||||
pub struct PBIFG {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port B Interrupt Flag"]
|
||||
pub mod pbifg;
|
||||
#[doc = "Port 4 Interrupt Vector Register"]
|
||||
pub struct P4IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 4 Interrupt Vector Register"]
|
||||
pub mod p4iv;
|
||||
#[doc = "Port C Input"]
|
||||
pub struct PCIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Input"]
|
||||
pub mod pcin;
|
||||
#[doc = "Port C Output"]
|
||||
pub struct PCOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Output"]
|
||||
pub mod pcout;
|
||||
#[doc = "Port C Direction"]
|
||||
pub struct PCDIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Direction"]
|
||||
pub mod pcdir;
|
||||
#[doc = "Port C Resistor Enable"]
|
||||
pub struct PCREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Resistor Enable"]
|
||||
pub mod pcren;
|
||||
#[doc = "Port C Drive Strength"]
|
||||
pub struct PCDS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Drive Strength"]
|
||||
pub mod pcds;
|
||||
#[doc = "Port C Select 0"]
|
||||
pub struct PCSEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Select 0"]
|
||||
pub mod pcsel0;
|
||||
#[doc = "Port C Select 1"]
|
||||
pub struct PCSEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Select 1"]
|
||||
pub mod pcsel1;
|
||||
#[doc = "Port 5 Interrupt Vector Register"]
|
||||
pub struct P5IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 5 Interrupt Vector Register"]
|
||||
pub mod p5iv;
|
||||
#[doc = "Port C Complement Select"]
|
||||
pub struct PCSELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Complement Select"]
|
||||
pub mod pcselc;
|
||||
#[doc = "Port C Interrupt Edge Select"]
|
||||
pub struct PCIES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Interrupt Edge Select"]
|
||||
pub mod pcies;
|
||||
#[doc = "Port C Interrupt Enable"]
|
||||
pub struct PCIE {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Interrupt Enable"]
|
||||
pub mod pcie;
|
||||
#[doc = "Port C Interrupt Flag"]
|
||||
pub struct PCIFG {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port C Interrupt Flag"]
|
||||
pub mod pcifg;
|
||||
#[doc = "Port 6 Interrupt Vector Register"]
|
||||
pub struct P6IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 6 Interrupt Vector Register"]
|
||||
pub mod p6iv;
|
||||
#[doc = "Port D Input"]
|
||||
pub struct PDIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Input"]
|
||||
pub mod pdin;
|
||||
#[doc = "Port D Output"]
|
||||
pub struct PDOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Output"]
|
||||
pub mod pdout;
|
||||
#[doc = "Port D Direction"]
|
||||
pub struct PDDIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Direction"]
|
||||
pub mod pddir;
|
||||
#[doc = "Port D Resistor Enable"]
|
||||
pub struct PDREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Resistor Enable"]
|
||||
pub mod pdren;
|
||||
#[doc = "Port D Drive Strength"]
|
||||
pub struct PDDS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Drive Strength"]
|
||||
pub mod pdds;
|
||||
#[doc = "Port D Select 0"]
|
||||
pub struct PDSEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Select 0"]
|
||||
pub mod pdsel0;
|
||||
#[doc = "Port D Select 1"]
|
||||
pub struct PDSEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Select 1"]
|
||||
pub mod pdsel1;
|
||||
#[doc = "Port 7 Interrupt Vector Register"]
|
||||
pub struct P7IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 7 Interrupt Vector Register"]
|
||||
pub mod p7iv;
|
||||
#[doc = "Port D Complement Select"]
|
||||
pub struct PDSELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Complement Select"]
|
||||
pub mod pdselc;
|
||||
#[doc = "Port D Interrupt Edge Select"]
|
||||
pub struct PDIES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Interrupt Edge Select"]
|
||||
pub mod pdies;
|
||||
#[doc = "Port D Interrupt Enable"]
|
||||
pub struct PDIE {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Interrupt Enable"]
|
||||
pub mod pdie;
|
||||
#[doc = "Port D Interrupt Flag"]
|
||||
pub struct PDIFG {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port D Interrupt Flag"]
|
||||
pub mod pdifg;
|
||||
#[doc = "Port 8 Interrupt Vector Register"]
|
||||
pub struct P8IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 8 Interrupt Vector Register"]
|
||||
pub mod p8iv;
|
||||
#[doc = "Port E Input"]
|
||||
pub struct PEIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Input"]
|
||||
pub mod pein;
|
||||
#[doc = "Port E Output"]
|
||||
pub struct PEOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Output"]
|
||||
pub mod peout;
|
||||
#[doc = "Port E Direction"]
|
||||
pub struct PEDIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Direction"]
|
||||
pub mod pedir;
|
||||
#[doc = "Port E Resistor Enable"]
|
||||
pub struct PEREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Resistor Enable"]
|
||||
pub mod peren;
|
||||
#[doc = "Port E Drive Strength"]
|
||||
pub struct PEDS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Drive Strength"]
|
||||
pub mod peds;
|
||||
#[doc = "Port E Select 0"]
|
||||
pub struct PESEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Select 0"]
|
||||
pub mod pesel0;
|
||||
#[doc = "Port E Select 1"]
|
||||
pub struct PESEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Select 1"]
|
||||
pub mod pesel1;
|
||||
#[doc = "Port 9 Interrupt Vector Register"]
|
||||
pub struct P9IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 9 Interrupt Vector Register"]
|
||||
pub mod p9iv;
|
||||
#[doc = "Port E Complement Select"]
|
||||
pub struct PESELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Complement Select"]
|
||||
pub mod peselc;
|
||||
#[doc = "Port E Interrupt Edge Select"]
|
||||
pub struct PEIES {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Interrupt Edge Select"]
|
||||
pub mod peies;
|
||||
#[doc = "Port E Interrupt Enable"]
|
||||
pub struct PEIE {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Interrupt Enable"]
|
||||
pub mod peie;
|
||||
#[doc = "Port E Interrupt Flag"]
|
||||
pub struct PEIFG {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port E Interrupt Flag"]
|
||||
pub mod peifg;
|
||||
#[doc = "Port 10 Interrupt Vector Register"]
|
||||
pub struct P10IV {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port 10 Interrupt Vector Register"]
|
||||
pub mod p10iv;
|
||||
#[doc = "Port J Input"]
|
||||
pub struct PJIN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Input"]
|
||||
pub mod pjin;
|
||||
#[doc = "Port J Output"]
|
||||
pub struct PJOUT {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Output"]
|
||||
pub mod pjout;
|
||||
#[doc = "Port J Direction"]
|
||||
pub struct PJDIR {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Direction"]
|
||||
pub mod pjdir;
|
||||
#[doc = "Port J Resistor Enable"]
|
||||
pub struct PJREN {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Resistor Enable"]
|
||||
pub mod pjren;
|
||||
#[doc = "Port J Drive Strength"]
|
||||
pub struct PJDS {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Drive Strength"]
|
||||
pub mod pjds;
|
||||
#[doc = "Port J Select 0"]
|
||||
pub struct PJSEL0 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Select 0"]
|
||||
pub mod pjsel0;
|
||||
#[doc = "Port J Select 1"]
|
||||
pub struct PJSEL1 {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Select 1"]
|
||||
pub mod pjsel1;
|
||||
#[doc = "Port J Complement Select"]
|
||||
pub struct PJSELC {
|
||||
register: ::vcell::VolatileCell<u16>,
|
||||
}
|
||||
#[doc = "Port J Complement Select"]
|
||||
pub mod pjselc;
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P10IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P10IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P10IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P10IV_0,
|
||||
#[doc = "Interrupt Source: Port 10.0 interrupt; Interrupt Flag: P10IFG0; Interrupt Priority: Highest"]
|
||||
P10IV_2,
|
||||
#[doc = "Interrupt Source: Port 10.1 interrupt; Interrupt Flag: P10IFG1"]
|
||||
P10IV_4,
|
||||
#[doc = "Interrupt Source: Port 10.2 interrupt; Interrupt Flag: P10IFG2"]
|
||||
P10IV_6,
|
||||
#[doc = "Interrupt Source: Port 10.3 interrupt; Interrupt Flag: P10IFG3"]
|
||||
P10IV_8,
|
||||
#[doc = "Interrupt Source: Port 10.4 interrupt; Interrupt Flag: P10IFG4"]
|
||||
P10IV_10,
|
||||
#[doc = "Interrupt Source: Port 10.5 interrupt; Interrupt Flag: P10IFG5"]
|
||||
P10IV_12,
|
||||
#[doc = "Interrupt Source: Port 10.6 interrupt; Interrupt Flag: P10IFG6"]
|
||||
P10IV_14,
|
||||
#[doc = "Interrupt Source: Port 10.7 interrupt; Interrupt Flag: P10IFG7; Interrupt Priority: Lowest"]
|
||||
P10IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P10IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P10IVR::P10IV_0 => 0,
|
||||
P10IVR::P10IV_2 => 2,
|
||||
P10IVR::P10IV_4 => 4,
|
||||
P10IVR::P10IV_6 => 6,
|
||||
P10IVR::P10IV_8 => 8,
|
||||
P10IVR::P10IV_10 => 10,
|
||||
P10IVR::P10IV_12 => 12,
|
||||
P10IVR::P10IV_14 => 14,
|
||||
P10IVR::P10IV_16 => 16,
|
||||
P10IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P10IVR {
|
||||
match value {
|
||||
0 => P10IVR::P10IV_0,
|
||||
2 => P10IVR::P10IV_2,
|
||||
4 => P10IVR::P10IV_4,
|
||||
6 => P10IVR::P10IV_6,
|
||||
8 => P10IVR::P10IV_8,
|
||||
10 => P10IVR::P10IV_10,
|
||||
12 => P10IVR::P10IV_12,
|
||||
14 => P10IVR::P10IV_14,
|
||||
16 => P10IVR::P10IV_16,
|
||||
i => P10IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_0(&self) -> bool {
|
||||
*self == P10IVR::P10IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_2(&self) -> bool {
|
||||
*self == P10IVR::P10IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_4(&self) -> bool {
|
||||
*self == P10IVR::P10IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_6(&self) -> bool {
|
||||
*self == P10IVR::P10IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_8(&self) -> bool {
|
||||
*self == P10IVR::P10IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_10(&self) -> bool {
|
||||
*self == P10IVR::P10IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_12(&self) -> bool {
|
||||
*self == P10IVR::P10IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_14(&self) -> bool {
|
||||
*self == P10IVR::P10IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P10IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p10iv_16(&self) -> bool {
|
||||
*self == P10IVR::P10IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 10 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p10iv(&self) -> P10IVR {
|
||||
P10IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P1IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P1IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P1IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P1IV_0,
|
||||
#[doc = "Interrupt Source: Port 1.0 interrupt; Interrupt Flag: P1IFG0; Interrupt Priority: Highest"]
|
||||
P1IV_2,
|
||||
#[doc = "Interrupt Source: Port 1.1 interrupt; Interrupt Flag: P1IFG1"]
|
||||
P1IV_4,
|
||||
#[doc = "Interrupt Source: Port 1.2 interrupt; Interrupt Flag: P1IFG2"]
|
||||
P1IV_6,
|
||||
#[doc = "Interrupt Source: Port 1.3 interrupt; Interrupt Flag: P1IFG3"]
|
||||
P1IV_8,
|
||||
#[doc = "Interrupt Source: Port 1.4 interrupt; Interrupt Flag: P1IFG4"]
|
||||
P1IV_10,
|
||||
#[doc = "Interrupt Source: Port 1.5 interrupt; Interrupt Flag: P1IFG5"]
|
||||
P1IV_12,
|
||||
#[doc = "Interrupt Source: Port 1.6 interrupt; Interrupt Flag: P1IFG6"]
|
||||
P1IV_14,
|
||||
#[doc = "Interrupt Source: Port 1.7 interrupt; Interrupt Flag: P1IFG7; Interrupt Priority: Lowest"]
|
||||
P1IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P1IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P1IVR::P1IV_0 => 0,
|
||||
P1IVR::P1IV_2 => 2,
|
||||
P1IVR::P1IV_4 => 4,
|
||||
P1IVR::P1IV_6 => 6,
|
||||
P1IVR::P1IV_8 => 8,
|
||||
P1IVR::P1IV_10 => 10,
|
||||
P1IVR::P1IV_12 => 12,
|
||||
P1IVR::P1IV_14 => 14,
|
||||
P1IVR::P1IV_16 => 16,
|
||||
P1IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P1IVR {
|
||||
match value {
|
||||
0 => P1IVR::P1IV_0,
|
||||
2 => P1IVR::P1IV_2,
|
||||
4 => P1IVR::P1IV_4,
|
||||
6 => P1IVR::P1IV_6,
|
||||
8 => P1IVR::P1IV_8,
|
||||
10 => P1IVR::P1IV_10,
|
||||
12 => P1IVR::P1IV_12,
|
||||
14 => P1IVR::P1IV_14,
|
||||
16 => P1IVR::P1IV_16,
|
||||
i => P1IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_0(&self) -> bool {
|
||||
*self == P1IVR::P1IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_2(&self) -> bool {
|
||||
*self == P1IVR::P1IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_4(&self) -> bool {
|
||||
*self == P1IVR::P1IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_6(&self) -> bool {
|
||||
*self == P1IVR::P1IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_8(&self) -> bool {
|
||||
*self == P1IVR::P1IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_10(&self) -> bool {
|
||||
*self == P1IVR::P1IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_12(&self) -> bool {
|
||||
*self == P1IVR::P1IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_14(&self) -> bool {
|
||||
*self == P1IVR::P1IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P1IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p1iv_16(&self) -> bool {
|
||||
*self == P1IVR::P1IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 1 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p1iv(&self) -> P1IVR {
|
||||
P1IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P2IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P2IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P2IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P2IV_0,
|
||||
#[doc = "Interrupt Source: Port 2.0 interrupt; Interrupt Flag: P2IFG0; Interrupt Priority: Highest"]
|
||||
P2IV_2,
|
||||
#[doc = "Interrupt Source: Port 2.1 interrupt; Interrupt Flag: P2IFG1"]
|
||||
P2IV_4,
|
||||
#[doc = "Interrupt Source: Port 2.2 interrupt; Interrupt Flag: P2IFG2"]
|
||||
P2IV_6,
|
||||
#[doc = "Interrupt Source: Port 2.3 interrupt; Interrupt Flag: P2IFG3"]
|
||||
P2IV_8,
|
||||
#[doc = "Interrupt Source: Port 2.4 interrupt; Interrupt Flag: P2IFG4"]
|
||||
P2IV_10,
|
||||
#[doc = "Interrupt Source: Port 2.5 interrupt; Interrupt Flag: P2IFG5"]
|
||||
P2IV_12,
|
||||
#[doc = "Interrupt Source: Port 2.6 interrupt; Interrupt Flag: P2IFG6"]
|
||||
P2IV_14,
|
||||
#[doc = "Interrupt Source: Port 2.7 interrupt; Interrupt Flag: P2IFG7; Interrupt Priority: Lowest"]
|
||||
P2IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P2IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P2IVR::P2IV_0 => 0,
|
||||
P2IVR::P2IV_2 => 2,
|
||||
P2IVR::P2IV_4 => 4,
|
||||
P2IVR::P2IV_6 => 6,
|
||||
P2IVR::P2IV_8 => 8,
|
||||
P2IVR::P2IV_10 => 10,
|
||||
P2IVR::P2IV_12 => 12,
|
||||
P2IVR::P2IV_14 => 14,
|
||||
P2IVR::P2IV_16 => 16,
|
||||
P2IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P2IVR {
|
||||
match value {
|
||||
0 => P2IVR::P2IV_0,
|
||||
2 => P2IVR::P2IV_2,
|
||||
4 => P2IVR::P2IV_4,
|
||||
6 => P2IVR::P2IV_6,
|
||||
8 => P2IVR::P2IV_8,
|
||||
10 => P2IVR::P2IV_10,
|
||||
12 => P2IVR::P2IV_12,
|
||||
14 => P2IVR::P2IV_14,
|
||||
16 => P2IVR::P2IV_16,
|
||||
i => P2IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_0(&self) -> bool {
|
||||
*self == P2IVR::P2IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_2(&self) -> bool {
|
||||
*self == P2IVR::P2IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_4(&self) -> bool {
|
||||
*self == P2IVR::P2IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_6(&self) -> bool {
|
||||
*self == P2IVR::P2IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_8(&self) -> bool {
|
||||
*self == P2IVR::P2IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_10(&self) -> bool {
|
||||
*self == P2IVR::P2IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_12(&self) -> bool {
|
||||
*self == P2IVR::P2IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_14(&self) -> bool {
|
||||
*self == P2IVR::P2IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P2IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p2iv_16(&self) -> bool {
|
||||
*self == P2IVR::P2IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 2 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p2iv(&self) -> P2IVR {
|
||||
P2IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P3IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P3IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P3IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P3IV_0,
|
||||
#[doc = "Interrupt Source: Port 3.0 interrupt; Interrupt Flag: P3IFG0; Interrupt Priority: Highest"]
|
||||
P3IV_2,
|
||||
#[doc = "Interrupt Source: Port 3.1 interrupt; Interrupt Flag: P3IFG1"]
|
||||
P3IV_4,
|
||||
#[doc = "Interrupt Source: Port 3.2 interrupt; Interrupt Flag: P3IFG2"]
|
||||
P3IV_6,
|
||||
#[doc = "Interrupt Source: Port 3.3 interrupt; Interrupt Flag: P3IFG3"]
|
||||
P3IV_8,
|
||||
#[doc = "Interrupt Source: Port 3.4 interrupt; Interrupt Flag: P3IFG4"]
|
||||
P3IV_10,
|
||||
#[doc = "Interrupt Source: Port 3.5 interrupt; Interrupt Flag: P3IFG5"]
|
||||
P3IV_12,
|
||||
#[doc = "Interrupt Source: Port 3.6 interrupt; Interrupt Flag: P3IFG6"]
|
||||
P3IV_14,
|
||||
#[doc = "Interrupt Source: Port 3.7 interrupt; Interrupt Flag: P3IFG7; Interrupt Priority: Lowest"]
|
||||
P3IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P3IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P3IVR::P3IV_0 => 0,
|
||||
P3IVR::P3IV_2 => 2,
|
||||
P3IVR::P3IV_4 => 4,
|
||||
P3IVR::P3IV_6 => 6,
|
||||
P3IVR::P3IV_8 => 8,
|
||||
P3IVR::P3IV_10 => 10,
|
||||
P3IVR::P3IV_12 => 12,
|
||||
P3IVR::P3IV_14 => 14,
|
||||
P3IVR::P3IV_16 => 16,
|
||||
P3IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P3IVR {
|
||||
match value {
|
||||
0 => P3IVR::P3IV_0,
|
||||
2 => P3IVR::P3IV_2,
|
||||
4 => P3IVR::P3IV_4,
|
||||
6 => P3IVR::P3IV_6,
|
||||
8 => P3IVR::P3IV_8,
|
||||
10 => P3IVR::P3IV_10,
|
||||
12 => P3IVR::P3IV_12,
|
||||
14 => P3IVR::P3IV_14,
|
||||
16 => P3IVR::P3IV_16,
|
||||
i => P3IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_0(&self) -> bool {
|
||||
*self == P3IVR::P3IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_2(&self) -> bool {
|
||||
*self == P3IVR::P3IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_4(&self) -> bool {
|
||||
*self == P3IVR::P3IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_6(&self) -> bool {
|
||||
*self == P3IVR::P3IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_8(&self) -> bool {
|
||||
*self == P3IVR::P3IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_10(&self) -> bool {
|
||||
*self == P3IVR::P3IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_12(&self) -> bool {
|
||||
*self == P3IVR::P3IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_14(&self) -> bool {
|
||||
*self == P3IVR::P3IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P3IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p3iv_16(&self) -> bool {
|
||||
*self == P3IVR::P3IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 3 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p3iv(&self) -> P3IVR {
|
||||
P3IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P4IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P4IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P4IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P4IV_0,
|
||||
#[doc = "Interrupt Source: Port 4.0 interrupt; Interrupt Flag: P4IFG0; Interrupt Priority: Highest"]
|
||||
P4IV_2,
|
||||
#[doc = "Interrupt Source: Port 4.1 interrupt; Interrupt Flag: P4IFG1"]
|
||||
P4IV_4,
|
||||
#[doc = "Interrupt Source: Port 4.2 interrupt; Interrupt Flag: P4IFG2"]
|
||||
P4IV_6,
|
||||
#[doc = "Interrupt Source: Port 4.3 interrupt; Interrupt Flag: P4IFG3"]
|
||||
P4IV_8,
|
||||
#[doc = "Interrupt Source: Port 4.4 interrupt; Interrupt Flag: P4IFG4"]
|
||||
P4IV_10,
|
||||
#[doc = "Interrupt Source: Port 4.5 interrupt; Interrupt Flag: P4IFG5"]
|
||||
P4IV_12,
|
||||
#[doc = "Interrupt Source: Port 4.6 interrupt; Interrupt Flag: P4IFG6"]
|
||||
P4IV_14,
|
||||
#[doc = "Interrupt Source: Port 4.7 interrupt; Interrupt Flag: P4IFG7; Interrupt Priority: Lowest"]
|
||||
P4IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P4IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P4IVR::P4IV_0 => 0,
|
||||
P4IVR::P4IV_2 => 2,
|
||||
P4IVR::P4IV_4 => 4,
|
||||
P4IVR::P4IV_6 => 6,
|
||||
P4IVR::P4IV_8 => 8,
|
||||
P4IVR::P4IV_10 => 10,
|
||||
P4IVR::P4IV_12 => 12,
|
||||
P4IVR::P4IV_14 => 14,
|
||||
P4IVR::P4IV_16 => 16,
|
||||
P4IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P4IVR {
|
||||
match value {
|
||||
0 => P4IVR::P4IV_0,
|
||||
2 => P4IVR::P4IV_2,
|
||||
4 => P4IVR::P4IV_4,
|
||||
6 => P4IVR::P4IV_6,
|
||||
8 => P4IVR::P4IV_8,
|
||||
10 => P4IVR::P4IV_10,
|
||||
12 => P4IVR::P4IV_12,
|
||||
14 => P4IVR::P4IV_14,
|
||||
16 => P4IVR::P4IV_16,
|
||||
i => P4IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_0(&self) -> bool {
|
||||
*self == P4IVR::P4IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_2(&self) -> bool {
|
||||
*self == P4IVR::P4IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_4(&self) -> bool {
|
||||
*self == P4IVR::P4IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_6(&self) -> bool {
|
||||
*self == P4IVR::P4IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_8(&self) -> bool {
|
||||
*self == P4IVR::P4IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_10(&self) -> bool {
|
||||
*self == P4IVR::P4IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_12(&self) -> bool {
|
||||
*self == P4IVR::P4IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_14(&self) -> bool {
|
||||
*self == P4IVR::P4IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P4IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p4iv_16(&self) -> bool {
|
||||
*self == P4IVR::P4IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 4 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p4iv(&self) -> P4IVR {
|
||||
P4IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P5IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P5IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P5IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P5IV_0,
|
||||
#[doc = "Interrupt Source: Port 5.0 interrupt; Interrupt Flag: P5IFG0; Interrupt Priority: Highest"]
|
||||
P5IV_2,
|
||||
#[doc = "Interrupt Source: Port 5.1 interrupt; Interrupt Flag: P5IFG1"]
|
||||
P5IV_4,
|
||||
#[doc = "Interrupt Source: Port 5.2 interrupt; Interrupt Flag: P5IFG2"]
|
||||
P5IV_6,
|
||||
#[doc = "Interrupt Source: Port 5.3 interrupt; Interrupt Flag: P5IFG3"]
|
||||
P5IV_8,
|
||||
#[doc = "Interrupt Source: Port 5.4 interrupt; Interrupt Flag: P5IFG4"]
|
||||
P5IV_10,
|
||||
#[doc = "Interrupt Source: Port 5.5 interrupt; Interrupt Flag: P5IFG5"]
|
||||
P5IV_12,
|
||||
#[doc = "Interrupt Source: Port 5.6 interrupt; Interrupt Flag: P5IFG6"]
|
||||
P5IV_14,
|
||||
#[doc = "Interrupt Source: Port 5.7 interrupt; Interrupt Flag: P5IFG7; Interrupt Priority: Lowest"]
|
||||
P5IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P5IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P5IVR::P5IV_0 => 0,
|
||||
P5IVR::P5IV_2 => 2,
|
||||
P5IVR::P5IV_4 => 4,
|
||||
P5IVR::P5IV_6 => 6,
|
||||
P5IVR::P5IV_8 => 8,
|
||||
P5IVR::P5IV_10 => 10,
|
||||
P5IVR::P5IV_12 => 12,
|
||||
P5IVR::P5IV_14 => 14,
|
||||
P5IVR::P5IV_16 => 16,
|
||||
P5IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P5IVR {
|
||||
match value {
|
||||
0 => P5IVR::P5IV_0,
|
||||
2 => P5IVR::P5IV_2,
|
||||
4 => P5IVR::P5IV_4,
|
||||
6 => P5IVR::P5IV_6,
|
||||
8 => P5IVR::P5IV_8,
|
||||
10 => P5IVR::P5IV_10,
|
||||
12 => P5IVR::P5IV_12,
|
||||
14 => P5IVR::P5IV_14,
|
||||
16 => P5IVR::P5IV_16,
|
||||
i => P5IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_0(&self) -> bool {
|
||||
*self == P5IVR::P5IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_2(&self) -> bool {
|
||||
*self == P5IVR::P5IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_4(&self) -> bool {
|
||||
*self == P5IVR::P5IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_6(&self) -> bool {
|
||||
*self == P5IVR::P5IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_8(&self) -> bool {
|
||||
*self == P5IVR::P5IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_10(&self) -> bool {
|
||||
*self == P5IVR::P5IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_12(&self) -> bool {
|
||||
*self == P5IVR::P5IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_14(&self) -> bool {
|
||||
*self == P5IVR::P5IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P5IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p5iv_16(&self) -> bool {
|
||||
*self == P5IVR::P5IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 5 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p5iv(&self) -> P5IVR {
|
||||
P5IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P6IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P6IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P6IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P6IV_0,
|
||||
#[doc = "Interrupt Source: Port 6.0 interrupt; Interrupt Flag: P6IFG0; Interrupt Priority: Highest"]
|
||||
P6IV_2,
|
||||
#[doc = "Interrupt Source: Port 6.1 interrupt; Interrupt Flag: P6IFG1"]
|
||||
P6IV_4,
|
||||
#[doc = "Interrupt Source: Port 6.2 interrupt; Interrupt Flag: P6IFG2"]
|
||||
P6IV_6,
|
||||
#[doc = "Interrupt Source: Port 6.3 interrupt; Interrupt Flag: P6IFG3"]
|
||||
P6IV_8,
|
||||
#[doc = "Interrupt Source: Port 6.4 interrupt; Interrupt Flag: P6IFG4"]
|
||||
P6IV_10,
|
||||
#[doc = "Interrupt Source: Port 6.5 interrupt; Interrupt Flag: P6IFG5"]
|
||||
P6IV_12,
|
||||
#[doc = "Interrupt Source: Port 6.6 interrupt; Interrupt Flag: P6IFG6"]
|
||||
P6IV_14,
|
||||
#[doc = "Interrupt Source: Port 6.7 interrupt; Interrupt Flag: P6IFG7; Interrupt Priority: Lowest"]
|
||||
P6IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P6IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P6IVR::P6IV_0 => 0,
|
||||
P6IVR::P6IV_2 => 2,
|
||||
P6IVR::P6IV_4 => 4,
|
||||
P6IVR::P6IV_6 => 6,
|
||||
P6IVR::P6IV_8 => 8,
|
||||
P6IVR::P6IV_10 => 10,
|
||||
P6IVR::P6IV_12 => 12,
|
||||
P6IVR::P6IV_14 => 14,
|
||||
P6IVR::P6IV_16 => 16,
|
||||
P6IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P6IVR {
|
||||
match value {
|
||||
0 => P6IVR::P6IV_0,
|
||||
2 => P6IVR::P6IV_2,
|
||||
4 => P6IVR::P6IV_4,
|
||||
6 => P6IVR::P6IV_6,
|
||||
8 => P6IVR::P6IV_8,
|
||||
10 => P6IVR::P6IV_10,
|
||||
12 => P6IVR::P6IV_12,
|
||||
14 => P6IVR::P6IV_14,
|
||||
16 => P6IVR::P6IV_16,
|
||||
i => P6IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_0(&self) -> bool {
|
||||
*self == P6IVR::P6IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_2(&self) -> bool {
|
||||
*self == P6IVR::P6IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_4(&self) -> bool {
|
||||
*self == P6IVR::P6IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_6(&self) -> bool {
|
||||
*self == P6IVR::P6IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_8(&self) -> bool {
|
||||
*self == P6IVR::P6IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_10(&self) -> bool {
|
||||
*self == P6IVR::P6IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_12(&self) -> bool {
|
||||
*self == P6IVR::P6IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_14(&self) -> bool {
|
||||
*self == P6IVR::P6IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P6IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p6iv_16(&self) -> bool {
|
||||
*self == P6IVR::P6IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 6 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p6iv(&self) -> P6IVR {
|
||||
P6IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P7IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P7IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P7IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P7IV_0,
|
||||
#[doc = "Interrupt Source: Port 7.0 interrupt; Interrupt Flag: P7IFG0; Interrupt Priority: Highest"]
|
||||
P7IV_2,
|
||||
#[doc = "Interrupt Source: Port 7.1 interrupt; Interrupt Flag: P7IFG1"]
|
||||
P7IV_4,
|
||||
#[doc = "Interrupt Source: Port 7.2 interrupt; Interrupt Flag: P7IFG2"]
|
||||
P7IV_6,
|
||||
#[doc = "Interrupt Source: Port 7.3 interrupt; Interrupt Flag: P7IFG3"]
|
||||
P7IV_8,
|
||||
#[doc = "Interrupt Source: Port 7.4 interrupt; Interrupt Flag: P7IFG4"]
|
||||
P7IV_10,
|
||||
#[doc = "Interrupt Source: Port 7.5 interrupt; Interrupt Flag: P7IFG5"]
|
||||
P7IV_12,
|
||||
#[doc = "Interrupt Source: Port 7.6 interrupt; Interrupt Flag: P7IFG6"]
|
||||
P7IV_14,
|
||||
#[doc = "Interrupt Source: Port 7.7 interrupt; Interrupt Flag: P7IFG7; Interrupt Priority: Lowest"]
|
||||
P7IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P7IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P7IVR::P7IV_0 => 0,
|
||||
P7IVR::P7IV_2 => 2,
|
||||
P7IVR::P7IV_4 => 4,
|
||||
P7IVR::P7IV_6 => 6,
|
||||
P7IVR::P7IV_8 => 8,
|
||||
P7IVR::P7IV_10 => 10,
|
||||
P7IVR::P7IV_12 => 12,
|
||||
P7IVR::P7IV_14 => 14,
|
||||
P7IVR::P7IV_16 => 16,
|
||||
P7IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P7IVR {
|
||||
match value {
|
||||
0 => P7IVR::P7IV_0,
|
||||
2 => P7IVR::P7IV_2,
|
||||
4 => P7IVR::P7IV_4,
|
||||
6 => P7IVR::P7IV_6,
|
||||
8 => P7IVR::P7IV_8,
|
||||
10 => P7IVR::P7IV_10,
|
||||
12 => P7IVR::P7IV_12,
|
||||
14 => P7IVR::P7IV_14,
|
||||
16 => P7IVR::P7IV_16,
|
||||
i => P7IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_0(&self) -> bool {
|
||||
*self == P7IVR::P7IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_2(&self) -> bool {
|
||||
*self == P7IVR::P7IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_4(&self) -> bool {
|
||||
*self == P7IVR::P7IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_6(&self) -> bool {
|
||||
*self == P7IVR::P7IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_8(&self) -> bool {
|
||||
*self == P7IVR::P7IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_10(&self) -> bool {
|
||||
*self == P7IVR::P7IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_12(&self) -> bool {
|
||||
*self == P7IVR::P7IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_14(&self) -> bool {
|
||||
*self == P7IVR::P7IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P7IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p7iv_16(&self) -> bool {
|
||||
*self == P7IVR::P7IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 7 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p7iv(&self) -> P7IVR {
|
||||
P7IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P8IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P8IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P8IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P8IV_0,
|
||||
#[doc = "Interrupt Source: Port 8.0 interrupt; Interrupt Flag: P8IFG0; Interrupt Priority: Highest"]
|
||||
P8IV_2,
|
||||
#[doc = "Interrupt Source: Port 8.1 interrupt; Interrupt Flag: P8IFG1"]
|
||||
P8IV_4,
|
||||
#[doc = "Interrupt Source: Port 8.2 interrupt; Interrupt Flag: P8IFG2"]
|
||||
P8IV_6,
|
||||
#[doc = "Interrupt Source: Port 8.3 interrupt; Interrupt Flag: P8IFG3"]
|
||||
P8IV_8,
|
||||
#[doc = "Interrupt Source: Port 8.4 interrupt; Interrupt Flag: P8IFG4"]
|
||||
P8IV_10,
|
||||
#[doc = "Interrupt Source: Port 8.5 interrupt; Interrupt Flag: P8IFG5"]
|
||||
P8IV_12,
|
||||
#[doc = "Interrupt Source: Port 8.6 interrupt; Interrupt Flag: P8IFG6"]
|
||||
P8IV_14,
|
||||
#[doc = "Interrupt Source: Port 8.7 interrupt; Interrupt Flag: P8IFG7; Interrupt Priority: Lowest"]
|
||||
P8IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P8IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P8IVR::P8IV_0 => 0,
|
||||
P8IVR::P8IV_2 => 2,
|
||||
P8IVR::P8IV_4 => 4,
|
||||
P8IVR::P8IV_6 => 6,
|
||||
P8IVR::P8IV_8 => 8,
|
||||
P8IVR::P8IV_10 => 10,
|
||||
P8IVR::P8IV_12 => 12,
|
||||
P8IVR::P8IV_14 => 14,
|
||||
P8IVR::P8IV_16 => 16,
|
||||
P8IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P8IVR {
|
||||
match value {
|
||||
0 => P8IVR::P8IV_0,
|
||||
2 => P8IVR::P8IV_2,
|
||||
4 => P8IVR::P8IV_4,
|
||||
6 => P8IVR::P8IV_6,
|
||||
8 => P8IVR::P8IV_8,
|
||||
10 => P8IVR::P8IV_10,
|
||||
12 => P8IVR::P8IV_12,
|
||||
14 => P8IVR::P8IV_14,
|
||||
16 => P8IVR::P8IV_16,
|
||||
i => P8IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_0(&self) -> bool {
|
||||
*self == P8IVR::P8IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_2(&self) -> bool {
|
||||
*self == P8IVR::P8IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_4(&self) -> bool {
|
||||
*self == P8IVR::P8IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_6(&self) -> bool {
|
||||
*self == P8IVR::P8IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_8(&self) -> bool {
|
||||
*self == P8IVR::P8IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_10(&self) -> bool {
|
||||
*self == P8IVR::P8IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_12(&self) -> bool {
|
||||
*self == P8IVR::P8IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_14(&self) -> bool {
|
||||
*self == P8IVR::P8IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P8IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p8iv_16(&self) -> bool {
|
||||
*self == P8IVR::P8IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 8 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p8iv(&self) -> P8IVR {
|
||||
P8IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::P9IV {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `P9IV`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum P9IVR {
|
||||
#[doc = "No interrupt pending"]
|
||||
P9IV_0,
|
||||
#[doc = "Interrupt Source: Port 9.0 interrupt; Interrupt Flag: P9IFG0; Interrupt Priority: Highest"]
|
||||
P9IV_2,
|
||||
#[doc = "Interrupt Source: Port 9.1 interrupt; Interrupt Flag: P9IFG1"]
|
||||
P9IV_4,
|
||||
#[doc = "Interrupt Source: Port 9.2 interrupt; Interrupt Flag: P9IFG2"]
|
||||
P9IV_6,
|
||||
#[doc = "Interrupt Source: Port 9.3 interrupt; Interrupt Flag: P9IFG3"]
|
||||
P9IV_8,
|
||||
#[doc = "Interrupt Source: Port 9.4 interrupt; Interrupt Flag: P9IFG4"]
|
||||
P9IV_10,
|
||||
#[doc = "Interrupt Source: Port 9.5 interrupt; Interrupt Flag: P9IFG5"]
|
||||
P9IV_12,
|
||||
#[doc = "Interrupt Source: Port 9.6 interrupt; Interrupt Flag: P9IFG6"]
|
||||
P9IV_14,
|
||||
#[doc = "Interrupt Source: Port 9.7 interrupt; Interrupt Flag: P9IFG7; Interrupt Priority: Lowest"]
|
||||
P9IV_16,
|
||||
#[doc = r" Reserved"]
|
||||
_Reserved(u8),
|
||||
}
|
||||
impl P9IVR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
match *self {
|
||||
P9IVR::P9IV_0 => 0,
|
||||
P9IVR::P9IV_2 => 2,
|
||||
P9IVR::P9IV_4 => 4,
|
||||
P9IVR::P9IV_6 => 6,
|
||||
P9IVR::P9IV_8 => 8,
|
||||
P9IVR::P9IV_10 => 10,
|
||||
P9IVR::P9IV_12 => 12,
|
||||
P9IVR::P9IV_14 => 14,
|
||||
P9IVR::P9IV_16 => 16,
|
||||
P9IVR::_Reserved(bits) => bits,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: u8) -> P9IVR {
|
||||
match value {
|
||||
0 => P9IVR::P9IV_0,
|
||||
2 => P9IVR::P9IV_2,
|
||||
4 => P9IVR::P9IV_4,
|
||||
6 => P9IVR::P9IV_6,
|
||||
8 => P9IVR::P9IV_8,
|
||||
10 => P9IVR::P9IV_10,
|
||||
12 => P9IVR::P9IV_12,
|
||||
14 => P9IVR::P9IV_14,
|
||||
16 => P9IVR::P9IV_16,
|
||||
i => P9IVR::_Reserved(i),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_0`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_0(&self) -> bool {
|
||||
*self == P9IVR::P9IV_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_2`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_2(&self) -> bool {
|
||||
*self == P9IVR::P9IV_2
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_4`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_4(&self) -> bool {
|
||||
*self == P9IVR::P9IV_4
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_6`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_6(&self) -> bool {
|
||||
*self == P9IVR::P9IV_6
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_8`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_8(&self) -> bool {
|
||||
*self == P9IVR::P9IV_8
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_10`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_10(&self) -> bool {
|
||||
*self == P9IVR::P9IV_10
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_12`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_12(&self) -> bool {
|
||||
*self == P9IVR::P9IV_12
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_14`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_14(&self) -> bool {
|
||||
*self == P9IVR::P9IV_14
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P9IV_16`"]
|
||||
#[inline]
|
||||
pub fn is_p9iv_16(&self) -> bool {
|
||||
*self == P9IVR::P9IV_16
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:4 - Port 9 interrupt vector value"]
|
||||
#[inline]
|
||||
pub fn p9iv(&self) -> P9IVR {
|
||||
P9IVR::_from({
|
||||
const MASK: u8 = 31;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PADIR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1DIRR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1DIRR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2DIRR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2DIRR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1DIRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1DIRW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2DIRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2DIRW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Direction"]
|
||||
#[inline]
|
||||
pub fn p1dir(&self) -> P1DIRR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1DIRR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Direction"]
|
||||
#[inline]
|
||||
pub fn p2dir(&self) -> P2DIRR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2DIRR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Direction"]
|
||||
#[inline]
|
||||
pub fn p1dir(&mut self) -> _P1DIRW {
|
||||
_P1DIRW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Direction"]
|
||||
#[inline]
|
||||
pub fn p2dir(&mut self) -> _P2DIRW {
|
||||
_P2DIRW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PADS {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1DSR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1DSR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2DSR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2DSR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1DSW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1DSW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2DSW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2DSW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p1ds(&self) -> P1DSR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1DSR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p2ds(&self) -> P2DSR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2DSR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p1ds(&mut self) -> _P1DSW {
|
||||
_P1DSW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p2ds(&mut self) -> _P2DSW {
|
||||
_P2DSW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAIE {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1IER {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1IER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2IER {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2IER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1IEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1IEW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2IEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2IEW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p1ie(&self) -> P1IER {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1IER { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p2ie(&self) -> P2IER {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2IER { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p1ie(&mut self) -> _P1IEW {
|
||||
_P1IEW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p2ie(&mut self) -> _P2IEW {
|
||||
_P2IEW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAIES {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1IESR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1IESR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2IESR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2IESR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1IESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1IESW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2IESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2IESW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p1ies(&self) -> P1IESR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1IESR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p2ies(&self) -> P2IESR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2IESR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p1ies(&mut self) -> _P1IESW {
|
||||
_P1IESW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p2ies(&mut self) -> _P2IESW {
|
||||
_P2IESW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAIFG {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1IFGR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1IFGR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2IFGR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2IFGR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1IFGW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2IFGW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p1ifg(&self) -> P1IFGR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1IFGR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p2ifg(&self) -> P2IFGR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2IFGR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p1ifg(&mut self) -> _P1IFGW {
|
||||
_P1IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p2ifg(&mut self) -> _P2IFGW {
|
||||
_P2IFGW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAIN {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1INR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1INR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2INR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2INR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Input"]
|
||||
#[inline]
|
||||
pub fn p1in(&self) -> P1INR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1INR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Input"]
|
||||
#[inline]
|
||||
pub fn p2in(&self) -> P2INR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2INR { bits }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAOUT {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2OUTR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2OUTR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1OUTR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1OUTR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2OUTW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2OUTW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1OUTW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1OUTW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Output"]
|
||||
#[inline]
|
||||
pub fn p2out(&self) -> P2OUTR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2OUTR { bits }
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Output"]
|
||||
#[inline]
|
||||
pub fn p1out(&self) -> P1OUTR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1OUTR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Output"]
|
||||
#[inline]
|
||||
pub fn p2out(&mut self) -> _P2OUTW {
|
||||
_P2OUTW { w: self }
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Output"]
|
||||
#[inline]
|
||||
pub fn p1out(&mut self) -> _P1OUTW {
|
||||
_P1OUTW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PAREN {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1RENR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1RENR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2RENR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2RENR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1RENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1RENW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2RENW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2RENW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Resistor Enable"]
|
||||
#[inline]
|
||||
pub fn p1ren(&self) -> P1RENR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1RENR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Resistor Enable"]
|
||||
#[inline]
|
||||
pub fn p2ren(&self) -> P2RENR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2RENR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Resistor Enable"]
|
||||
#[inline]
|
||||
pub fn p1ren(&mut self) -> _P1RENW {
|
||||
_P1RENW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Resistor Enable"]
|
||||
#[inline]
|
||||
pub fn p2ren(&mut self) -> _P2RENW {
|
||||
_P2RENW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PASEL0 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1SEL0R {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1SEL0R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2SEL0R {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2SEL0R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1SEL0W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1SEL0W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2SEL0W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2SEL0W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Select 0"]
|
||||
#[inline]
|
||||
pub fn p1sel0(&self) -> P1SEL0R {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1SEL0R { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Select 0"]
|
||||
#[inline]
|
||||
pub fn p2sel0(&self) -> P2SEL0R {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2SEL0R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Select 0"]
|
||||
#[inline]
|
||||
pub fn p1sel0(&mut self) -> _P1SEL0W {
|
||||
_P1SEL0W { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Select 0"]
|
||||
#[inline]
|
||||
pub fn p2sel0(&mut self) -> _P2SEL0W {
|
||||
_P2SEL0W { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PASEL1 {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1SEL1R {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1SEL1R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2SEL1R {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2SEL1R {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1SEL1W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1SEL1W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2SEL1W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2SEL1W<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Select 1"]
|
||||
#[inline]
|
||||
pub fn p1sel1(&self) -> P1SEL1R {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1SEL1R { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Select 1"]
|
||||
#[inline]
|
||||
pub fn p2sel1(&self) -> P2SEL1R {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2SEL1R { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Select 1"]
|
||||
#[inline]
|
||||
pub fn p1sel1(&mut self) -> _P1SEL1W {
|
||||
_P1SEL1W { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Select 1"]
|
||||
#[inline]
|
||||
pub fn p2sel1(&mut self) -> _P2SEL1W {
|
||||
_P2SEL1W { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PASELC {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P1SELCR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P1SELCR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P2SELCR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P2SELCR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P1SELCW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P1SELCW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P2SELCW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P2SELCW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Complement Select"]
|
||||
#[inline]
|
||||
pub fn p1selc(&self) -> P1SELCR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P1SELCR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Complement Select"]
|
||||
#[inline]
|
||||
pub fn p2selc(&self) -> P2SELCR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P2SELCR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 1 Complement Select"]
|
||||
#[inline]
|
||||
pub fn p1selc(&mut self) -> _P1SELCW {
|
||||
_P1SELCW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 2 Complement Select"]
|
||||
#[inline]
|
||||
pub fn p2selc(&mut self) -> _P2SELCW {
|
||||
_P2SELCW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBDIR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3DIRR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3DIRR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4DIRR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4DIRR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P3DIRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P3DIRW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P4DIRW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P4DIRW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Direction"]
|
||||
#[inline]
|
||||
pub fn p3dir(&self) -> P3DIRR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3DIRR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Direction"]
|
||||
#[inline]
|
||||
pub fn p4dir(&self) -> P4DIRR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4DIRR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Direction"]
|
||||
#[inline]
|
||||
pub fn p3dir(&mut self) -> _P3DIRW {
|
||||
_P3DIRW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Direction"]
|
||||
#[inline]
|
||||
pub fn p4dir(&mut self) -> _P4DIRW {
|
||||
_P4DIRW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBDS {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3DSR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3DSR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4DSR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4DSR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P3DSW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P3DSW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P4DSW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P4DSW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p3ds(&self) -> P3DSR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3DSR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p4ds(&self) -> P4DSR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4DSR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p3ds(&mut self) -> _P3DSW {
|
||||
_P3DSW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Drive Strength"]
|
||||
#[inline]
|
||||
pub fn p4ds(&mut self) -> _P4DSW {
|
||||
_P4DSW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBIE {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3IER {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3IER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4IER {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4IER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P3IEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P3IEW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P4IEW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P4IEW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p3ie(&self) -> P3IER {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3IER { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p4ie(&self) -> P4IER {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4IER { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p3ie(&mut self) -> _P3IEW {
|
||||
_P3IEW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Enable"]
|
||||
#[inline]
|
||||
pub fn p4ie(&mut self) -> _P4IEW {
|
||||
_P4IEW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBIES {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3IESR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3IESR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4IESR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4IESR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P3IESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P3IESW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P4IESW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P4IESW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p3ies(&self) -> P3IESR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3IESR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p4ies(&self) -> P4IESR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4IESR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p3ies(&mut self) -> _P3IESW {
|
||||
_P3IESW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Edge Select"]
|
||||
#[inline]
|
||||
pub fn p4ies(&mut self) -> _P4IESW {
|
||||
_P4IESW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBIFG {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3IFGR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3IFGR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4IFGR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4IFGR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P3IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P3IFGW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _P4IFGW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _P4IFGW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
self.w.bits &= !((MASK as u16) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u16) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p3ifg(&self) -> P3IFGR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3IFGR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p4ifg(&self) -> P4IFGR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4IFGR { bits }
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p3ifg(&mut self) -> _P3IFGW {
|
||||
_P3IFGW { w: self }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Interrupt Flag"]
|
||||
#[inline]
|
||||
pub fn p4ifg(&mut self) -> _P4IFGW {
|
||||
_P4IFGW { w: self }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u16,
|
||||
}
|
||||
impl super::PBIN {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R {
|
||||
bits: self.register.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P3INR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P3INR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct P4INR {
|
||||
bits: u8,
|
||||
}
|
||||
impl P4INR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:7 - Port 3 Input"]
|
||||
#[inline]
|
||||
pub fn p3in(&self) -> P3INR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P3INR { bits }
|
||||
}
|
||||
#[doc = "Bits 8:15 - Port 4 Input"]
|
||||
#[inline]
|
||||
pub fn p4in(&self) -> P4INR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u16) as u8
|
||||
};
|
||||
P4INR { bits }
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue