Initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/target
|
||||
Cargo.lock
|
||||
10
Cargo.toml
Normal file
10
Cargo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "nrf52"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
cortex-m = "0.7.2"
|
||||
vcell = "0.1.3"
|
||||
16
build.rs
Normal file
16
build.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
fn main() {
|
||||
if env::var_os("CARGO_FEATURE_RT").is_some() {
|
||||
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
||||
File::create(out.join("device.x"))
|
||||
.unwrap()
|
||||
.write_all(include_bytes!("device.x"))
|
||||
.unwrap();
|
||||
println!("cargo:rustc-link-search={}", out.display());
|
||||
println!("cargo:rerun-if-changed=device.x");
|
||||
}
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
38
device.x
Normal file
38
device.x
Normal file
@@ -0,0 +1,38 @@
|
||||
PROVIDE(POWER_CLOCK = DefaultHandler);
|
||||
PROVIDE(RADIO = DefaultHandler);
|
||||
PROVIDE(UARTE0_UART0 = DefaultHandler);
|
||||
PROVIDE(SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = DefaultHandler);
|
||||
PROVIDE(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = DefaultHandler);
|
||||
PROVIDE(NFCT = DefaultHandler);
|
||||
PROVIDE(GPIOTE = DefaultHandler);
|
||||
PROVIDE(SAADC = DefaultHandler);
|
||||
PROVIDE(TIMER0 = DefaultHandler);
|
||||
PROVIDE(TIMER1 = DefaultHandler);
|
||||
PROVIDE(TIMER2 = DefaultHandler);
|
||||
PROVIDE(RTC0 = DefaultHandler);
|
||||
PROVIDE(TEMP = DefaultHandler);
|
||||
PROVIDE(RNG = DefaultHandler);
|
||||
PROVIDE(ECB = DefaultHandler);
|
||||
PROVIDE(CCM_AAR = DefaultHandler);
|
||||
PROVIDE(WDT = DefaultHandler);
|
||||
PROVIDE(RTC1 = DefaultHandler);
|
||||
PROVIDE(QDEC = DefaultHandler);
|
||||
PROVIDE(COMP_LPCOMP = DefaultHandler);
|
||||
PROVIDE(SWI0_EGU0 = DefaultHandler);
|
||||
PROVIDE(SWI1_EGU1 = DefaultHandler);
|
||||
PROVIDE(SWI2_EGU2 = DefaultHandler);
|
||||
PROVIDE(SWI3_EGU3 = DefaultHandler);
|
||||
PROVIDE(SWI4_EGU4 = DefaultHandler);
|
||||
PROVIDE(SWI5_EGU5 = DefaultHandler);
|
||||
PROVIDE(TIMER3 = DefaultHandler);
|
||||
PROVIDE(TIMER4 = DefaultHandler);
|
||||
PROVIDE(PWM0 = DefaultHandler);
|
||||
PROVIDE(PDM = DefaultHandler);
|
||||
PROVIDE(MWU = DefaultHandler);
|
||||
PROVIDE(PWM1 = DefaultHandler);
|
||||
PROVIDE(PWM2 = DefaultHandler);
|
||||
PROVIDE(SPIM2_SPIS2_SPI2 = DefaultHandler);
|
||||
PROVIDE(RTC2 = DefaultHandler);
|
||||
PROVIDE(I2S = DefaultHandler);
|
||||
PROVIDE(FPU = DefaultHandler);
|
||||
|
||||
88
src/aar.rs
Normal file
88
src/aar.rs
Normal file
@@ -0,0 +1,88 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure"]
|
||||
pub tasks_start: crate::Reg<tasks_start::TASKS_START_SPEC>,
|
||||
_reserved1: [u8; 0x04],
|
||||
#[doc = "0x08 - Stop resolving addresses"]
|
||||
pub tasks_stop: crate::Reg<tasks_stop::TASKS_STOP_SPEC>,
|
||||
_reserved2: [u8; 0xf4],
|
||||
#[doc = "0x100 - Address resolution procedure complete"]
|
||||
pub events_end: crate::Reg<events_end::EVENTS_END_SPEC>,
|
||||
#[doc = "0x104 - Address resolved"]
|
||||
pub events_resolved: crate::Reg<events_resolved::EVENTS_RESOLVED_SPEC>,
|
||||
#[doc = "0x108 - Address not resolved"]
|
||||
pub events_notresolved: crate::Reg<events_notresolved::EVENTS_NOTRESOLVED_SPEC>,
|
||||
_reserved5: [u8; 0x01f8],
|
||||
#[doc = "0x304 - Enable interrupt"]
|
||||
pub intenset: crate::Reg<intenset::INTENSET_SPEC>,
|
||||
#[doc = "0x308 - Disable interrupt"]
|
||||
pub intenclr: crate::Reg<intenclr::INTENCLR_SPEC>,
|
||||
_reserved7: [u8; 0xf4],
|
||||
#[doc = "0x400 - Resolution status"]
|
||||
pub status: crate::Reg<status::STATUS_SPEC>,
|
||||
_reserved8: [u8; 0xfc],
|
||||
#[doc = "0x500 - Enable AAR"]
|
||||
pub enable: crate::Reg<enable::ENABLE_SPEC>,
|
||||
#[doc = "0x504 - Number of IRKs"]
|
||||
pub nirk: crate::Reg<nirk::NIRK_SPEC>,
|
||||
#[doc = "0x508 - Pointer to IRK data structure"]
|
||||
pub irkptr: crate::Reg<irkptr::IRKPTR_SPEC>,
|
||||
_reserved11: [u8; 0x04],
|
||||
#[doc = "0x510 - Pointer to the resolvable address"]
|
||||
pub addrptr: crate::Reg<addrptr::ADDRPTR_SPEC>,
|
||||
#[doc = "0x514 - Pointer to data area used for temporary storage"]
|
||||
pub scratchptr: crate::Reg<scratchptr::SCRATCHPTR_SPEC>,
|
||||
}
|
||||
#[doc = "TASKS_START register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
|
||||
pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
|
||||
#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure"]
|
||||
pub mod tasks_start;
|
||||
#[doc = "TASKS_STOP register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
|
||||
pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
|
||||
#[doc = "Stop resolving addresses"]
|
||||
pub mod tasks_stop;
|
||||
#[doc = "EVENTS_END register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
|
||||
pub type EVENTS_END = crate::Reg<events_end::EVENTS_END_SPEC>;
|
||||
#[doc = "Address resolution procedure complete"]
|
||||
pub mod events_end;
|
||||
#[doc = "EVENTS_RESOLVED register accessor: an alias for `Reg<EVENTS_RESOLVED_SPEC>`"]
|
||||
pub type EVENTS_RESOLVED = crate::Reg<events_resolved::EVENTS_RESOLVED_SPEC>;
|
||||
#[doc = "Address resolved"]
|
||||
pub mod events_resolved;
|
||||
#[doc = "EVENTS_NOTRESOLVED register accessor: an alias for `Reg<EVENTS_NOTRESOLVED_SPEC>`"]
|
||||
pub type EVENTS_NOTRESOLVED = crate::Reg<events_notresolved::EVENTS_NOTRESOLVED_SPEC>;
|
||||
#[doc = "Address not resolved"]
|
||||
pub mod events_notresolved;
|
||||
#[doc = "INTENSET register accessor: an alias for `Reg<INTENSET_SPEC>`"]
|
||||
pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
|
||||
#[doc = "Enable interrupt"]
|
||||
pub mod intenset;
|
||||
#[doc = "INTENCLR register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
|
||||
pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
|
||||
#[doc = "Disable interrupt"]
|
||||
pub mod intenclr;
|
||||
#[doc = "STATUS register accessor: an alias for `Reg<STATUS_SPEC>`"]
|
||||
pub type STATUS = crate::Reg<status::STATUS_SPEC>;
|
||||
#[doc = "Resolution status"]
|
||||
pub mod status;
|
||||
#[doc = "ENABLE register accessor: an alias for `Reg<ENABLE_SPEC>`"]
|
||||
pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
|
||||
#[doc = "Enable AAR"]
|
||||
pub mod enable;
|
||||
#[doc = "NIRK register accessor: an alias for `Reg<NIRK_SPEC>`"]
|
||||
pub type NIRK = crate::Reg<nirk::NIRK_SPEC>;
|
||||
#[doc = "Number of IRKs"]
|
||||
pub mod nirk;
|
||||
#[doc = "IRKPTR register accessor: an alias for `Reg<IRKPTR_SPEC>`"]
|
||||
pub type IRKPTR = crate::Reg<irkptr::IRKPTR_SPEC>;
|
||||
#[doc = "Pointer to IRK data structure"]
|
||||
pub mod irkptr;
|
||||
#[doc = "ADDRPTR register accessor: an alias for `Reg<ADDRPTR_SPEC>`"]
|
||||
pub type ADDRPTR = crate::Reg<addrptr::ADDRPTR_SPEC>;
|
||||
#[doc = "Pointer to the resolvable address"]
|
||||
pub mod addrptr;
|
||||
#[doc = "SCRATCHPTR register accessor: an alias for `Reg<SCRATCHPTR_SPEC>`"]
|
||||
pub type SCRATCHPTR = crate::Reg<scratchptr::SCRATCHPTR_SPEC>;
|
||||
#[doc = "Pointer to data area used for temporary storage"]
|
||||
pub mod scratchptr;
|
||||
102
src/aar/addrptr.rs
Normal file
102
src/aar/addrptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `ADDRPTR` reader"]
|
||||
pub struct R(crate::R<ADDRPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDRPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDRPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDRPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDRPTR` writer"]
|
||||
pub struct W(crate::W<ADDRPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDRPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<ADDRPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDRPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRPTR` reader - Pointer to the resolvable address (6-bytes)"]
|
||||
pub struct ADDRPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl ADDRPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
ADDRPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ADDRPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRPTR` writer - Pointer to the resolvable address (6-bytes)"]
|
||||
pub struct ADDRPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ADDRPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"]
|
||||
#[inline(always)]
|
||||
pub fn addrptr(&self) -> ADDRPTR_R {
|
||||
ADDRPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"]
|
||||
#[inline(always)]
|
||||
pub fn addrptr(&mut self) -> ADDRPTR_W {
|
||||
ADDRPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Pointer to the resolvable address\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [addrptr](index.html) module"]
|
||||
pub struct ADDRPTR_SPEC;
|
||||
impl crate::RegisterSpec for ADDRPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [addrptr::R](R) reader structure"]
|
||||
impl crate::Readable for ADDRPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [addrptr::W](W) writer structure"]
|
||||
impl crate::Writable for ADDRPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDRPTR to value 0"]
|
||||
impl crate::Resettable for ADDRPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
151
src/aar/enable.rs
Normal file
151
src/aar/enable.rs
Normal file
@@ -0,0 +1,151 @@
|
||||
#[doc = "Register `ENABLE` reader"]
|
||||
pub struct R(crate::R<ENABLE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ENABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ENABLE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ENABLE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ENABLE` writer"]
|
||||
pub struct W(crate::W<ENABLE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ENABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<ENABLE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ENABLE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Enable or disable AAR\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum ENABLE_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "3: Enable"]
|
||||
ENABLED = 3,
|
||||
}
|
||||
impl From<ENABLE_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENABLE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` reader - Enable or disable AAR"]
|
||||
pub struct ENABLE_R(crate::FieldReader<u8, ENABLE_A>);
|
||||
impl ENABLE_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<ENABLE_A> {
|
||||
match self.bits {
|
||||
0 => Some(ENABLE_A::DISABLED),
|
||||
3 => Some(ENABLE_A::ENABLED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENABLE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENABLE_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLE_R {
|
||||
type Target = crate::FieldReader<u8, ENABLE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` writer - Enable or disable AAR"]
|
||||
pub struct ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENABLE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENABLE_A) -> &'a mut W {
|
||||
unsafe { self.bits(variant.into()) }
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::ENABLED)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:1 - Enable or disable AAR"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) -> ENABLE_R {
|
||||
ENABLE_R::new((self.bits & 0x03) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:1 - Enable or disable AAR"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&mut self) -> ENABLE_W {
|
||||
ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Enable AAR\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [enable](index.html) module"]
|
||||
pub struct ENABLE_SPEC;
|
||||
impl crate::RegisterSpec for ENABLE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [enable::R](R) reader structure"]
|
||||
impl crate::Readable for ENABLE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"]
|
||||
impl crate::Writable for ENABLE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ENABLE to value 0"]
|
||||
impl crate::Resettable for ENABLE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/aar/events_end.rs
Normal file
64
src/aar/events_end.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_END` reader"]
|
||||
pub struct R(crate::R<EVENTS_END_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_END_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_END_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_END_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_END` writer"]
|
||||
pub struct W(crate::W<EVENTS_END_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_END_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_END_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_END_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Address resolution procedure complete\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_end](index.html) module"]
|
||||
pub struct EVENTS_END_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_END_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_end::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_END_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_END_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_END to value 0"]
|
||||
impl crate::Resettable for EVENTS_END_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/aar/events_notresolved.rs
Normal file
64
src/aar/events_notresolved.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_NOTRESOLVED` reader"]
|
||||
pub struct R(crate::R<EVENTS_NOTRESOLVED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_NOTRESOLVED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_NOTRESOLVED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_NOTRESOLVED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_NOTRESOLVED` writer"]
|
||||
pub struct W(crate::W<EVENTS_NOTRESOLVED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_NOTRESOLVED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_NOTRESOLVED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_NOTRESOLVED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Address not resolved\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_notresolved](index.html) module"]
|
||||
pub struct EVENTS_NOTRESOLVED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_NOTRESOLVED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_notresolved::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_NOTRESOLVED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_notresolved::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_NOTRESOLVED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_NOTRESOLVED to value 0"]
|
||||
impl crate::Resettable for EVENTS_NOTRESOLVED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/aar/events_resolved.rs
Normal file
64
src/aar/events_resolved.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_RESOLVED` reader"]
|
||||
pub struct R(crate::R<EVENTS_RESOLVED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_RESOLVED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_RESOLVED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_RESOLVED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_RESOLVED` writer"]
|
||||
pub struct W(crate::W<EVENTS_RESOLVED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_RESOLVED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_RESOLVED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_RESOLVED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Address resolved\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_resolved](index.html) module"]
|
||||
pub struct EVENTS_RESOLVED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_RESOLVED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_resolved::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_RESOLVED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_resolved::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_RESOLVED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_RESOLVED to value 0"]
|
||||
impl crate::Resettable for EVENTS_RESOLVED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
366
src/aar/intenclr.rs
Normal file
366
src/aar/intenclr.rs
Normal file
@@ -0,0 +1,366 @@
|
||||
#[doc = "Register `INTENCLR` reader"]
|
||||
pub struct R(crate::R<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENCLR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENCLR` writer"]
|
||||
pub struct W(crate::W<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENCLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for END event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum END_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<END_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: END_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `END` reader - Write '1' to Disable interrupt for END event"]
|
||||
pub struct END_R(crate::FieldReader<bool, END_A>);
|
||||
impl END_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
END_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> END_A {
|
||||
match self.bits {
|
||||
false => END_A::DISABLED,
|
||||
true => END_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == END_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == END_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for END_R {
|
||||
type Target = crate::FieldReader<bool, END_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for END event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum END_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<END_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: END_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `END` writer - Write '1' to Disable interrupt for END event"]
|
||||
pub struct END_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> END_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: END_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(END_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for RESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RESOLVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<RESOLVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RESOLVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESOLVED` reader - Write '1' to Disable interrupt for RESOLVED event"]
|
||||
pub struct RESOLVED_R(crate::FieldReader<bool, RESOLVED_A>);
|
||||
impl RESOLVED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RESOLVED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RESOLVED_A {
|
||||
match self.bits {
|
||||
false => RESOLVED_A::DISABLED,
|
||||
true => RESOLVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == RESOLVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == RESOLVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RESOLVED_R {
|
||||
type Target = crate::FieldReader<bool, RESOLVED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for RESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RESOLVED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<RESOLVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RESOLVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESOLVED` writer - Write '1' to Disable interrupt for RESOLVED event"]
|
||||
pub struct RESOLVED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RESOLVED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: RESOLVED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(RESOLVED_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for NOTRESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NOTRESOLVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<NOTRESOLVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NOTRESOLVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NOTRESOLVED` reader - Write '1' to Disable interrupt for NOTRESOLVED event"]
|
||||
pub struct NOTRESOLVED_R(crate::FieldReader<bool, NOTRESOLVED_A>);
|
||||
impl NOTRESOLVED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NOTRESOLVED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> NOTRESOLVED_A {
|
||||
match self.bits {
|
||||
false => NOTRESOLVED_A::DISABLED,
|
||||
true => NOTRESOLVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == NOTRESOLVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == NOTRESOLVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NOTRESOLVED_R {
|
||||
type Target = crate::FieldReader<bool, NOTRESOLVED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for NOTRESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NOTRESOLVED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<NOTRESOLVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NOTRESOLVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NOTRESOLVED` writer - Write '1' to Disable interrupt for NOTRESOLVED event"]
|
||||
pub struct NOTRESOLVED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NOTRESOLVED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: NOTRESOLVED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(NOTRESOLVED_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for END event"]
|
||||
#[inline(always)]
|
||||
pub fn end(&self) -> END_R {
|
||||
END_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for RESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn resolved(&self) -> RESOLVED_R {
|
||||
RESOLVED_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Disable interrupt for NOTRESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn notresolved(&self) -> NOTRESOLVED_R {
|
||||
NOTRESOLVED_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for END event"]
|
||||
#[inline(always)]
|
||||
pub fn end(&mut self) -> END_W {
|
||||
END_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for RESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn resolved(&mut self) -> RESOLVED_W {
|
||||
RESOLVED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Disable interrupt for NOTRESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn notresolved(&mut self) -> NOTRESOLVED_W {
|
||||
NOTRESOLVED_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
|
||||
pub struct INTENCLR_SPEC;
|
||||
impl crate::RegisterSpec for INTENCLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
|
||||
impl crate::Readable for INTENCLR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
|
||||
impl crate::Writable for INTENCLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTENCLR to value 0"]
|
||||
impl crate::Resettable for INTENCLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
366
src/aar/intenset.rs
Normal file
366
src/aar/intenset.rs
Normal file
@@ -0,0 +1,366 @@
|
||||
#[doc = "Register `INTENSET` reader"]
|
||||
pub struct R(crate::R<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENSET_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENSET` writer"]
|
||||
pub struct W(crate::W<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENSET_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for END event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum END_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<END_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: END_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `END` reader - Write '1' to Enable interrupt for END event"]
|
||||
pub struct END_R(crate::FieldReader<bool, END_A>);
|
||||
impl END_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
END_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> END_A {
|
||||
match self.bits {
|
||||
false => END_A::DISABLED,
|
||||
true => END_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == END_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == END_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for END_R {
|
||||
type Target = crate::FieldReader<bool, END_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for END event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum END_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<END_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: END_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `END` writer - Write '1' to Enable interrupt for END event"]
|
||||
pub struct END_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> END_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: END_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(END_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for RESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RESOLVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<RESOLVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RESOLVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESOLVED` reader - Write '1' to Enable interrupt for RESOLVED event"]
|
||||
pub struct RESOLVED_R(crate::FieldReader<bool, RESOLVED_A>);
|
||||
impl RESOLVED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RESOLVED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RESOLVED_A {
|
||||
match self.bits {
|
||||
false => RESOLVED_A::DISABLED,
|
||||
true => RESOLVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == RESOLVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == RESOLVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RESOLVED_R {
|
||||
type Target = crate::FieldReader<bool, RESOLVED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for RESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RESOLVED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<RESOLVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RESOLVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESOLVED` writer - Write '1' to Enable interrupt for RESOLVED event"]
|
||||
pub struct RESOLVED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RESOLVED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: RESOLVED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(RESOLVED_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for NOTRESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NOTRESOLVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<NOTRESOLVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NOTRESOLVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NOTRESOLVED` reader - Write '1' to Enable interrupt for NOTRESOLVED event"]
|
||||
pub struct NOTRESOLVED_R(crate::FieldReader<bool, NOTRESOLVED_A>);
|
||||
impl NOTRESOLVED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
NOTRESOLVED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> NOTRESOLVED_A {
|
||||
match self.bits {
|
||||
false => NOTRESOLVED_A::DISABLED,
|
||||
true => NOTRESOLVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == NOTRESOLVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == NOTRESOLVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NOTRESOLVED_R {
|
||||
type Target = crate::FieldReader<bool, NOTRESOLVED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for NOTRESOLVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NOTRESOLVED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<NOTRESOLVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NOTRESOLVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NOTRESOLVED` writer - Write '1' to Enable interrupt for NOTRESOLVED event"]
|
||||
pub struct NOTRESOLVED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NOTRESOLVED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: NOTRESOLVED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(NOTRESOLVED_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to Enable interrupt for END event"]
|
||||
#[inline(always)]
|
||||
pub fn end(&self) -> END_R {
|
||||
END_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Enable interrupt for RESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn resolved(&self) -> RESOLVED_R {
|
||||
RESOLVED_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Enable interrupt for NOTRESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn notresolved(&self) -> NOTRESOLVED_R {
|
||||
NOTRESOLVED_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to Enable interrupt for END event"]
|
||||
#[inline(always)]
|
||||
pub fn end(&mut self) -> END_W {
|
||||
END_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Enable interrupt for RESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn resolved(&mut self) -> RESOLVED_W {
|
||||
RESOLVED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Enable interrupt for NOTRESOLVED event"]
|
||||
#[inline(always)]
|
||||
pub fn notresolved(&mut self) -> NOTRESOLVED_W {
|
||||
NOTRESOLVED_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Enable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](index.html) module"]
|
||||
pub struct INTENSET_SPEC;
|
||||
impl crate::RegisterSpec for INTENSET_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
|
||||
impl crate::Readable for INTENSET_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
|
||||
impl crate::Writable for INTENSET_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTENSET to value 0"]
|
||||
impl crate::Resettable for INTENSET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
102
src/aar/irkptr.rs
Normal file
102
src/aar/irkptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `IRKPTR` reader"]
|
||||
pub struct R(crate::R<IRKPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRKPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRKPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRKPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `IRKPTR` writer"]
|
||||
pub struct W(crate::W<IRKPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<IRKPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<IRKPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<IRKPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRKPTR` reader - Pointer to the IRK data structure"]
|
||||
pub struct IRKPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl IRKPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
IRKPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRKPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRKPTR` writer - Pointer to the IRK data structure"]
|
||||
pub struct IRKPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRKPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Pointer to the IRK data structure"]
|
||||
#[inline(always)]
|
||||
pub fn irkptr(&self) -> IRKPTR_R {
|
||||
IRKPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Pointer to the IRK data structure"]
|
||||
#[inline(always)]
|
||||
pub fn irkptr(&mut self) -> IRKPTR_W {
|
||||
IRKPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Pointer to IRK data structure\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irkptr](index.html) module"]
|
||||
pub struct IRKPTR_SPEC;
|
||||
impl crate::RegisterSpec for IRKPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irkptr::R](R) reader structure"]
|
||||
impl crate::Readable for IRKPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [irkptr::W](W) writer structure"]
|
||||
impl crate::Writable for IRKPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRKPTR to value 0"]
|
||||
impl crate::Resettable for IRKPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
102
src/aar/nirk.rs
Normal file
102
src/aar/nirk.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `NIRK` reader"]
|
||||
pub struct R(crate::R<NIRK_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<NIRK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<NIRK_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<NIRK_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `NIRK` writer"]
|
||||
pub struct W(crate::W<NIRK_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<NIRK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<NIRK_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<NIRK_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NIRK` reader - Number of Identity root keys available in the IRK data structure"]
|
||||
pub struct NIRK_R(crate::FieldReader<u8, u8>);
|
||||
impl NIRK_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
NIRK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for NIRK_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NIRK` writer - Number of Identity root keys available in the IRK data structure"]
|
||||
pub struct NIRK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> NIRK_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"]
|
||||
#[inline(always)]
|
||||
pub fn nirk(&self) -> NIRK_R {
|
||||
NIRK_R::new((self.bits & 0x1f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"]
|
||||
#[inline(always)]
|
||||
pub fn nirk(&mut self) -> NIRK_W {
|
||||
NIRK_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Number of IRKs\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [nirk](index.html) module"]
|
||||
pub struct NIRK_SPEC;
|
||||
impl crate::RegisterSpec for NIRK_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [nirk::R](R) reader structure"]
|
||||
impl crate::Readable for NIRK_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [nirk::W](W) writer structure"]
|
||||
impl crate::Writable for NIRK_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets NIRK to value 0x01"]
|
||||
impl crate::Resettable for NIRK_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
102
src/aar/scratchptr.rs
Normal file
102
src/aar/scratchptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `SCRATCHPTR` reader"]
|
||||
pub struct R(crate::R<SCRATCHPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SCRATCHPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SCRATCHPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SCRATCHPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SCRATCHPTR` writer"]
|
||||
pub struct W(crate::W<SCRATCHPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SCRATCHPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<SCRATCHPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SCRATCHPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."]
|
||||
pub struct SCRATCHPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl SCRATCHPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
SCRATCHPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SCRATCHPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."]
|
||||
pub struct SCRATCHPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SCRATCHPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."]
|
||||
#[inline(always)]
|
||||
pub fn scratchptr(&self) -> SCRATCHPTR_R {
|
||||
SCRATCHPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."]
|
||||
#[inline(always)]
|
||||
pub fn scratchptr(&mut self) -> SCRATCHPTR_W {
|
||||
SCRATCHPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Pointer to data area used for temporary storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [scratchptr](index.html) module"]
|
||||
pub struct SCRATCHPTR_SPEC;
|
||||
impl crate::RegisterSpec for SCRATCHPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [scratchptr::R](R) reader structure"]
|
||||
impl crate::Readable for SCRATCHPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"]
|
||||
impl crate::Writable for SCRATCHPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SCRATCHPTR to value 0"]
|
||||
impl crate::Resettable for SCRATCHPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
52
src/aar/status.rs
Normal file
52
src/aar/status.rs
Normal file
@@ -0,0 +1,52 @@
|
||||
#[doc = "Register `STATUS` reader"]
|
||||
pub struct R(crate::R<STATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<STATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<STATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<STATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STATUS` reader - The IRK that was used last time an address was resolved"]
|
||||
pub struct STATUS_R(crate::FieldReader<u8, u8>);
|
||||
impl STATUS_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STATUS_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - The IRK that was used last time an address was resolved"]
|
||||
#[inline(always)]
|
||||
pub fn status(&self) -> STATUS_R {
|
||||
STATUS_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
#[doc = "Resolution status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
|
||||
pub struct STATUS_SPEC;
|
||||
impl crate::RegisterSpec for STATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [status::R](R) reader structure"]
|
||||
impl crate::Readable for STATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets STATUS to value 0"]
|
||||
impl crate::Resettable for STATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
45
src/aar/tasks_start.rs
Normal file
45
src/aar/tasks_start.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TASKS_START` writer"]
|
||||
pub struct W(crate::W<TASKS_START_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_START_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_START_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_START_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_start](index.html) module"]
|
||||
pub struct TASKS_START_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_START_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_START_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_START to value 0"]
|
||||
impl crate::Resettable for TASKS_START_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
45
src/aar/tasks_stop.rs
Normal file
45
src/aar/tasks_stop.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TASKS_STOP` writer"]
|
||||
pub struct W(crate::W<TASKS_STOP_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_STOP_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_STOP_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_STOP_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Stop resolving addresses\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_stop](index.html) module"]
|
||||
pub struct TASKS_STOP_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_STOP_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_STOP_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_STOP to value 0"]
|
||||
impl crate::Resettable for TASKS_STOP_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
18
src/approtect.rs
Normal file
18
src/approtect.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
_reserved0: [u8; 0x0550],
|
||||
#[doc = "0x550 - Software force enable APPROTECT mechanism until next reset. This register can only be written once."]
|
||||
pub forceprotect: crate::Reg<forceprotect::FORCEPROTECT_SPEC>,
|
||||
_reserved1: [u8; 0x04],
|
||||
#[doc = "0x558 - Software disable APPROTECT mechanism"]
|
||||
pub disable: crate::Reg<disable::DISABLE_SPEC>,
|
||||
}
|
||||
#[doc = "FORCEPROTECT register accessor: an alias for `Reg<FORCEPROTECT_SPEC>`"]
|
||||
pub type FORCEPROTECT = crate::Reg<forceprotect::FORCEPROTECT_SPEC>;
|
||||
#[doc = "Software force enable APPROTECT mechanism until next reset. This register can only be written once."]
|
||||
pub mod forceprotect;
|
||||
#[doc = "DISABLE register accessor: an alias for `Reg<DISABLE_SPEC>`"]
|
||||
pub type DISABLE = crate::Reg<disable::DISABLE_SPEC>;
|
||||
#[doc = "Software disable APPROTECT mechanism"]
|
||||
pub mod disable;
|
||||
138
src/approtect/disable.rs
Normal file
138
src/approtect/disable.rs
Normal file
@@ -0,0 +1,138 @@
|
||||
#[doc = "Register `DISABLE` reader"]
|
||||
pub struct R(crate::R<DISABLE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DISABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DISABLE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DISABLE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DISABLE` writer"]
|
||||
pub struct W(crate::W<DISABLE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DISABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<DISABLE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DISABLE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Software disable APPROTECT mechanism\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum DISABLE_A {
|
||||
#[doc = "90: Software disable APPROTECT mechanism"]
|
||||
SWDISABLE = 90,
|
||||
}
|
||||
impl From<DISABLE_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: DISABLE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DISABLE` reader - Software disable APPROTECT mechanism"]
|
||||
pub struct DISABLE_R(crate::FieldReader<u8, DISABLE_A>);
|
||||
impl DISABLE_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
DISABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<DISABLE_A> {
|
||||
match self.bits {
|
||||
90 => Some(DISABLE_A::SWDISABLE),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `SWDISABLE`"]
|
||||
#[inline(always)]
|
||||
pub fn is_sw_disable(&self) -> bool {
|
||||
**self == DISABLE_A::SWDISABLE
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DISABLE_R {
|
||||
type Target = crate::FieldReader<u8, DISABLE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DISABLE` writer - Software disable APPROTECT mechanism"]
|
||||
pub struct DISABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DISABLE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: DISABLE_A) -> &'a mut W {
|
||||
unsafe { self.bits(variant.into()) }
|
||||
}
|
||||
#[doc = "Software disable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn sw_disable(self) -> &'a mut W {
|
||||
self.variant(DISABLE_A::SWDISABLE)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Software disable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn disable(&self) -> DISABLE_R {
|
||||
DISABLE_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Software disable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn disable(&mut self) -> DISABLE_W {
|
||||
DISABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Software disable APPROTECT mechanism\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [disable](index.html) module"]
|
||||
pub struct DISABLE_SPEC;
|
||||
impl crate::RegisterSpec for DISABLE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [disable::R](R) reader structure"]
|
||||
impl crate::Readable for DISABLE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [disable::W](W) writer structure"]
|
||||
impl crate::Writable for DISABLE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DISABLE to value 0"]
|
||||
impl crate::Resettable for DISABLE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
138
src/approtect/forceprotect.rs
Normal file
138
src/approtect/forceprotect.rs
Normal file
@@ -0,0 +1,138 @@
|
||||
#[doc = "Register `FORCEPROTECT` reader"]
|
||||
pub struct R(crate::R<FORCEPROTECT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<FORCEPROTECT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<FORCEPROTECT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<FORCEPROTECT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `FORCEPROTECT` writer"]
|
||||
pub struct W(crate::W<FORCEPROTECT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<FORCEPROTECT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<FORCEPROTECT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<FORCEPROTECT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write 0x0 to force enable APPROTECT mechanism\n\nValue on reset: 255"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum FORCEPROTECT_A {
|
||||
#[doc = "0: Software force enable APPROTECT mechanism"]
|
||||
FORCE = 0,
|
||||
}
|
||||
impl From<FORCEPROTECT_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: FORCEPROTECT_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FORCEPROTECT` reader - Write 0x0 to force enable APPROTECT mechanism"]
|
||||
pub struct FORCEPROTECT_R(crate::FieldReader<u8, FORCEPROTECT_A>);
|
||||
impl FORCEPROTECT_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
FORCEPROTECT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<FORCEPROTECT_A> {
|
||||
match self.bits {
|
||||
0 => Some(FORCEPROTECT_A::FORCE),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FORCE`"]
|
||||
#[inline(always)]
|
||||
pub fn is_force(&self) -> bool {
|
||||
**self == FORCEPROTECT_A::FORCE
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for FORCEPROTECT_R {
|
||||
type Target = crate::FieldReader<u8, FORCEPROTECT_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FORCEPROTECT` writer - Write 0x0 to force enable APPROTECT mechanism"]
|
||||
pub struct FORCEPROTECT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> FORCEPROTECT_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: FORCEPROTECT_A) -> &'a mut W {
|
||||
unsafe { self.bits(variant.into()) }
|
||||
}
|
||||
#[doc = "Software force enable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn force(self) -> &'a mut W {
|
||||
self.variant(FORCEPROTECT_A::FORCE)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn forceprotect(&self) -> FORCEPROTECT_R {
|
||||
FORCEPROTECT_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"]
|
||||
#[inline(always)]
|
||||
pub fn forceprotect(&mut self) -> FORCEPROTECT_W {
|
||||
FORCEPROTECT_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Software force enable APPROTECT mechanism until next reset. This register can only be written once.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [forceprotect](index.html) module"]
|
||||
pub struct FORCEPROTECT_SPEC;
|
||||
impl crate::RegisterSpec for FORCEPROTECT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [forceprotect::R](R) reader structure"]
|
||||
impl crate::Readable for FORCEPROTECT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [forceprotect::W](W) writer structure"]
|
||||
impl crate::Writable for FORCEPROTECT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets FORCEPROTECT to value 0xffff_ffff"]
|
||||
impl crate::Resettable for FORCEPROTECT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
41
src/bprot.rs
Normal file
41
src/bprot.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
_reserved0: [u8; 0x0600],
|
||||
#[doc = "0x600 - Block protect configuration register 0"]
|
||||
pub config0: crate::Reg<config0::CONFIG0_SPEC>,
|
||||
#[doc = "0x604 - Block protect configuration register 1"]
|
||||
pub config1: crate::Reg<config1::CONFIG1_SPEC>,
|
||||
#[doc = "0x608 - Disable protection mechanism in debug interface mode"]
|
||||
pub disableindebug: crate::Reg<disableindebug::DISABLEINDEBUG_SPEC>,
|
||||
#[doc = "0x60c - Unspecified"]
|
||||
pub unused0: crate::Reg<unused0::UNUSED0_SPEC>,
|
||||
#[doc = "0x610 - Block protect configuration register 2"]
|
||||
pub config2: crate::Reg<config2::CONFIG2_SPEC>,
|
||||
#[doc = "0x614 - Block protect configuration register 3"]
|
||||
pub config3: crate::Reg<config3::CONFIG3_SPEC>,
|
||||
}
|
||||
#[doc = "CONFIG0 register accessor: an alias for `Reg<CONFIG0_SPEC>`"]
|
||||
pub type CONFIG0 = crate::Reg<config0::CONFIG0_SPEC>;
|
||||
#[doc = "Block protect configuration register 0"]
|
||||
pub mod config0;
|
||||
#[doc = "CONFIG1 register accessor: an alias for `Reg<CONFIG1_SPEC>`"]
|
||||
pub type CONFIG1 = crate::Reg<config1::CONFIG1_SPEC>;
|
||||
#[doc = "Block protect configuration register 1"]
|
||||
pub mod config1;
|
||||
#[doc = "DISABLEINDEBUG register accessor: an alias for `Reg<DISABLEINDEBUG_SPEC>`"]
|
||||
pub type DISABLEINDEBUG = crate::Reg<disableindebug::DISABLEINDEBUG_SPEC>;
|
||||
#[doc = "Disable protection mechanism in debug interface mode"]
|
||||
pub mod disableindebug;
|
||||
#[doc = "UNUSED0 register accessor: an alias for `Reg<UNUSED0_SPEC>`"]
|
||||
pub type UNUSED0 = crate::Reg<unused0::UNUSED0_SPEC>;
|
||||
#[doc = "Unspecified"]
|
||||
pub mod unused0;
|
||||
#[doc = "CONFIG2 register accessor: an alias for `Reg<CONFIG2_SPEC>`"]
|
||||
pub type CONFIG2 = crate::Reg<config2::CONFIG2_SPEC>;
|
||||
#[doc = "Block protect configuration register 2"]
|
||||
pub mod config2;
|
||||
#[doc = "CONFIG3 register accessor: an alias for `Reg<CONFIG3_SPEC>`"]
|
||||
pub type CONFIG3 = crate::Reg<config3::CONFIG3_SPEC>;
|
||||
#[doc = "Block protect configuration register 3"]
|
||||
pub mod config3;
|
||||
3042
src/bprot/config0.rs
Normal file
3042
src/bprot/config0.rs
Normal file
File diff suppressed because it is too large
Load Diff
3042
src/bprot/config1.rs
Normal file
3042
src/bprot/config1.rs
Normal file
File diff suppressed because it is too large
Load Diff
3042
src/bprot/config2.rs
Normal file
3042
src/bprot/config2.rs
Normal file
File diff suppressed because it is too large
Load Diff
3042
src/bprot/config3.rs
Normal file
3042
src/bprot/config3.rs
Normal file
File diff suppressed because it is too large
Load Diff
159
src/bprot/disableindebug.rs
Normal file
159
src/bprot/disableindebug.rs
Normal file
@@ -0,0 +1,159 @@
|
||||
#[doc = "Register `DISABLEINDEBUG` reader"]
|
||||
pub struct R(crate::R<DISABLEINDEBUG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DISABLEINDEBUG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DISABLEINDEBUG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DISABLEINDEBUG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DISABLEINDEBUG` writer"]
|
||||
pub struct W(crate::W<DISABLEINDEBUG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DISABLEINDEBUG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<DISABLEINDEBUG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DISABLEINDEBUG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode.\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DISABLEINDEBUG_A {
|
||||
#[doc = "1: Disable in debug"]
|
||||
DISABLED = 1,
|
||||
#[doc = "0: Enable in debug"]
|
||||
ENABLED = 0,
|
||||
}
|
||||
impl From<DISABLEINDEBUG_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DISABLEINDEBUG_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DISABLEINDEBUG` reader - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."]
|
||||
pub struct DISABLEINDEBUG_R(crate::FieldReader<bool, DISABLEINDEBUG_A>);
|
||||
impl DISABLEINDEBUG_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DISABLEINDEBUG_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DISABLEINDEBUG_A {
|
||||
match self.bits {
|
||||
true => DISABLEINDEBUG_A::DISABLED,
|
||||
false => DISABLEINDEBUG_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == DISABLEINDEBUG_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == DISABLEINDEBUG_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DISABLEINDEBUG_R {
|
||||
type Target = crate::FieldReader<bool, DISABLEINDEBUG_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DISABLEINDEBUG` writer - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."]
|
||||
pub struct DISABLEINDEBUG_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DISABLEINDEBUG_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: DISABLEINDEBUG_A) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable in debug"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(DISABLEINDEBUG_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable in debug"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(DISABLEINDEBUG_A::ENABLED)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."]
|
||||
#[inline(always)]
|
||||
pub fn disableindebug(&self) -> DISABLEINDEBUG_R {
|
||||
DISABLEINDEBUG_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."]
|
||||
#[inline(always)]
|
||||
pub fn disableindebug(&mut self) -> DISABLEINDEBUG_W {
|
||||
DISABLEINDEBUG_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Disable protection mechanism in debug interface mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [disableindebug](index.html) module"]
|
||||
pub struct DISABLEINDEBUG_SPEC;
|
||||
impl crate::RegisterSpec for DISABLEINDEBUG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [disableindebug::R](R) reader structure"]
|
||||
impl crate::Readable for DISABLEINDEBUG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [disableindebug::W](W) writer structure"]
|
||||
impl crate::Writable for DISABLEINDEBUG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DISABLEINDEBUG to value 0x01"]
|
||||
impl crate::Resettable for DISABLEINDEBUG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
64
src/bprot/unused0.rs
Normal file
64
src/bprot/unused0.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `UNUSED0` reader"]
|
||||
pub struct R(crate::R<UNUSED0_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<UNUSED0_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<UNUSED0_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<UNUSED0_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `UNUSED0` writer"]
|
||||
pub struct W(crate::W<UNUSED0_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<UNUSED0_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<UNUSED0_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<UNUSED0_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Unspecified\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [unused0](index.html) module"]
|
||||
pub struct UNUSED0_SPEC;
|
||||
impl crate::RegisterSpec for UNUSED0_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [unused0::R](R) reader structure"]
|
||||
impl crate::Readable for UNUSED0_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [unused0::W](W) writer structure"]
|
||||
impl crate::Writable for UNUSED0_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets UNUSED0 to value 0"]
|
||||
impl crate::Resettable for UNUSED0_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
105
src/ccm.rs
Normal file
105
src/ccm.rs
Normal file
@@ -0,0 +1,105 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Start generation of key-stream. This operation will stop by itself when completed."]
|
||||
pub tasks_ksgen: crate::Reg<tasks_ksgen::TASKS_KSGEN_SPEC>,
|
||||
#[doc = "0x04 - Start encryption/decryption. This operation will stop by itself when completed."]
|
||||
pub tasks_crypt: crate::Reg<tasks_crypt::TASKS_CRYPT_SPEC>,
|
||||
#[doc = "0x08 - Stop encryption/decryption"]
|
||||
pub tasks_stop: crate::Reg<tasks_stop::TASKS_STOP_SPEC>,
|
||||
_reserved3: [u8; 0xf4],
|
||||
#[doc = "0x100 - Key-stream generation complete"]
|
||||
pub events_endksgen: crate::Reg<events_endksgen::EVENTS_ENDKSGEN_SPEC>,
|
||||
#[doc = "0x104 - Encrypt/decrypt complete"]
|
||||
pub events_endcrypt: crate::Reg<events_endcrypt::EVENTS_ENDCRYPT_SPEC>,
|
||||
#[doc = "0x108 - CCM error event"]
|
||||
pub events_error: crate::Reg<events_error::EVENTS_ERROR_SPEC>,
|
||||
_reserved6: [u8; 0xf4],
|
||||
#[doc = "0x200 - Shortcut register"]
|
||||
pub shorts: crate::Reg<shorts::SHORTS_SPEC>,
|
||||
_reserved7: [u8; 0x0100],
|
||||
#[doc = "0x304 - Enable interrupt"]
|
||||
pub intenset: crate::Reg<intenset::INTENSET_SPEC>,
|
||||
#[doc = "0x308 - Disable interrupt"]
|
||||
pub intenclr: crate::Reg<intenclr::INTENCLR_SPEC>,
|
||||
_reserved9: [u8; 0xf4],
|
||||
#[doc = "0x400 - MIC check result"]
|
||||
pub micstatus: crate::Reg<micstatus::MICSTATUS_SPEC>,
|
||||
_reserved10: [u8; 0xfc],
|
||||
#[doc = "0x500 - Enable"]
|
||||
pub enable: crate::Reg<enable::ENABLE_SPEC>,
|
||||
#[doc = "0x504 - Operation mode"]
|
||||
pub mode: crate::Reg<mode::MODE_SPEC>,
|
||||
#[doc = "0x508 - Pointer to data structure holding AES key and NONCE vector"]
|
||||
pub cnfptr: crate::Reg<cnfptr::CNFPTR_SPEC>,
|
||||
#[doc = "0x50c - Input pointer"]
|
||||
pub inptr: crate::Reg<inptr::INPTR_SPEC>,
|
||||
#[doc = "0x510 - Output pointer"]
|
||||
pub outptr: crate::Reg<outptr::OUTPTR_SPEC>,
|
||||
#[doc = "0x514 - Pointer to data area used for temporary storage"]
|
||||
pub scratchptr: crate::Reg<scratchptr::SCRATCHPTR_SPEC>,
|
||||
}
|
||||
#[doc = "TASKS_KSGEN register accessor: an alias for `Reg<TASKS_KSGEN_SPEC>`"]
|
||||
pub type TASKS_KSGEN = crate::Reg<tasks_ksgen::TASKS_KSGEN_SPEC>;
|
||||
#[doc = "Start generation of key-stream. This operation will stop by itself when completed."]
|
||||
pub mod tasks_ksgen;
|
||||
#[doc = "TASKS_CRYPT register accessor: an alias for `Reg<TASKS_CRYPT_SPEC>`"]
|
||||
pub type TASKS_CRYPT = crate::Reg<tasks_crypt::TASKS_CRYPT_SPEC>;
|
||||
#[doc = "Start encryption/decryption. This operation will stop by itself when completed."]
|
||||
pub mod tasks_crypt;
|
||||
#[doc = "TASKS_STOP register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
|
||||
pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
|
||||
#[doc = "Stop encryption/decryption"]
|
||||
pub mod tasks_stop;
|
||||
#[doc = "EVENTS_ENDKSGEN register accessor: an alias for `Reg<EVENTS_ENDKSGEN_SPEC>`"]
|
||||
pub type EVENTS_ENDKSGEN = crate::Reg<events_endksgen::EVENTS_ENDKSGEN_SPEC>;
|
||||
#[doc = "Key-stream generation complete"]
|
||||
pub mod events_endksgen;
|
||||
#[doc = "EVENTS_ENDCRYPT register accessor: an alias for `Reg<EVENTS_ENDCRYPT_SPEC>`"]
|
||||
pub type EVENTS_ENDCRYPT = crate::Reg<events_endcrypt::EVENTS_ENDCRYPT_SPEC>;
|
||||
#[doc = "Encrypt/decrypt complete"]
|
||||
pub mod events_endcrypt;
|
||||
#[doc = "EVENTS_ERROR register accessor: an alias for `Reg<EVENTS_ERROR_SPEC>`"]
|
||||
pub type EVENTS_ERROR = crate::Reg<events_error::EVENTS_ERROR_SPEC>;
|
||||
#[doc = "CCM error event"]
|
||||
pub mod events_error;
|
||||
#[doc = "SHORTS register accessor: an alias for `Reg<SHORTS_SPEC>`"]
|
||||
pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
|
||||
#[doc = "Shortcut register"]
|
||||
pub mod shorts;
|
||||
#[doc = "INTENSET register accessor: an alias for `Reg<INTENSET_SPEC>`"]
|
||||
pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
|
||||
#[doc = "Enable interrupt"]
|
||||
pub mod intenset;
|
||||
#[doc = "INTENCLR register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
|
||||
pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
|
||||
#[doc = "Disable interrupt"]
|
||||
pub mod intenclr;
|
||||
#[doc = "MICSTATUS register accessor: an alias for `Reg<MICSTATUS_SPEC>`"]
|
||||
pub type MICSTATUS = crate::Reg<micstatus::MICSTATUS_SPEC>;
|
||||
#[doc = "MIC check result"]
|
||||
pub mod micstatus;
|
||||
#[doc = "ENABLE register accessor: an alias for `Reg<ENABLE_SPEC>`"]
|
||||
pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
|
||||
#[doc = "Enable"]
|
||||
pub mod enable;
|
||||
#[doc = "MODE register accessor: an alias for `Reg<MODE_SPEC>`"]
|
||||
pub type MODE = crate::Reg<mode::MODE_SPEC>;
|
||||
#[doc = "Operation mode"]
|
||||
pub mod mode;
|
||||
#[doc = "CNFPTR register accessor: an alias for `Reg<CNFPTR_SPEC>`"]
|
||||
pub type CNFPTR = crate::Reg<cnfptr::CNFPTR_SPEC>;
|
||||
#[doc = "Pointer to data structure holding AES key and NONCE vector"]
|
||||
pub mod cnfptr;
|
||||
#[doc = "INPTR register accessor: an alias for `Reg<INPTR_SPEC>`"]
|
||||
pub type INPTR = crate::Reg<inptr::INPTR_SPEC>;
|
||||
#[doc = "Input pointer"]
|
||||
pub mod inptr;
|
||||
#[doc = "OUTPTR register accessor: an alias for `Reg<OUTPTR_SPEC>`"]
|
||||
pub type OUTPTR = crate::Reg<outptr::OUTPTR_SPEC>;
|
||||
#[doc = "Output pointer"]
|
||||
pub mod outptr;
|
||||
#[doc = "SCRATCHPTR register accessor: an alias for `Reg<SCRATCHPTR_SPEC>`"]
|
||||
pub type SCRATCHPTR = crate::Reg<scratchptr::SCRATCHPTR_SPEC>;
|
||||
#[doc = "Pointer to data area used for temporary storage"]
|
||||
pub mod scratchptr;
|
||||
102
src/ccm/cnfptr.rs
Normal file
102
src/ccm/cnfptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `CNFPTR` reader"]
|
||||
pub struct R(crate::R<CNFPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CNFPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CNFPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CNFPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CNFPTR` writer"]
|
||||
pub struct W(crate::W<CNFPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CNFPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CNFPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CNFPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CNFPTR` reader - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"]
|
||||
pub struct CNFPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl CNFPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
CNFPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CNFPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CNFPTR` writer - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"]
|
||||
pub struct CNFPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CNFPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"]
|
||||
#[inline(always)]
|
||||
pub fn cnfptr(&self) -> CNFPTR_R {
|
||||
CNFPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"]
|
||||
#[inline(always)]
|
||||
pub fn cnfptr(&mut self) -> CNFPTR_W {
|
||||
CNFPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Pointer to data structure holding AES key and NONCE vector\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cnfptr](index.html) module"]
|
||||
pub struct CNFPTR_SPEC;
|
||||
impl crate::RegisterSpec for CNFPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [cnfptr::R](R) reader structure"]
|
||||
impl crate::Readable for CNFPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [cnfptr::W](W) writer structure"]
|
||||
impl crate::Writable for CNFPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CNFPTR to value 0"]
|
||||
impl crate::Resettable for CNFPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
151
src/ccm/enable.rs
Normal file
151
src/ccm/enable.rs
Normal file
@@ -0,0 +1,151 @@
|
||||
#[doc = "Register `ENABLE` reader"]
|
||||
pub struct R(crate::R<ENABLE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ENABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ENABLE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ENABLE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ENABLE` writer"]
|
||||
pub struct W(crate::W<ENABLE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ENABLE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<ENABLE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ENABLE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Enable or disable CCM\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum ENABLE_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "2: Enable"]
|
||||
ENABLED = 2,
|
||||
}
|
||||
impl From<ENABLE_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENABLE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` reader - Enable or disable CCM"]
|
||||
pub struct ENABLE_R(crate::FieldReader<u8, ENABLE_A>);
|
||||
impl ENABLE_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
ENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<ENABLE_A> {
|
||||
match self.bits {
|
||||
0 => Some(ENABLE_A::DISABLED),
|
||||
2 => Some(ENABLE_A::ENABLED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENABLE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENABLE_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENABLE_R {
|
||||
type Target = crate::FieldReader<u8, ENABLE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENABLE` writer - Enable or disable CCM"]
|
||||
pub struct ENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENABLE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENABLE_A) -> &'a mut W {
|
||||
unsafe { self.bits(variant.into()) }
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::ENABLED)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:1 - Enable or disable CCM"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) -> ENABLE_R {
|
||||
ENABLE_R::new((self.bits & 0x03) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:1 - Enable or disable CCM"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&mut self) -> ENABLE_W {
|
||||
ENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Enable\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [enable](index.html) module"]
|
||||
pub struct ENABLE_SPEC;
|
||||
impl crate::RegisterSpec for ENABLE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [enable::R](R) reader structure"]
|
||||
impl crate::Readable for ENABLE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"]
|
||||
impl crate::Writable for ENABLE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ENABLE to value 0"]
|
||||
impl crate::Resettable for ENABLE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/ccm/events_endcrypt.rs
Normal file
64
src/ccm/events_endcrypt.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_ENDCRYPT` reader"]
|
||||
pub struct R(crate::R<EVENTS_ENDCRYPT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_ENDCRYPT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_ENDCRYPT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_ENDCRYPT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_ENDCRYPT` writer"]
|
||||
pub struct W(crate::W<EVENTS_ENDCRYPT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_ENDCRYPT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_ENDCRYPT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_ENDCRYPT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Encrypt/decrypt complete\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_endcrypt](index.html) module"]
|
||||
pub struct EVENTS_ENDCRYPT_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_ENDCRYPT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_endcrypt::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_ENDCRYPT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_endcrypt::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_ENDCRYPT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_ENDCRYPT to value 0"]
|
||||
impl crate::Resettable for EVENTS_ENDCRYPT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/ccm/events_endksgen.rs
Normal file
64
src/ccm/events_endksgen.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_ENDKSGEN` reader"]
|
||||
pub struct R(crate::R<EVENTS_ENDKSGEN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_ENDKSGEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_ENDKSGEN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_ENDKSGEN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_ENDKSGEN` writer"]
|
||||
pub struct W(crate::W<EVENTS_ENDKSGEN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_ENDKSGEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_ENDKSGEN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_ENDKSGEN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Key-stream generation complete\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_endksgen](index.html) module"]
|
||||
pub struct EVENTS_ENDKSGEN_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_ENDKSGEN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_endksgen::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_ENDKSGEN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_endksgen::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_ENDKSGEN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_ENDKSGEN to value 0"]
|
||||
impl crate::Resettable for EVENTS_ENDKSGEN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/ccm/events_error.rs
Normal file
64
src/ccm/events_error.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_ERROR` reader"]
|
||||
pub struct R(crate::R<EVENTS_ERROR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_ERROR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_ERROR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_ERROR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_ERROR` writer"]
|
||||
pub struct W(crate::W<EVENTS_ERROR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_ERROR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_ERROR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_ERROR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "CCM error event\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_error](index.html) module"]
|
||||
pub struct EVENTS_ERROR_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_ERROR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_error::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_ERROR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_ERROR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_ERROR to value 0"]
|
||||
impl crate::Resettable for EVENTS_ERROR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
102
src/ccm/inptr.rs
Normal file
102
src/ccm/inptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `INPTR` reader"]
|
||||
pub struct R(crate::R<INPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INPTR` writer"]
|
||||
pub struct W(crate::W<INPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INPTR` reader - Input pointer"]
|
||||
pub struct INPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl INPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
INPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for INPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INPTR` writer - Input pointer"]
|
||||
pub struct INPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> INPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Input pointer"]
|
||||
#[inline(always)]
|
||||
pub fn inptr(&self) -> INPTR_R {
|
||||
INPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Input pointer"]
|
||||
#[inline(always)]
|
||||
pub fn inptr(&mut self) -> INPTR_W {
|
||||
INPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Input pointer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [inptr](index.html) module"]
|
||||
pub struct INPTR_SPEC;
|
||||
impl crate::RegisterSpec for INPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [inptr::R](R) reader structure"]
|
||||
impl crate::Readable for INPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [inptr::W](W) writer structure"]
|
||||
impl crate::Writable for INPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INPTR to value 0"]
|
||||
impl crate::Resettable for INPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
366
src/ccm/intenclr.rs
Normal file
366
src/ccm/intenclr.rs
Normal file
@@ -0,0 +1,366 @@
|
||||
#[doc = "Register `INTENCLR` reader"]
|
||||
pub struct R(crate::R<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENCLR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENCLR` writer"]
|
||||
pub struct W(crate::W<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENCLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ENDKSGEN event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDKSGEN_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ENDKSGEN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDKSGEN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN` reader - Write '1' to Disable interrupt for ENDKSGEN event"]
|
||||
pub struct ENDKSGEN_R(crate::FieldReader<bool, ENDKSGEN_A>);
|
||||
impl ENDKSGEN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENDKSGEN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ENDKSGEN_A {
|
||||
match self.bits {
|
||||
false => ENDKSGEN_A::DISABLED,
|
||||
true => ENDKSGEN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENDKSGEN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENDKSGEN_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENDKSGEN_R {
|
||||
type Target = crate::FieldReader<bool, ENDKSGEN_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ENDKSGEN event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDKSGEN_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<ENDKSGEN_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDKSGEN_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN` writer - Write '1' to Disable interrupt for ENDKSGEN event"]
|
||||
pub struct ENDKSGEN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENDKSGEN_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENDKSGEN_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(ENDKSGEN_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ENDCRYPT event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDCRYPT_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ENDCRYPT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDCRYPT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDCRYPT` reader - Write '1' to Disable interrupt for ENDCRYPT event"]
|
||||
pub struct ENDCRYPT_R(crate::FieldReader<bool, ENDCRYPT_A>);
|
||||
impl ENDCRYPT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENDCRYPT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ENDCRYPT_A {
|
||||
match self.bits {
|
||||
false => ENDCRYPT_A::DISABLED,
|
||||
true => ENDCRYPT_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENDCRYPT_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENDCRYPT_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENDCRYPT_R {
|
||||
type Target = crate::FieldReader<bool, ENDCRYPT_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ENDCRYPT event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDCRYPT_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<ENDCRYPT_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDCRYPT_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDCRYPT` writer - Write '1' to Disable interrupt for ENDCRYPT event"]
|
||||
pub struct ENDCRYPT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENDCRYPT_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENDCRYPT_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(ENDCRYPT_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ERROR event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERROR_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ERROR_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERROR_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` reader - Write '1' to Disable interrupt for ERROR event"]
|
||||
pub struct ERROR_R(crate::FieldReader<bool, ERROR_A>);
|
||||
impl ERROR_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ERROR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ERROR_A {
|
||||
match self.bits {
|
||||
false => ERROR_A::DISABLED,
|
||||
true => ERROR_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ERROR_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ERROR_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ERROR_R {
|
||||
type Target = crate::FieldReader<bool, ERROR_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for ERROR event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERROR_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<ERROR_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERROR_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` writer - Write '1' to Disable interrupt for ERROR event"]
|
||||
pub struct ERROR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ERROR_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ERROR_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(ERROR_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for ENDKSGEN event"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen(&self) -> ENDKSGEN_R {
|
||||
ENDKSGEN_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for ENDCRYPT event"]
|
||||
#[inline(always)]
|
||||
pub fn endcrypt(&self) -> ENDCRYPT_R {
|
||||
ENDCRYPT_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Disable interrupt for ERROR event"]
|
||||
#[inline(always)]
|
||||
pub fn error(&self) -> ERROR_R {
|
||||
ERROR_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for ENDKSGEN event"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen(&mut self) -> ENDKSGEN_W {
|
||||
ENDKSGEN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for ENDCRYPT event"]
|
||||
#[inline(always)]
|
||||
pub fn endcrypt(&mut self) -> ENDCRYPT_W {
|
||||
ENDCRYPT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Disable interrupt for ERROR event"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W {
|
||||
ERROR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
|
||||
pub struct INTENCLR_SPEC;
|
||||
impl crate::RegisterSpec for INTENCLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
|
||||
impl crate::Readable for INTENCLR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
|
||||
impl crate::Writable for INTENCLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTENCLR to value 0"]
|
||||
impl crate::Resettable for INTENCLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
366
src/ccm/intenset.rs
Normal file
366
src/ccm/intenset.rs
Normal file
@@ -0,0 +1,366 @@
|
||||
#[doc = "Register `INTENSET` reader"]
|
||||
pub struct R(crate::R<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENSET_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENSET` writer"]
|
||||
pub struct W(crate::W<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENSET_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ENDKSGEN event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDKSGEN_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ENDKSGEN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDKSGEN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN` reader - Write '1' to Enable interrupt for ENDKSGEN event"]
|
||||
pub struct ENDKSGEN_R(crate::FieldReader<bool, ENDKSGEN_A>);
|
||||
impl ENDKSGEN_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENDKSGEN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ENDKSGEN_A {
|
||||
match self.bits {
|
||||
false => ENDKSGEN_A::DISABLED,
|
||||
true => ENDKSGEN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENDKSGEN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENDKSGEN_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENDKSGEN_R {
|
||||
type Target = crate::FieldReader<bool, ENDKSGEN_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ENDKSGEN event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDKSGEN_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<ENDKSGEN_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDKSGEN_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN` writer - Write '1' to Enable interrupt for ENDKSGEN event"]
|
||||
pub struct ENDKSGEN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENDKSGEN_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENDKSGEN_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(ENDKSGEN_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ENDCRYPT event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDCRYPT_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ENDCRYPT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDCRYPT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDCRYPT` reader - Write '1' to Enable interrupt for ENDCRYPT event"]
|
||||
pub struct ENDCRYPT_R(crate::FieldReader<bool, ENDCRYPT_A>);
|
||||
impl ENDCRYPT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENDCRYPT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ENDCRYPT_A {
|
||||
match self.bits {
|
||||
false => ENDCRYPT_A::DISABLED,
|
||||
true => ENDCRYPT_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENDCRYPT_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENDCRYPT_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENDCRYPT_R {
|
||||
type Target = crate::FieldReader<bool, ENDCRYPT_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ENDCRYPT event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDCRYPT_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<ENDCRYPT_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDCRYPT_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDCRYPT` writer - Write '1' to Enable interrupt for ENDCRYPT event"]
|
||||
pub struct ENDCRYPT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENDCRYPT_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENDCRYPT_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(ENDCRYPT_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ERROR event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERROR_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ERROR_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERROR_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` reader - Write '1' to Enable interrupt for ERROR event"]
|
||||
pub struct ERROR_R(crate::FieldReader<bool, ERROR_A>);
|
||||
impl ERROR_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ERROR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ERROR_A {
|
||||
match self.bits {
|
||||
false => ERROR_A::DISABLED,
|
||||
true => ERROR_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ERROR_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ERROR_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ERROR_R {
|
||||
type Target = crate::FieldReader<bool, ERROR_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for ERROR event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERROR_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<ERROR_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERROR_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` writer - Write '1' to Enable interrupt for ERROR event"]
|
||||
pub struct ERROR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ERROR_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ERROR_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(ERROR_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to Enable interrupt for ENDKSGEN event"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen(&self) -> ENDKSGEN_R {
|
||||
ENDKSGEN_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Enable interrupt for ENDCRYPT event"]
|
||||
#[inline(always)]
|
||||
pub fn endcrypt(&self) -> ENDCRYPT_R {
|
||||
ENDCRYPT_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Enable interrupt for ERROR event"]
|
||||
#[inline(always)]
|
||||
pub fn error(&self) -> ERROR_R {
|
||||
ERROR_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to Enable interrupt for ENDKSGEN event"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen(&mut self) -> ENDKSGEN_W {
|
||||
ENDKSGEN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Enable interrupt for ENDCRYPT event"]
|
||||
#[inline(always)]
|
||||
pub fn endcrypt(&mut self) -> ENDCRYPT_W {
|
||||
ENDCRYPT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to Enable interrupt for ERROR event"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W {
|
||||
ERROR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Enable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](index.html) module"]
|
||||
pub struct INTENSET_SPEC;
|
||||
impl crate::RegisterSpec for INTENSET_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
|
||||
impl crate::Readable for INTENSET_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
|
||||
impl crate::Writable for INTENSET_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTENSET to value 0"]
|
||||
impl crate::Resettable for INTENSET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
84
src/ccm/micstatus.rs
Normal file
84
src/ccm/micstatus.rs
Normal file
@@ -0,0 +1,84 @@
|
||||
#[doc = "Register `MICSTATUS` reader"]
|
||||
pub struct R(crate::R<MICSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MICSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MICSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MICSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "The result of the MIC check performed during the previous decryption operation\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MICSTATUS_A {
|
||||
#[doc = "0: MIC check failed"]
|
||||
CHECKFAILED = 0,
|
||||
#[doc = "1: MIC check passed"]
|
||||
CHECKPASSED = 1,
|
||||
}
|
||||
impl From<MICSTATUS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: MICSTATUS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MICSTATUS` reader - The result of the MIC check performed during the previous decryption operation"]
|
||||
pub struct MICSTATUS_R(crate::FieldReader<bool, MICSTATUS_A>);
|
||||
impl MICSTATUS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
MICSTATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> MICSTATUS_A {
|
||||
match self.bits {
|
||||
false => MICSTATUS_A::CHECKFAILED,
|
||||
true => MICSTATUS_A::CHECKPASSED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CHECKFAILED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_check_failed(&self) -> bool {
|
||||
**self == MICSTATUS_A::CHECKFAILED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CHECKPASSED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_check_passed(&self) -> bool {
|
||||
**self == MICSTATUS_A::CHECKPASSED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for MICSTATUS_R {
|
||||
type Target = crate::FieldReader<bool, MICSTATUS_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - The result of the MIC check performed during the previous decryption operation"]
|
||||
#[inline(always)]
|
||||
pub fn micstatus(&self) -> MICSTATUS_R {
|
||||
MICSTATUS_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "MIC check result\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [micstatus](index.html) module"]
|
||||
pub struct MICSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for MICSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [micstatus::R](R) reader structure"]
|
||||
impl crate::Readable for MICSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets MICSTATUS to value 0"]
|
||||
impl crate::Resettable for MICSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
345
src/ccm/mode.rs
Normal file
345
src/ccm/mode.rs
Normal file
@@ -0,0 +1,345 @@
|
||||
#[doc = "Register `MODE` reader"]
|
||||
pub struct R(crate::R<MODE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MODE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MODE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MODE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `MODE` writer"]
|
||||
pub struct W(crate::W<MODE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<MODE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<MODE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<MODE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "The mode of operation to be used\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MODE_A {
|
||||
#[doc = "0: AES CCM packet encryption mode"]
|
||||
ENCRYPTION = 0,
|
||||
#[doc = "1: AES CCM packet decryption mode"]
|
||||
DECRYPTION = 1,
|
||||
}
|
||||
impl From<MODE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: MODE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MODE` reader - The mode of operation to be used"]
|
||||
pub struct MODE_R(crate::FieldReader<bool, MODE_A>);
|
||||
impl MODE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
MODE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> MODE_A {
|
||||
match self.bits {
|
||||
false => MODE_A::ENCRYPTION,
|
||||
true => MODE_A::DECRYPTION,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENCRYPTION`"]
|
||||
#[inline(always)]
|
||||
pub fn is_encryption(&self) -> bool {
|
||||
**self == MODE_A::ENCRYPTION
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DECRYPTION`"]
|
||||
#[inline(always)]
|
||||
pub fn is_decryption(&self) -> bool {
|
||||
**self == MODE_A::DECRYPTION
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for MODE_R {
|
||||
type Target = crate::FieldReader<bool, MODE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MODE` writer - The mode of operation to be used"]
|
||||
pub struct MODE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> MODE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: MODE_A) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "AES CCM packet encryption mode"]
|
||||
#[inline(always)]
|
||||
pub fn encryption(self) -> &'a mut W {
|
||||
self.variant(MODE_A::ENCRYPTION)
|
||||
}
|
||||
#[doc = "AES CCM packet decryption mode"]
|
||||
#[inline(always)]
|
||||
pub fn decryption(self) -> &'a mut W {
|
||||
self.variant(MODE_A::DECRYPTION)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Data rate that the CCM shall run in synch with\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DATARATE_A {
|
||||
#[doc = "0: In synch with 1 Mbit data rate"]
|
||||
_1MBIT = 0,
|
||||
#[doc = "1: In synch with 2 Mbit data rate"]
|
||||
_2MBIT = 1,
|
||||
}
|
||||
impl From<DATARATE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DATARATE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATARATE` reader - Data rate that the CCM shall run in synch with"]
|
||||
pub struct DATARATE_R(crate::FieldReader<bool, DATARATE_A>);
|
||||
impl DATARATE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DATARATE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DATARATE_A {
|
||||
match self.bits {
|
||||
false => DATARATE_A::_1MBIT,
|
||||
true => DATARATE_A::_2MBIT,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1MBIT`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1mbit(&self) -> bool {
|
||||
**self == DATARATE_A::_1MBIT
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_2MBIT`"]
|
||||
#[inline(always)]
|
||||
pub fn is_2mbit(&self) -> bool {
|
||||
**self == DATARATE_A::_2MBIT
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DATARATE_R {
|
||||
type Target = crate::FieldReader<bool, DATARATE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DATARATE` writer - Data rate that the CCM shall run in synch with"]
|
||||
pub struct DATARATE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DATARATE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: DATARATE_A) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "In synch with 1 Mbit data rate"]
|
||||
#[inline(always)]
|
||||
pub fn _1mbit(self) -> &'a mut W {
|
||||
self.variant(DATARATE_A::_1MBIT)
|
||||
}
|
||||
#[doc = "In synch with 2 Mbit data rate"]
|
||||
#[inline(always)]
|
||||
pub fn _2mbit(self) -> &'a mut W {
|
||||
self.variant(DATARATE_A::_2MBIT)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Packet length configuration\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LENGTH_A {
|
||||
#[doc = "0: Default length. Effective length of LENGTH field is 5-bit"]
|
||||
DEFAULT = 0,
|
||||
#[doc = "1: Extended length. Effective length of LENGTH field is 8-bit"]
|
||||
EXTENDED = 1,
|
||||
}
|
||||
impl From<LENGTH_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LENGTH_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LENGTH` reader - Packet length configuration"]
|
||||
pub struct LENGTH_R(crate::FieldReader<bool, LENGTH_A>);
|
||||
impl LENGTH_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LENGTH_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LENGTH_A {
|
||||
match self.bits {
|
||||
false => LENGTH_A::DEFAULT,
|
||||
true => LENGTH_A::EXTENDED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DEFAULT`"]
|
||||
#[inline(always)]
|
||||
pub fn is_default(&self) -> bool {
|
||||
**self == LENGTH_A::DEFAULT
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `EXTENDED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_extended(&self) -> bool {
|
||||
**self == LENGTH_A::EXTENDED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LENGTH_R {
|
||||
type Target = crate::FieldReader<bool, LENGTH_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LENGTH` writer - Packet length configuration"]
|
||||
pub struct LENGTH_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LENGTH_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: LENGTH_A) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Default length. Effective length of LENGTH field is 5-bit"]
|
||||
#[inline(always)]
|
||||
pub fn default(self) -> &'a mut W {
|
||||
self.variant(LENGTH_A::DEFAULT)
|
||||
}
|
||||
#[doc = "Extended length. Effective length of LENGTH field is 8-bit"]
|
||||
#[inline(always)]
|
||||
pub fn extended(self) -> &'a mut W {
|
||||
self.variant(LENGTH_A::EXTENDED)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - The mode of operation to be used"]
|
||||
#[inline(always)]
|
||||
pub fn mode(&self) -> MODE_R {
|
||||
MODE_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - Data rate that the CCM shall run in synch with"]
|
||||
#[inline(always)]
|
||||
pub fn datarate(&self) -> DATARATE_R {
|
||||
DATARATE_R::new(((self.bits >> 16) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 24 - Packet length configuration"]
|
||||
#[inline(always)]
|
||||
pub fn length(&self) -> LENGTH_R {
|
||||
LENGTH_R::new(((self.bits >> 24) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - The mode of operation to be used"]
|
||||
#[inline(always)]
|
||||
pub fn mode(&mut self) -> MODE_W {
|
||||
MODE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 16 - Data rate that the CCM shall run in synch with"]
|
||||
#[inline(always)]
|
||||
pub fn datarate(&mut self) -> DATARATE_W {
|
||||
DATARATE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 24 - Packet length configuration"]
|
||||
#[inline(always)]
|
||||
pub fn length(&mut self) -> LENGTH_W {
|
||||
LENGTH_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Operation mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mode](index.html) module"]
|
||||
pub struct MODE_SPEC;
|
||||
impl crate::RegisterSpec for MODE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [mode::R](R) reader structure"]
|
||||
impl crate::Readable for MODE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"]
|
||||
impl crate::Writable for MODE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets MODE to value 0x01"]
|
||||
impl crate::Resettable for MODE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
102
src/ccm/outptr.rs
Normal file
102
src/ccm/outptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `OUTPTR` reader"]
|
||||
pub struct R(crate::R<OUTPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<OUTPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<OUTPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<OUTPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `OUTPTR` writer"]
|
||||
pub struct W(crate::W<OUTPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<OUTPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<OUTPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<OUTPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OUTPTR` reader - Output pointer"]
|
||||
pub struct OUTPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl OUTPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
OUTPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for OUTPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OUTPTR` writer - Output pointer"]
|
||||
pub struct OUTPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> OUTPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Output pointer"]
|
||||
#[inline(always)]
|
||||
pub fn outptr(&self) -> OUTPTR_R {
|
||||
OUTPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Output pointer"]
|
||||
#[inline(always)]
|
||||
pub fn outptr(&mut self) -> OUTPTR_W {
|
||||
OUTPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Output pointer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [outptr](index.html) module"]
|
||||
pub struct OUTPTR_SPEC;
|
||||
impl crate::RegisterSpec for OUTPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [outptr::R](R) reader structure"]
|
||||
impl crate::Readable for OUTPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [outptr::W](W) writer structure"]
|
||||
impl crate::Writable for OUTPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets OUTPTR to value 0"]
|
||||
impl crate::Resettable for OUTPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
102
src/ccm/scratchptr.rs
Normal file
102
src/ccm/scratchptr.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `SCRATCHPTR` reader"]
|
||||
pub struct R(crate::R<SCRATCHPTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SCRATCHPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SCRATCHPTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SCRATCHPTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SCRATCHPTR` writer"]
|
||||
pub struct W(crate::W<SCRATCHPTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SCRATCHPTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<SCRATCHPTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SCRATCHPTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."]
|
||||
pub struct SCRATCHPTR_R(crate::FieldReader<u32, u32>);
|
||||
impl SCRATCHPTR_R {
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
SCRATCHPTR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SCRATCHPTR_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."]
|
||||
pub struct SCRATCHPTR_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> SCRATCHPTR_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."]
|
||||
#[inline(always)]
|
||||
pub fn scratchptr(&self) -> SCRATCHPTR_R {
|
||||
SCRATCHPTR_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."]
|
||||
#[inline(always)]
|
||||
pub fn scratchptr(&mut self) -> SCRATCHPTR_W {
|
||||
SCRATCHPTR_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Pointer to data area used for temporary storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [scratchptr](index.html) module"]
|
||||
pub struct SCRATCHPTR_SPEC;
|
||||
impl crate::RegisterSpec for SCRATCHPTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [scratchptr::R](R) reader structure"]
|
||||
impl crate::Readable for SCRATCHPTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"]
|
||||
impl crate::Writable for SCRATCHPTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SCRATCHPTR to value 0"]
|
||||
impl crate::Resettable for SCRATCHPTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
159
src/ccm/shorts.rs
Normal file
159
src/ccm/shorts.rs
Normal file
@@ -0,0 +1,159 @@
|
||||
#[doc = "Register `SHORTS` reader"]
|
||||
pub struct R(crate::R<SHORTS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SHORTS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SHORTS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SHORTS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SHORTS` writer"]
|
||||
pub struct W(crate::W<SHORTS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SHORTS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<SHORTS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SHORTS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Shortcut between ENDKSGEN event and CRYPT task\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ENDKSGEN_CRYPT_A {
|
||||
#[doc = "0: Disable shortcut"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable shortcut"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ENDKSGEN_CRYPT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ENDKSGEN_CRYPT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN_CRYPT` reader - Shortcut between ENDKSGEN event and CRYPT task"]
|
||||
pub struct ENDKSGEN_CRYPT_R(crate::FieldReader<bool, ENDKSGEN_CRYPT_A>);
|
||||
impl ENDKSGEN_CRYPT_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
ENDKSGEN_CRYPT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ENDKSGEN_CRYPT_A {
|
||||
match self.bits {
|
||||
false => ENDKSGEN_CRYPT_A::DISABLED,
|
||||
true => ENDKSGEN_CRYPT_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == ENDKSGEN_CRYPT_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == ENDKSGEN_CRYPT_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for ENDKSGEN_CRYPT_R {
|
||||
type Target = crate::FieldReader<bool, ENDKSGEN_CRYPT_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ENDKSGEN_CRYPT` writer - Shortcut between ENDKSGEN event and CRYPT task"]
|
||||
pub struct ENDKSGEN_CRYPT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> ENDKSGEN_CRYPT_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: ENDKSGEN_CRYPT_A) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ENDKSGEN_CRYPT_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ENDKSGEN_CRYPT_A::ENABLED)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Shortcut between ENDKSGEN event and CRYPT task"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen_crypt(&self) -> ENDKSGEN_CRYPT_R {
|
||||
ENDKSGEN_CRYPT_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Shortcut between ENDKSGEN event and CRYPT task"]
|
||||
#[inline(always)]
|
||||
pub fn endksgen_crypt(&mut self) -> ENDKSGEN_CRYPT_W {
|
||||
ENDKSGEN_CRYPT_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Shortcut register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [shorts](index.html) module"]
|
||||
pub struct SHORTS_SPEC;
|
||||
impl crate::RegisterSpec for SHORTS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [shorts::R](R) reader structure"]
|
||||
impl crate::Readable for SHORTS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"]
|
||||
impl crate::Writable for SHORTS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SHORTS to value 0"]
|
||||
impl crate::Resettable for SHORTS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
45
src/ccm/tasks_crypt.rs
Normal file
45
src/ccm/tasks_crypt.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TASKS_CRYPT` writer"]
|
||||
pub struct W(crate::W<TASKS_CRYPT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_CRYPT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_CRYPT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_CRYPT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Start encryption/decryption. This operation will stop by itself when completed.\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_crypt](index.html) module"]
|
||||
pub struct TASKS_CRYPT_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_CRYPT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_crypt::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_CRYPT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_CRYPT to value 0"]
|
||||
impl crate::Resettable for TASKS_CRYPT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
45
src/ccm/tasks_ksgen.rs
Normal file
45
src/ccm/tasks_ksgen.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TASKS_KSGEN` writer"]
|
||||
pub struct W(crate::W<TASKS_KSGEN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_KSGEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_KSGEN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_KSGEN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Start generation of key-stream. This operation will stop by itself when completed.\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_ksgen](index.html) module"]
|
||||
pub struct TASKS_KSGEN_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_KSGEN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_ksgen::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_KSGEN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_KSGEN to value 0"]
|
||||
impl crate::Resettable for TASKS_KSGEN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
45
src/ccm/tasks_stop.rs
Normal file
45
src/ccm/tasks_stop.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TASKS_STOP` writer"]
|
||||
pub struct W(crate::W<TASKS_STOP_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_STOP_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_STOP_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_STOP_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Stop encryption/decryption\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_stop](index.html) module"]
|
||||
pub struct TASKS_STOP_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_STOP_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_STOP_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_STOP to value 0"]
|
||||
impl crate::Resettable for TASKS_STOP_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
138
src/clock.rs
Normal file
138
src/clock.rs
Normal file
@@ -0,0 +1,138 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RegisterBlock {
|
||||
#[doc = "0x00 - Start HFCLK crystal oscillator"]
|
||||
pub tasks_hfclkstart: crate::Reg<tasks_hfclkstart::TASKS_HFCLKSTART_SPEC>,
|
||||
#[doc = "0x04 - Stop HFCLK crystal oscillator"]
|
||||
pub tasks_hfclkstop: crate::Reg<tasks_hfclkstop::TASKS_HFCLKSTOP_SPEC>,
|
||||
#[doc = "0x08 - Start LFCLK source"]
|
||||
pub tasks_lfclkstart: crate::Reg<tasks_lfclkstart::TASKS_LFCLKSTART_SPEC>,
|
||||
#[doc = "0x0c - Stop LFCLK source"]
|
||||
pub tasks_lfclkstop: crate::Reg<tasks_lfclkstop::TASKS_LFCLKSTOP_SPEC>,
|
||||
#[doc = "0x10 - Start calibration of LFRC oscillator"]
|
||||
pub tasks_cal: crate::Reg<tasks_cal::TASKS_CAL_SPEC>,
|
||||
#[doc = "0x14 - Start calibration timer"]
|
||||
pub tasks_ctstart: crate::Reg<tasks_ctstart::TASKS_CTSTART_SPEC>,
|
||||
#[doc = "0x18 - Stop calibration timer"]
|
||||
pub tasks_ctstop: crate::Reg<tasks_ctstop::TASKS_CTSTOP_SPEC>,
|
||||
_reserved7: [u8; 0xe4],
|
||||
#[doc = "0x100 - HFCLK oscillator started"]
|
||||
pub events_hfclkstarted: crate::Reg<events_hfclkstarted::EVENTS_HFCLKSTARTED_SPEC>,
|
||||
#[doc = "0x104 - LFCLK started"]
|
||||
pub events_lfclkstarted: crate::Reg<events_lfclkstarted::EVENTS_LFCLKSTARTED_SPEC>,
|
||||
_reserved9: [u8; 0x04],
|
||||
#[doc = "0x10c - Calibration of LFCLK RC oscillator complete event"]
|
||||
pub events_done: crate::Reg<events_done::EVENTS_DONE_SPEC>,
|
||||
#[doc = "0x110 - Calibration timer timeout"]
|
||||
pub events_ctto: crate::Reg<events_ctto::EVENTS_CTTO_SPEC>,
|
||||
_reserved11: [u8; 0x01f0],
|
||||
#[doc = "0x304 - Enable interrupt"]
|
||||
pub intenset: crate::Reg<intenset::INTENSET_SPEC>,
|
||||
#[doc = "0x308 - Disable interrupt"]
|
||||
pub intenclr: crate::Reg<intenclr::INTENCLR_SPEC>,
|
||||
_reserved13: [u8; 0xfc],
|
||||
#[doc = "0x408 - Status indicating that HFCLKSTART task has been triggered"]
|
||||
pub hfclkrun: crate::Reg<hfclkrun::HFCLKRUN_SPEC>,
|
||||
#[doc = "0x40c - HFCLK status"]
|
||||
pub hfclkstat: crate::Reg<hfclkstat::HFCLKSTAT_SPEC>,
|
||||
_reserved15: [u8; 0x04],
|
||||
#[doc = "0x414 - Status indicating that LFCLKSTART task has been triggered"]
|
||||
pub lfclkrun: crate::Reg<lfclkrun::LFCLKRUN_SPEC>,
|
||||
#[doc = "0x418 - LFCLK status"]
|
||||
pub lfclkstat: crate::Reg<lfclkstat::LFCLKSTAT_SPEC>,
|
||||
#[doc = "0x41c - Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"]
|
||||
pub lfclksrccopy: crate::Reg<lfclksrccopy::LFCLKSRCCOPY_SPEC>,
|
||||
_reserved18: [u8; 0xf8],
|
||||
#[doc = "0x518 - Clock source for the LFCLK"]
|
||||
pub lfclksrc: crate::Reg<lfclksrc::LFCLKSRC_SPEC>,
|
||||
_reserved19: [u8; 0x1c],
|
||||
#[doc = "0x538 - Calibration timer interval"]
|
||||
pub ctiv: crate::Reg<ctiv::CTIV_SPEC>,
|
||||
_reserved20: [u8; 0x20],
|
||||
#[doc = "0x55c - Clocking options for the Trace Port debug interface"]
|
||||
pub traceconfig: crate::Reg<traceconfig::TRACECONFIG_SPEC>,
|
||||
}
|
||||
#[doc = "TASKS_HFCLKSTART register accessor: an alias for `Reg<TASKS_HFCLKSTART_SPEC>`"]
|
||||
pub type TASKS_HFCLKSTART = crate::Reg<tasks_hfclkstart::TASKS_HFCLKSTART_SPEC>;
|
||||
#[doc = "Start HFCLK crystal oscillator"]
|
||||
pub mod tasks_hfclkstart;
|
||||
#[doc = "TASKS_HFCLKSTOP register accessor: an alias for `Reg<TASKS_HFCLKSTOP_SPEC>`"]
|
||||
pub type TASKS_HFCLKSTOP = crate::Reg<tasks_hfclkstop::TASKS_HFCLKSTOP_SPEC>;
|
||||
#[doc = "Stop HFCLK crystal oscillator"]
|
||||
pub mod tasks_hfclkstop;
|
||||
#[doc = "TASKS_LFCLKSTART register accessor: an alias for `Reg<TASKS_LFCLKSTART_SPEC>`"]
|
||||
pub type TASKS_LFCLKSTART = crate::Reg<tasks_lfclkstart::TASKS_LFCLKSTART_SPEC>;
|
||||
#[doc = "Start LFCLK source"]
|
||||
pub mod tasks_lfclkstart;
|
||||
#[doc = "TASKS_LFCLKSTOP register accessor: an alias for `Reg<TASKS_LFCLKSTOP_SPEC>`"]
|
||||
pub type TASKS_LFCLKSTOP = crate::Reg<tasks_lfclkstop::TASKS_LFCLKSTOP_SPEC>;
|
||||
#[doc = "Stop LFCLK source"]
|
||||
pub mod tasks_lfclkstop;
|
||||
#[doc = "TASKS_CAL register accessor: an alias for `Reg<TASKS_CAL_SPEC>`"]
|
||||
pub type TASKS_CAL = crate::Reg<tasks_cal::TASKS_CAL_SPEC>;
|
||||
#[doc = "Start calibration of LFRC oscillator"]
|
||||
pub mod tasks_cal;
|
||||
#[doc = "TASKS_CTSTART register accessor: an alias for `Reg<TASKS_CTSTART_SPEC>`"]
|
||||
pub type TASKS_CTSTART = crate::Reg<tasks_ctstart::TASKS_CTSTART_SPEC>;
|
||||
#[doc = "Start calibration timer"]
|
||||
pub mod tasks_ctstart;
|
||||
#[doc = "TASKS_CTSTOP register accessor: an alias for `Reg<TASKS_CTSTOP_SPEC>`"]
|
||||
pub type TASKS_CTSTOP = crate::Reg<tasks_ctstop::TASKS_CTSTOP_SPEC>;
|
||||
#[doc = "Stop calibration timer"]
|
||||
pub mod tasks_ctstop;
|
||||
#[doc = "EVENTS_HFCLKSTARTED register accessor: an alias for `Reg<EVENTS_HFCLKSTARTED_SPEC>`"]
|
||||
pub type EVENTS_HFCLKSTARTED = crate::Reg<events_hfclkstarted::EVENTS_HFCLKSTARTED_SPEC>;
|
||||
#[doc = "HFCLK oscillator started"]
|
||||
pub mod events_hfclkstarted;
|
||||
#[doc = "EVENTS_LFCLKSTARTED register accessor: an alias for `Reg<EVENTS_LFCLKSTARTED_SPEC>`"]
|
||||
pub type EVENTS_LFCLKSTARTED = crate::Reg<events_lfclkstarted::EVENTS_LFCLKSTARTED_SPEC>;
|
||||
#[doc = "LFCLK started"]
|
||||
pub mod events_lfclkstarted;
|
||||
#[doc = "EVENTS_DONE register accessor: an alias for `Reg<EVENTS_DONE_SPEC>`"]
|
||||
pub type EVENTS_DONE = crate::Reg<events_done::EVENTS_DONE_SPEC>;
|
||||
#[doc = "Calibration of LFCLK RC oscillator complete event"]
|
||||
pub mod events_done;
|
||||
#[doc = "EVENTS_CTTO register accessor: an alias for `Reg<EVENTS_CTTO_SPEC>`"]
|
||||
pub type EVENTS_CTTO = crate::Reg<events_ctto::EVENTS_CTTO_SPEC>;
|
||||
#[doc = "Calibration timer timeout"]
|
||||
pub mod events_ctto;
|
||||
#[doc = "INTENSET register accessor: an alias for `Reg<INTENSET_SPEC>`"]
|
||||
pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
|
||||
#[doc = "Enable interrupt"]
|
||||
pub mod intenset;
|
||||
#[doc = "INTENCLR register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
|
||||
pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
|
||||
#[doc = "Disable interrupt"]
|
||||
pub mod intenclr;
|
||||
#[doc = "HFCLKRUN register accessor: an alias for `Reg<HFCLKRUN_SPEC>`"]
|
||||
pub type HFCLKRUN = crate::Reg<hfclkrun::HFCLKRUN_SPEC>;
|
||||
#[doc = "Status indicating that HFCLKSTART task has been triggered"]
|
||||
pub mod hfclkrun;
|
||||
#[doc = "HFCLKSTAT register accessor: an alias for `Reg<HFCLKSTAT_SPEC>`"]
|
||||
pub type HFCLKSTAT = crate::Reg<hfclkstat::HFCLKSTAT_SPEC>;
|
||||
#[doc = "HFCLK status"]
|
||||
pub mod hfclkstat;
|
||||
#[doc = "LFCLKRUN register accessor: an alias for `Reg<LFCLKRUN_SPEC>`"]
|
||||
pub type LFCLKRUN = crate::Reg<lfclkrun::LFCLKRUN_SPEC>;
|
||||
#[doc = "Status indicating that LFCLKSTART task has been triggered"]
|
||||
pub mod lfclkrun;
|
||||
#[doc = "LFCLKSTAT register accessor: an alias for `Reg<LFCLKSTAT_SPEC>`"]
|
||||
pub type LFCLKSTAT = crate::Reg<lfclkstat::LFCLKSTAT_SPEC>;
|
||||
#[doc = "LFCLK status"]
|
||||
pub mod lfclkstat;
|
||||
#[doc = "LFCLKSRCCOPY register accessor: an alias for `Reg<LFCLKSRCCOPY_SPEC>`"]
|
||||
pub type LFCLKSRCCOPY = crate::Reg<lfclksrccopy::LFCLKSRCCOPY_SPEC>;
|
||||
#[doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"]
|
||||
pub mod lfclksrccopy;
|
||||
#[doc = "LFCLKSRC register accessor: an alias for `Reg<LFCLKSRC_SPEC>`"]
|
||||
pub type LFCLKSRC = crate::Reg<lfclksrc::LFCLKSRC_SPEC>;
|
||||
#[doc = "Clock source for the LFCLK"]
|
||||
pub mod lfclksrc;
|
||||
#[doc = "CTIV register accessor: an alias for `Reg<CTIV_SPEC>`"]
|
||||
pub type CTIV = crate::Reg<ctiv::CTIV_SPEC>;
|
||||
#[doc = "Calibration timer interval"]
|
||||
pub mod ctiv;
|
||||
#[doc = "TRACECONFIG register accessor: an alias for `Reg<TRACECONFIG_SPEC>`"]
|
||||
pub type TRACECONFIG = crate::Reg<traceconfig::TRACECONFIG_SPEC>;
|
||||
#[doc = "Clocking options for the Trace Port debug interface"]
|
||||
pub mod traceconfig;
|
||||
102
src/clock/ctiv.rs
Normal file
102
src/clock/ctiv.rs
Normal file
@@ -0,0 +1,102 @@
|
||||
#[doc = "Register `CTIV` reader"]
|
||||
pub struct R(crate::R<CTIV_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CTIV_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CTIV_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CTIV_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CTIV` writer"]
|
||||
pub struct W(crate::W<CTIV_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CTIV_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CTIV_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CTIV_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTIV` reader - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."]
|
||||
pub struct CTIV_R(crate::FieldReader<u8, u8>);
|
||||
impl CTIV_R {
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
CTIV_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CTIV_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTIV` writer - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."]
|
||||
pub struct CTIV_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CTIV_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."]
|
||||
#[inline(always)]
|
||||
pub fn ctiv(&self) -> CTIV_R {
|
||||
CTIV_R::new((self.bits & 0x7f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."]
|
||||
#[inline(always)]
|
||||
pub fn ctiv(&mut self) -> CTIV_W {
|
||||
CTIV_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Calibration timer interval\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctiv](index.html) module"]
|
||||
pub struct CTIV_SPEC;
|
||||
impl crate::RegisterSpec for CTIV_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ctiv::R](R) reader structure"]
|
||||
impl crate::Readable for CTIV_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ctiv::W](W) writer structure"]
|
||||
impl crate::Writable for CTIV_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CTIV to value 0"]
|
||||
impl crate::Resettable for CTIV_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/clock/events_ctto.rs
Normal file
64
src/clock/events_ctto.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_CTTO` reader"]
|
||||
pub struct R(crate::R<EVENTS_CTTO_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_CTTO_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_CTTO_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_CTTO_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_CTTO` writer"]
|
||||
pub struct W(crate::W<EVENTS_CTTO_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_CTTO_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_CTTO_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_CTTO_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Calibration timer timeout\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_ctto](index.html) module"]
|
||||
pub struct EVENTS_CTTO_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_CTTO_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_ctto::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_CTTO_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_ctto::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_CTTO_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_CTTO to value 0"]
|
||||
impl crate::Resettable for EVENTS_CTTO_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/clock/events_done.rs
Normal file
64
src/clock/events_done.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_DONE` reader"]
|
||||
pub struct R(crate::R<EVENTS_DONE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_DONE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_DONE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_DONE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_DONE` writer"]
|
||||
pub struct W(crate::W<EVENTS_DONE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_DONE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_DONE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_DONE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Calibration of LFCLK RC oscillator complete event\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_done](index.html) module"]
|
||||
pub struct EVENTS_DONE_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_DONE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_done::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_DONE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_done::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_DONE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_DONE to value 0"]
|
||||
impl crate::Resettable for EVENTS_DONE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/clock/events_hfclkstarted.rs
Normal file
64
src/clock/events_hfclkstarted.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_HFCLKSTARTED` reader"]
|
||||
pub struct R(crate::R<EVENTS_HFCLKSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_HFCLKSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_HFCLKSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_HFCLKSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_HFCLKSTARTED` writer"]
|
||||
pub struct W(crate::W<EVENTS_HFCLKSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_HFCLKSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_HFCLKSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_HFCLKSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "HFCLK oscillator started\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_hfclkstarted](index.html) module"]
|
||||
pub struct EVENTS_HFCLKSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_HFCLKSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_hfclkstarted::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_HFCLKSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_hfclkstarted::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_HFCLKSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_HFCLKSTARTED to value 0"]
|
||||
impl crate::Resettable for EVENTS_HFCLKSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
64
src/clock/events_lfclkstarted.rs
Normal file
64
src/clock/events_lfclkstarted.rs
Normal file
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `EVENTS_LFCLKSTARTED` reader"]
|
||||
pub struct R(crate::R<EVENTS_LFCLKSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_LFCLKSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_LFCLKSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_LFCLKSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_LFCLKSTARTED` writer"]
|
||||
pub struct W(crate::W<EVENTS_LFCLKSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_LFCLKSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_LFCLKSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_LFCLKSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "LFCLK started\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_lfclkstarted](index.html) module"]
|
||||
pub struct EVENTS_LFCLKSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_LFCLKSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_lfclkstarted::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_LFCLKSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_lfclkstarted::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_LFCLKSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_LFCLKSTARTED to value 0"]
|
||||
impl crate::Resettable for EVENTS_LFCLKSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
84
src/clock/hfclkrun.rs
Normal file
84
src/clock/hfclkrun.rs
Normal file
@@ -0,0 +1,84 @@
|
||||
#[doc = "Register `HFCLKRUN` reader"]
|
||||
pub struct R(crate::R<HFCLKRUN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<HFCLKRUN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<HFCLKRUN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<HFCLKRUN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "HFCLKSTART task triggered or not\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STATUS_A {
|
||||
#[doc = "0: Task not triggered"]
|
||||
NOTTRIGGERED = 0,
|
||||
#[doc = "1: Task triggered"]
|
||||
TRIGGERED = 1,
|
||||
}
|
||||
impl From<STATUS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STATUS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STATUS` reader - HFCLKSTART task triggered or not"]
|
||||
pub struct STATUS_R(crate::FieldReader<bool, STATUS_A>);
|
||||
impl STATUS_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STATUS_A {
|
||||
match self.bits {
|
||||
false => STATUS_A::NOTTRIGGERED,
|
||||
true => STATUS_A::TRIGGERED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOTTRIGGERED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_triggered(&self) -> bool {
|
||||
**self == STATUS_A::NOTTRIGGERED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `TRIGGERED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_triggered(&self) -> bool {
|
||||
**self == STATUS_A::TRIGGERED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STATUS_R {
|
||||
type Target = crate::FieldReader<bool, STATUS_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - HFCLKSTART task triggered or not"]
|
||||
#[inline(always)]
|
||||
pub fn status(&self) -> STATUS_R {
|
||||
STATUS_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Status indicating that HFCLKSTART task has been triggered\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfclkrun](index.html) module"]
|
||||
pub struct HFCLKRUN_SPEC;
|
||||
impl crate::RegisterSpec for HFCLKRUN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [hfclkrun::R](R) reader structure"]
|
||||
impl crate::Readable for HFCLKRUN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets HFCLKRUN to value 0"]
|
||||
impl crate::Resettable for HFCLKRUN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
135
src/clock/hfclkstat.rs
Normal file
135
src/clock/hfclkstat.rs
Normal file
@@ -0,0 +1,135 @@
|
||||
#[doc = "Register `HFCLKSTAT` reader"]
|
||||
pub struct R(crate::R<HFCLKSTAT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<HFCLKSTAT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<HFCLKSTAT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<HFCLKSTAT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Source of HFCLK\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SRC_A {
|
||||
#[doc = "0: 64 MHz internal oscillator (HFINT)"]
|
||||
RC = 0,
|
||||
#[doc = "1: 64 MHz crystal oscillator (HFXO)"]
|
||||
XTAL = 1,
|
||||
}
|
||||
impl From<SRC_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: SRC_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SRC` reader - Source of HFCLK"]
|
||||
pub struct SRC_R(crate::FieldReader<bool, SRC_A>);
|
||||
impl SRC_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
SRC_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> SRC_A {
|
||||
match self.bits {
|
||||
false => SRC_A::RC,
|
||||
true => SRC_A::XTAL,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `RC`"]
|
||||
#[inline(always)]
|
||||
pub fn is_rc(&self) -> bool {
|
||||
**self == SRC_A::RC
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `XTAL`"]
|
||||
#[inline(always)]
|
||||
pub fn is_xtal(&self) -> bool {
|
||||
**self == SRC_A::XTAL
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for SRC_R {
|
||||
type Target = crate::FieldReader<bool, SRC_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "HFCLK state\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STATE_A {
|
||||
#[doc = "0: HFCLK not running"]
|
||||
NOTRUNNING = 0,
|
||||
#[doc = "1: HFCLK running"]
|
||||
RUNNING = 1,
|
||||
}
|
||||
impl From<STATE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STATE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STATE` reader - HFCLK state"]
|
||||
pub struct STATE_R(crate::FieldReader<bool, STATE_A>);
|
||||
impl STATE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STATE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STATE_A {
|
||||
match self.bits {
|
||||
false => STATE_A::NOTRUNNING,
|
||||
true => STATE_A::RUNNING,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOTRUNNING`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_running(&self) -> bool {
|
||||
**self == STATE_A::NOTRUNNING
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `RUNNING`"]
|
||||
#[inline(always)]
|
||||
pub fn is_running(&self) -> bool {
|
||||
**self == STATE_A::RUNNING
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STATE_R {
|
||||
type Target = crate::FieldReader<bool, STATE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Source of HFCLK"]
|
||||
#[inline(always)]
|
||||
pub fn src(&self) -> SRC_R {
|
||||
SRC_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - HFCLK state"]
|
||||
#[inline(always)]
|
||||
pub fn state(&self) -> STATE_R {
|
||||
STATE_R::new(((self.bits >> 16) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "HFCLK status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfclkstat](index.html) module"]
|
||||
pub struct HFCLKSTAT_SPEC;
|
||||
impl crate::RegisterSpec for HFCLKSTAT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [hfclkstat::R](R) reader structure"]
|
||||
impl crate::Readable for HFCLKSTAT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets HFCLKSTAT to value 0"]
|
||||
impl crate::Resettable for HFCLKSTAT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
466
src/clock/intenclr.rs
Normal file
466
src/clock/intenclr.rs
Normal file
@@ -0,0 +1,466 @@
|
||||
#[doc = "Register `INTENCLR` reader"]
|
||||
pub struct R(crate::R<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENCLR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENCLR` writer"]
|
||||
pub struct W(crate::W<INTENCLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENCLR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENCLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for HFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFCLKSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<HFCLKSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: HFCLKSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `HFCLKSTARTED` reader - Write '1' to Disable interrupt for HFCLKSTARTED event"]
|
||||
pub struct HFCLKSTARTED_R(crate::FieldReader<bool, HFCLKSTARTED_A>);
|
||||
impl HFCLKSTARTED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
HFCLKSTARTED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> HFCLKSTARTED_A {
|
||||
match self.bits {
|
||||
false => HFCLKSTARTED_A::DISABLED,
|
||||
true => HFCLKSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == HFCLKSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == HFCLKSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for HFCLKSTARTED_R {
|
||||
type Target = crate::FieldReader<bool, HFCLKSTARTED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for HFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFCLKSTARTED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<HFCLKSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: HFCLKSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `HFCLKSTARTED` writer - Write '1' to Disable interrupt for HFCLKSTARTED event"]
|
||||
pub struct HFCLKSTARTED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> HFCLKSTARTED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: HFCLKSTARTED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(HFCLKSTARTED_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for LFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LFCLKSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<LFCLKSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LFCLKSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LFCLKSTARTED` reader - Write '1' to Disable interrupt for LFCLKSTARTED event"]
|
||||
pub struct LFCLKSTARTED_R(crate::FieldReader<bool, LFCLKSTARTED_A>);
|
||||
impl LFCLKSTARTED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LFCLKSTARTED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LFCLKSTARTED_A {
|
||||
match self.bits {
|
||||
false => LFCLKSTARTED_A::DISABLED,
|
||||
true => LFCLKSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == LFCLKSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == LFCLKSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LFCLKSTARTED_R {
|
||||
type Target = crate::FieldReader<bool, LFCLKSTARTED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for LFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LFCLKSTARTED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<LFCLKSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LFCLKSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LFCLKSTARTED` writer - Write '1' to Disable interrupt for LFCLKSTARTED event"]
|
||||
pub struct LFCLKSTARTED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LFCLKSTARTED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: LFCLKSTARTED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(LFCLKSTARTED_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for DONE event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DONE_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<DONE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DONE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DONE` reader - Write '1' to Disable interrupt for DONE event"]
|
||||
pub struct DONE_R(crate::FieldReader<bool, DONE_A>);
|
||||
impl DONE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DONE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DONE_A {
|
||||
match self.bits {
|
||||
false => DONE_A::DISABLED,
|
||||
true => DONE_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == DONE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == DONE_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DONE_R {
|
||||
type Target = crate::FieldReader<bool, DONE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for DONE event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DONE_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<DONE_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DONE_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DONE` writer - Write '1' to Disable interrupt for DONE event"]
|
||||
pub struct DONE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DONE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: DONE_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(DONE_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for CTTO event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CTTO_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<CTTO_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CTTO_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTTO` reader - Write '1' to Disable interrupt for CTTO event"]
|
||||
pub struct CTTO_R(crate::FieldReader<bool, CTTO_A>);
|
||||
impl CTTO_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CTTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CTTO_A {
|
||||
match self.bits {
|
||||
false => CTTO_A::DISABLED,
|
||||
true => CTTO_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == CTTO_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == CTTO_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for CTTO_R {
|
||||
type Target = crate::FieldReader<bool, CTTO_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Disable interrupt for CTTO event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CTTO_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<CTTO_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CTTO_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTTO` writer - Write '1' to Disable interrupt for CTTO event"]
|
||||
pub struct CTTO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> CTTO_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: CTTO_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(CTTO_AW::CLEAR)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for HFCLKSTARTED event"]
|
||||
#[inline(always)]
|
||||
pub fn hfclkstarted(&self) -> HFCLKSTARTED_R {
|
||||
HFCLKSTARTED_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for LFCLKSTARTED event"]
|
||||
#[inline(always)]
|
||||
pub fn lfclkstarted(&self) -> LFCLKSTARTED_R {
|
||||
LFCLKSTARTED_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Write '1' to Disable interrupt for DONE event"]
|
||||
#[inline(always)]
|
||||
pub fn done(&self) -> DONE_R {
|
||||
DONE_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Write '1' to Disable interrupt for CTTO event"]
|
||||
#[inline(always)]
|
||||
pub fn ctto(&self) -> CTTO_R {
|
||||
CTTO_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to Disable interrupt for HFCLKSTARTED event"]
|
||||
#[inline(always)]
|
||||
pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W {
|
||||
HFCLKSTARTED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to Disable interrupt for LFCLKSTARTED event"]
|
||||
#[inline(always)]
|
||||
pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W {
|
||||
LFCLKSTARTED_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Write '1' to Disable interrupt for DONE event"]
|
||||
#[inline(always)]
|
||||
pub fn done(&mut self) -> DONE_W {
|
||||
DONE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - Write '1' to Disable interrupt for CTTO event"]
|
||||
#[inline(always)]
|
||||
pub fn ctto(&mut self) -> CTTO_W {
|
||||
CTTO_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
|
||||
pub struct INTENCLR_SPEC;
|
||||
impl crate::RegisterSpec for INTENCLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
|
||||
impl crate::Readable for INTENCLR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
|
||||
impl crate::Writable for INTENCLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTENCLR to value 0"]
|
||||
impl crate::Resettable for INTENCLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
466
src/clock/intenset.rs
Normal file
466
src/clock/intenset.rs
Normal file
@@ -0,0 +1,466 @@
|
||||
#[doc = "Register `INTENSET` reader"]
|
||||
pub struct R(crate::R<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTENSET_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTENSET` writer"]
|
||||
pub struct W(crate::W<INTENSET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTENSET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<INTENSET_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for HFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFCLKSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<HFCLKSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: HFCLKSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `HFCLKSTARTED` reader - Write '1' to Enable interrupt for HFCLKSTARTED event"]
|
||||
pub struct HFCLKSTARTED_R(crate::FieldReader<bool, HFCLKSTARTED_A>);
|
||||
impl HFCLKSTARTED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
HFCLKSTARTED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> HFCLKSTARTED_A {
|
||||
match self.bits {
|
||||
false => HFCLKSTARTED_A::DISABLED,
|
||||
true => HFCLKSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == HFCLKSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == HFCLKSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for HFCLKSTARTED_R {
|
||||
type Target = crate::FieldReader<bool, HFCLKSTARTED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for HFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum HFCLKSTARTED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<HFCLKSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: HFCLKSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `HFCLKSTARTED` writer - Write '1' to Enable interrupt for HFCLKSTARTED event"]
|
||||
pub struct HFCLKSTARTED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> HFCLKSTARTED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: HFCLKSTARTED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(HFCLKSTARTED_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for LFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LFCLKSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<LFCLKSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LFCLKSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LFCLKSTARTED` reader - Write '1' to Enable interrupt for LFCLKSTARTED event"]
|
||||
pub struct LFCLKSTARTED_R(crate::FieldReader<bool, LFCLKSTARTED_A>);
|
||||
impl LFCLKSTARTED_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LFCLKSTARTED_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LFCLKSTARTED_A {
|
||||
match self.bits {
|
||||
false => LFCLKSTARTED_A::DISABLED,
|
||||
true => LFCLKSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == LFCLKSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == LFCLKSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LFCLKSTARTED_R {
|
||||
type Target = crate::FieldReader<bool, LFCLKSTARTED_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for LFCLKSTARTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LFCLKSTARTED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<LFCLKSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LFCLKSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LFCLKSTARTED` writer - Write '1' to Enable interrupt for LFCLKSTARTED event"]
|
||||
pub struct LFCLKSTARTED_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LFCLKSTARTED_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: LFCLKSTARTED_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(LFCLKSTARTED_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for DONE event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DONE_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<DONE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DONE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DONE` reader - Write '1' to Enable interrupt for DONE event"]
|
||||
pub struct DONE_R(crate::FieldReader<bool, DONE_A>);
|
||||
impl DONE_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DONE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DONE_A {
|
||||
match self.bits {
|
||||
false => DONE_A::DISABLED,
|
||||
true => DONE_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
**self == DONE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
**self == DONE_A::ENABLED
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DONE_R {
|
||||
type Target = crate::FieldReader<bool, DONE_A>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for DONE event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DONE_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<DONE_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DONE_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DONE` writer - Write '1' to Enable interrupt for DONE event"]
|
||||
pub struct DONE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DONE_W<'a> {
|
||||
#[doc = r"Writes `variant` to the field"]
|
||||
#[inline(always)]
|
||||
pub fn variant(self, variant: DONE_AW) -> &'a mut W {
|
||||
self.bit(variant.into())
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(DONE_AW::SET)
|
||||
}
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to Enable interrupt for CTTO event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CTTO_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<CTTO_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CTTO_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTTO` reader - Write '1' to Enable interrupt for CTTO event"]
|
||||
pub struct CTTO_R(crate::FieldReader<bool, CTTO_A>);
|
||||
impl CTTO_R {
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
CTTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CTTO_A {
|
||||
match self.bits {
|
||||
false => CTTO_A::DISABLED,
|
||||
true => CTTO_A:: | ||||