feat: add display UI with splash screen, dashboard, and RSSI sparkline

Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
#[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 type CNFPTR_R = crate::FieldReader<u32, u32>;
#[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 type CNFPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CNFPTR_SPEC, u32, u32, 32, O>;
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)
}
}
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<0> {
CNFPTR_W::new(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
}
}
+128
View File
@@ -0,0 +1,128 @@
#[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 = "Field `ENABLE` reader - Enable or disable CCM"]
pub type ENABLE_R = crate::FieldReader<u8, ENABLE_A>;
#[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 _
}
}
impl ENABLE_R {
#[doc = "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
}
}
#[doc = "Field `ENABLE` writer - Enable or disable CCM"]
pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>;
impl<'a, const O: u8> ENABLE_W<'a, O> {
#[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)
}
}
impl R {
#[doc = "Bits 0:1 - Enable or disable CCM"]
#[inline(always)]
pub fn enable(&self) -> ENABLE_R {
ENABLE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Enable or disable CCM"]
#[inline(always)]
pub fn enable(&mut self) -> ENABLE_W<0> {
ENABLE_W::new(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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_ENDCRYPT` reader - Encrypt/decrypt complete"]
pub type EVENTS_ENDCRYPT_R = crate::BitReader<EVENTS_ENDCRYPT_A>;
#[doc = "Encrypt/decrypt complete\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_ENDCRYPT_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_ENDCRYPT_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_ENDCRYPT_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_ENDCRYPT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_ENDCRYPT_A {
match self.bits {
false => EVENTS_ENDCRYPT_A::NOT_GENERATED,
true => EVENTS_ENDCRYPT_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_ENDCRYPT_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_ENDCRYPT_A::GENERATED
}
}
#[doc = "Field `EVENTS_ENDCRYPT` writer - Encrypt/decrypt complete"]
pub type EVENTS_ENDCRYPT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_ENDCRYPT_SPEC, EVENTS_ENDCRYPT_A, O>;
impl<'a, const O: u8> EVENTS_ENDCRYPT_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_ENDCRYPT_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_ENDCRYPT_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Encrypt/decrypt complete"]
#[inline(always)]
pub fn events_endcrypt(&self) -> EVENTS_ENDCRYPT_R {
EVENTS_ENDCRYPT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Encrypt/decrypt complete"]
#[inline(always)]
pub fn events_endcrypt(&mut self) -> EVENTS_ENDCRYPT_W<0> {
EVENTS_ENDCRYPT_W::new(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 = "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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_ENDKSGEN` reader - Key-stream generation complete"]
pub type EVENTS_ENDKSGEN_R = crate::BitReader<EVENTS_ENDKSGEN_A>;
#[doc = "Key-stream generation complete\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_ENDKSGEN_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_ENDKSGEN_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_ENDKSGEN_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_ENDKSGEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_ENDKSGEN_A {
match self.bits {
false => EVENTS_ENDKSGEN_A::NOT_GENERATED,
true => EVENTS_ENDKSGEN_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_ENDKSGEN_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_ENDKSGEN_A::GENERATED
}
}
#[doc = "Field `EVENTS_ENDKSGEN` writer - Key-stream generation complete"]
pub type EVENTS_ENDKSGEN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_ENDKSGEN_SPEC, EVENTS_ENDKSGEN_A, O>;
impl<'a, const O: u8> EVENTS_ENDKSGEN_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_ENDKSGEN_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_ENDKSGEN_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Key-stream generation complete"]
#[inline(always)]
pub fn events_endksgen(&self) -> EVENTS_ENDKSGEN_R {
EVENTS_ENDKSGEN_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Key-stream generation complete"]
#[inline(always)]
pub fn events_endksgen(&mut self) -> EVENTS_ENDKSGEN_W<0> {
EVENTS_ENDKSGEN_W::new(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 = "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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_ERROR` reader - Deprecated field - CCM error event"]
pub type EVENTS_ERROR_R = crate::BitReader<EVENTS_ERROR_A>;
#[doc = "Deprecated field - CCM error event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_ERROR_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_ERROR_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_ERROR_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_ERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_ERROR_A {
match self.bits {
false => EVENTS_ERROR_A::NOT_GENERATED,
true => EVENTS_ERROR_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_ERROR_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_ERROR_A::GENERATED
}
}
#[doc = "Field `EVENTS_ERROR` writer - Deprecated field - CCM error event"]
pub type EVENTS_ERROR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>;
impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_ERROR_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_ERROR_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Deprecated field - CCM error event"]
#[inline(always)]
pub fn events_error(&self) -> EVENTS_ERROR_R {
EVENTS_ERROR_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Deprecated field - CCM error event"]
#[inline(always)]
pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> {
EVENTS_ERROR_W::new(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 = "Deprecated register - 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
}
}
+80
View File
@@ -0,0 +1,80 @@
#[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 type INPTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `INPTR` writer - Input pointer"]
pub type INPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, INPTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Input pointer"]
#[inline(always)]
pub fn inptr(&self) -> INPTR_R {
INPTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Input pointer"]
#[inline(always)]
pub fn inptr(&mut self) -> INPTR_W<0> {
INPTR_W::new(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
}
}
+267
View File
@@ -0,0 +1,267 @@
#[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 = "Field `ENDKSGEN` reader - Write '1' to disable interrupt for event ENDKSGEN"]
pub type ENDKSGEN_R = crate::BitReader<ENDKSGEN_A>;
#[doc = "Write '1' to disable interrupt for event ENDKSGEN\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
}
}
impl ENDKSGEN_R {
#[doc = "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
}
}
#[doc = "Write '1' to disable interrupt for event ENDKSGEN\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 event ENDKSGEN"]
pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDKSGEN_AW, O>;
impl<'a, const O: u8> ENDKSGEN_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ENDKSGEN_AW::CLEAR)
}
}
#[doc = "Field `ENDCRYPT` reader - Write '1' to disable interrupt for event ENDCRYPT"]
pub type ENDCRYPT_R = crate::BitReader<ENDCRYPT_A>;
#[doc = "Write '1' to disable interrupt for event ENDCRYPT\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
}
}
impl ENDCRYPT_R {
#[doc = "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
}
}
#[doc = "Write '1' to disable interrupt for event ENDCRYPT\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 event ENDCRYPT"]
pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDCRYPT_AW, O>;
impl<'a, const O: u8> ENDCRYPT_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ENDCRYPT_AW::CLEAR)
}
}
#[doc = "Field `ERROR` reader - Deprecated intclrfield - Write '1' to disable interrupt for event ERROR"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Deprecated intclrfield - Write '1' to disable interrupt for event ERROR\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
}
}
impl ERROR_R {
#[doc = "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
}
}
#[doc = "Deprecated intclrfield - Write '1' to disable interrupt for event ERROR\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 - Deprecated intclrfield - Write '1' to disable interrupt for event ERROR"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ERROR_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"]
#[inline(always)]
pub fn endksgen(&self) -> ENDKSGEN_R {
ENDKSGEN_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"]
#[inline(always)]
pub fn endcrypt(&self) -> ENDCRYPT_R {
ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Deprecated intclrfield - Write '1' to disable interrupt for event ERROR"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 2) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"]
#[inline(always)]
pub fn endksgen(&mut self) -> ENDKSGEN_W<0> {
ENDKSGEN_W::new(self)
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"]
#[inline(always)]
pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> {
ENDCRYPT_W::new(self)
}
#[doc = "Bit 2 - Deprecated intclrfield - Write '1' to disable interrupt for event ERROR"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<2> {
ERROR_W::new(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
}
}
+267
View File
@@ -0,0 +1,267 @@
#[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 = "Field `ENDKSGEN` reader - Write '1' to enable interrupt for event ENDKSGEN"]
pub type ENDKSGEN_R = crate::BitReader<ENDKSGEN_A>;
#[doc = "Write '1' to enable interrupt for event ENDKSGEN\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
}
}
impl ENDKSGEN_R {
#[doc = "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
}
}
#[doc = "Write '1' to enable interrupt for event ENDKSGEN\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 event ENDKSGEN"]
pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDKSGEN_AW, O>;
impl<'a, const O: u8> ENDKSGEN_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ENDKSGEN_AW::SET)
}
}
#[doc = "Field `ENDCRYPT` reader - Write '1' to enable interrupt for event ENDCRYPT"]
pub type ENDCRYPT_R = crate::BitReader<ENDCRYPT_A>;
#[doc = "Write '1' to enable interrupt for event ENDCRYPT\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
}
}
impl ENDCRYPT_R {
#[doc = "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
}
}
#[doc = "Write '1' to enable interrupt for event ENDCRYPT\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 event ENDCRYPT"]
pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDCRYPT_AW, O>;
impl<'a, const O: u8> ENDCRYPT_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ENDCRYPT_AW::SET)
}
}
#[doc = "Field `ERROR` reader - Deprecated intsetfield - Write '1' to enable interrupt for event ERROR"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Deprecated intsetfield - Write '1' to enable interrupt for event ERROR\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
}
}
impl ERROR_R {
#[doc = "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
}
}
#[doc = "Deprecated intsetfield - Write '1' to enable interrupt for event ERROR\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 - Deprecated intsetfield - Write '1' to enable interrupt for event ERROR"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ERROR_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"]
#[inline(always)]
pub fn endksgen(&self) -> ENDKSGEN_R {
ENDKSGEN_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"]
#[inline(always)]
pub fn endcrypt(&self) -> ENDCRYPT_R {
ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Deprecated intsetfield - Write '1' to enable interrupt for event ERROR"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 2) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"]
#[inline(always)]
pub fn endksgen(&mut self) -> ENDKSGEN_W<0> {
ENDKSGEN_W::new(self)
}
#[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"]
#[inline(always)]
pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> {
ENDCRYPT_W::new(self)
}
#[doc = "Bit 2 - Deprecated intsetfield - Write '1' to enable interrupt for event ERROR"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<2> {
ERROR_W::new(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
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `MAXPACKETSIZE` reader"]
pub struct R(crate::R<MAXPACKETSIZE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MAXPACKETSIZE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MAXPACKETSIZE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MAXPACKETSIZE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MAXPACKETSIZE` writer"]
pub struct W(crate::W<MAXPACKETSIZE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MAXPACKETSIZE_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<MAXPACKETSIZE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MAXPACKETSIZE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAXPACKETSIZE` reader - Length of key-stream generated when MODE.LENGTH = Extended. This value must be greater or equal to the subsequent packet payload to be encrypted/decrypted."]
pub type MAXPACKETSIZE_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXPACKETSIZE` writer - Length of key-stream generated when MODE.LENGTH = Extended. This value must be greater or equal to the subsequent packet payload to be encrypted/decrypted."]
pub type MAXPACKETSIZE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, MAXPACKETSIZE_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Length of key-stream generated when MODE.LENGTH = Extended. This value must be greater or equal to the subsequent packet payload to be encrypted/decrypted."]
#[inline(always)]
pub fn maxpacketsize(&self) -> MAXPACKETSIZE_R {
MAXPACKETSIZE_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Length of key-stream generated when MODE.LENGTH = Extended. This value must be greater or equal to the subsequent packet payload to be encrypted/decrypted."]
#[inline(always)]
pub fn maxpacketsize(&mut self) -> MAXPACKETSIZE_W<0> {
MAXPACKETSIZE_W::new(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 = "Length of key-stream generated when MODE.LENGTH = Extended.\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 [maxpacketsize](index.html) module"]
pub struct MAXPACKETSIZE_SPEC;
impl crate::RegisterSpec for MAXPACKETSIZE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [maxpacketsize::R](R) reader structure"]
impl crate::Readable for MAXPACKETSIZE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [maxpacketsize::W](W) writer structure"]
impl crate::Writable for MAXPACKETSIZE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MAXPACKETSIZE to value 0xfb"]
impl crate::Resettable for MAXPACKETSIZE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xfb
}
}
+74
View File
@@ -0,0 +1,74 @@
#[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 = "Field `MICSTATUS` reader - The result of the MIC check performed during the previous decryption operation"]
pub type MICSTATUS_R = crate::BitReader<MICSTATUS_A>;
#[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"]
CHECK_FAILED = 0,
#[doc = "1: MIC check passed"]
CHECK_PASSED = 1,
}
impl From<MICSTATUS_A> for bool {
#[inline(always)]
fn from(variant: MICSTATUS_A) -> Self {
variant as u8 != 0
}
}
impl MICSTATUS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> MICSTATUS_A {
match self.bits {
false => MICSTATUS_A::CHECK_FAILED,
true => MICSTATUS_A::CHECK_PASSED,
}
}
#[doc = "Checks if the value of the field is `CHECK_FAILED`"]
#[inline(always)]
pub fn is_check_failed(&self) -> bool {
*self == MICSTATUS_A::CHECK_FAILED
}
#[doc = "Checks if the value of the field is `CHECK_PASSED`"]
#[inline(always)]
pub fn is_check_passed(&self) -> bool {
*self == MICSTATUS_A::CHECK_PASSED
}
}
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 & 1) != 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
}
}
+275
View File
@@ -0,0 +1,275 @@
#[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 = "Field `MODE` reader - The mode of operation to be used. The settings in this register apply whenever either the KSGEN or CRYPT tasks are triggered."]
pub type MODE_R = crate::BitReader<MODE_A>;
#[doc = "The mode of operation to be used. The settings in this register apply whenever either the KSGEN or CRYPT tasks are triggered.\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
}
}
impl MODE_R {
#[doc = "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
}
}
#[doc = "Field `MODE` writer - The mode of operation to be used. The settings in this register apply whenever either the KSGEN or CRYPT tasks are triggered."]
pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MODE_A, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[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 = "Field `DATARATE` reader - Radio data rate that the CCM shall run synchronous with"]
pub type DATARATE_R = crate::FieldReader<u8, DATARATE_A>;
#[doc = "Radio data rate that the CCM shall run synchronous with\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DATARATE_A {
#[doc = "0: 1 Mbps"]
_1MBIT = 0,
#[doc = "1: 2 Mbps"]
_2MBIT = 1,
#[doc = "2: 125 Kbps"]
_125KBPS = 2,
#[doc = "3: 500 Kbps"]
_500KBPS = 3,
}
impl From<DATARATE_A> for u8 {
#[inline(always)]
fn from(variant: DATARATE_A) -> Self {
variant as _
}
}
impl DATARATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DATARATE_A {
match self.bits {
0 => DATARATE_A::_1MBIT,
1 => DATARATE_A::_2MBIT,
2 => DATARATE_A::_125KBPS,
3 => DATARATE_A::_500KBPS,
_ => unreachable!(),
}
}
#[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
}
#[doc = "Checks if the value of the field is `_125KBPS`"]
#[inline(always)]
pub fn is_125kbps(&self) -> bool {
*self == DATARATE_A::_125KBPS
}
#[doc = "Checks if the value of the field is `_500KBPS`"]
#[inline(always)]
pub fn is_500kbps(&self) -> bool {
*self == DATARATE_A::_500KBPS
}
}
#[doc = "Field `DATARATE` writer - Radio data rate that the CCM shall run synchronous with"]
pub type DATARATE_W<'a, const O: u8> =
crate::FieldWriterSafe<'a, u32, MODE_SPEC, u8, DATARATE_A, 2, O>;
impl<'a, const O: u8> DATARATE_W<'a, O> {
#[doc = "1 Mbps"]
#[inline(always)]
pub fn _1mbit(self) -> &'a mut W {
self.variant(DATARATE_A::_1MBIT)
}
#[doc = "2 Mbps"]
#[inline(always)]
pub fn _2mbit(self) -> &'a mut W {
self.variant(DATARATE_A::_2MBIT)
}
#[doc = "125 Kbps"]
#[inline(always)]
pub fn _125kbps(self) -> &'a mut W {
self.variant(DATARATE_A::_125KBPS)
}
#[doc = "500 Kbps"]
#[inline(always)]
pub fn _500kbps(self) -> &'a mut W {
self.variant(DATARATE_A::_500KBPS)
}
}
#[doc = "Field `LENGTH` reader - Packet length configuration"]
pub type LENGTH_R = crate::BitReader<LENGTH_A>;
#[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 in encrypted/decrypted packet is 5 bits. A key-stream for packet payloads up to 27 bytes will be generated."]
DEFAULT = 0,
#[doc = "1: Extended length. Effective length of LENGTH field in encrypted/decrypted packet is 8 bits. A key-stream for packet payloads up to MAXPACKETSIZE bytes will be generated."]
EXTENDED = 1,
}
impl From<LENGTH_A> for bool {
#[inline(always)]
fn from(variant: LENGTH_A) -> Self {
variant as u8 != 0
}
}
impl LENGTH_R {
#[doc = "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
}
}
#[doc = "Field `LENGTH` writer - Packet length configuration"]
pub type LENGTH_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, LENGTH_A, O>;
impl<'a, const O: u8> LENGTH_W<'a, O> {
#[doc = "Default length. Effective length of LENGTH field in encrypted/decrypted packet is 5 bits. A key-stream for packet payloads up to 27 bytes will be generated."]
#[inline(always)]
pub fn default(self) -> &'a mut W {
self.variant(LENGTH_A::DEFAULT)
}
#[doc = "Extended length. Effective length of LENGTH field in encrypted/decrypted packet is 8 bits. A key-stream for packet payloads up to MAXPACKETSIZE bytes will be generated."]
#[inline(always)]
pub fn extended(self) -> &'a mut W {
self.variant(LENGTH_A::EXTENDED)
}
}
impl R {
#[doc = "Bit 0 - The mode of operation to be used. The settings in this register apply whenever either the KSGEN or CRYPT tasks are triggered."]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 1) != 0)
}
#[doc = "Bits 16:17 - Radio data rate that the CCM shall run synchronous with"]
#[inline(always)]
pub fn datarate(&self) -> DATARATE_R {
DATARATE_R::new(((self.bits >> 16) & 3) as u8)
}
#[doc = "Bit 24 - Packet length configuration"]
#[inline(always)]
pub fn length(&self) -> LENGTH_R {
LENGTH_R::new(((self.bits >> 24) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - The mode of operation to be used. The settings in this register apply whenever either the KSGEN or CRYPT tasks are triggered."]
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<0> {
MODE_W::new(self)
}
#[doc = "Bits 16:17 - Radio data rate that the CCM shall run synchronous with"]
#[inline(always)]
pub fn datarate(&mut self) -> DATARATE_W<16> {
DATARATE_W::new(self)
}
#[doc = "Bit 24 - Packet length configuration"]
#[inline(always)]
pub fn length(&mut self) -> LENGTH_W<24> {
LENGTH_W::new(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
}
}
+80
View File
@@ -0,0 +1,80 @@
#[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 type OUTPTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OUTPTR` writer - Output pointer"]
pub type OUTPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OUTPTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Output pointer"]
#[inline(always)]
pub fn outptr(&self) -> OUTPTR_R {
OUTPTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Output pointer"]
#[inline(always)]
pub fn outptr(&mut self) -> OUTPTR_W<0> {
OUTPTR_W::new(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
}
}
+155
View File
@@ -0,0 +1,155 @@
#[doc = "Register `RATEOVERRIDE` reader"]
pub struct R(crate::R<RATEOVERRIDE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RATEOVERRIDE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RATEOVERRIDE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RATEOVERRIDE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RATEOVERRIDE` writer"]
pub struct W(crate::W<RATEOVERRIDE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RATEOVERRIDE_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<RATEOVERRIDE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RATEOVERRIDE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RATEOVERRIDE` reader - Data rate override setting."]
pub type RATEOVERRIDE_R = crate::FieldReader<u8, RATEOVERRIDE_A>;
#[doc = "Data rate override setting.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum RATEOVERRIDE_A {
#[doc = "0: 1 Mbps"]
_1MBIT = 0,
#[doc = "1: 2 Mbps"]
_2MBIT = 1,
#[doc = "2: 125 Kbps"]
_125KBPS = 2,
#[doc = "3: 500 Kbps"]
_500KBPS = 3,
}
impl From<RATEOVERRIDE_A> for u8 {
#[inline(always)]
fn from(variant: RATEOVERRIDE_A) -> Self {
variant as _
}
}
impl RATEOVERRIDE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RATEOVERRIDE_A {
match self.bits {
0 => RATEOVERRIDE_A::_1MBIT,
1 => RATEOVERRIDE_A::_2MBIT,
2 => RATEOVERRIDE_A::_125KBPS,
3 => RATEOVERRIDE_A::_500KBPS,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_1MBIT`"]
#[inline(always)]
pub fn is_1mbit(&self) -> bool {
*self == RATEOVERRIDE_A::_1MBIT
}
#[doc = "Checks if the value of the field is `_2MBIT`"]
#[inline(always)]
pub fn is_2mbit(&self) -> bool {
*self == RATEOVERRIDE_A::_2MBIT
}
#[doc = "Checks if the value of the field is `_125KBPS`"]
#[inline(always)]
pub fn is_125kbps(&self) -> bool {
*self == RATEOVERRIDE_A::_125KBPS
}
#[doc = "Checks if the value of the field is `_500KBPS`"]
#[inline(always)]
pub fn is_500kbps(&self) -> bool {
*self == RATEOVERRIDE_A::_500KBPS
}
}
#[doc = "Field `RATEOVERRIDE` writer - Data rate override setting."]
pub type RATEOVERRIDE_W<'a, const O: u8> =
crate::FieldWriterSafe<'a, u32, RATEOVERRIDE_SPEC, u8, RATEOVERRIDE_A, 2, O>;
impl<'a, const O: u8> RATEOVERRIDE_W<'a, O> {
#[doc = "1 Mbps"]
#[inline(always)]
pub fn _1mbit(self) -> &'a mut W {
self.variant(RATEOVERRIDE_A::_1MBIT)
}
#[doc = "2 Mbps"]
#[inline(always)]
pub fn _2mbit(self) -> &'a mut W {
self.variant(RATEOVERRIDE_A::_2MBIT)
}
#[doc = "125 Kbps"]
#[inline(always)]
pub fn _125kbps(self) -> &'a mut W {
self.variant(RATEOVERRIDE_A::_125KBPS)
}
#[doc = "500 Kbps"]
#[inline(always)]
pub fn _500kbps(self) -> &'a mut W {
self.variant(RATEOVERRIDE_A::_500KBPS)
}
}
impl R {
#[doc = "Bits 0:1 - Data rate override setting."]
#[inline(always)]
pub fn rateoverride(&self) -> RATEOVERRIDE_R {
RATEOVERRIDE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Data rate override setting."]
#[inline(always)]
pub fn rateoverride(&mut self) -> RATEOVERRIDE_W<0> {
RATEOVERRIDE_W::new(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 = "Data rate override setting.\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 [rateoverride](index.html) module"]
pub struct RATEOVERRIDE_SPEC;
impl crate::RegisterSpec for RATEOVERRIDE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rateoverride::R](R) reader structure"]
impl crate::Readable for RATEOVERRIDE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rateoverride::W](W) writer structure"]
impl crate::Writable for RATEOVERRIDE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RATEOVERRIDE to value 0"]
impl crate::Resettable for RATEOVERRIDE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[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 type SCRATCHPTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."]
pub type SCRATCHPTR_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SCRATCHPTR_SPEC, u32, u32, 32, O>;
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)
}
}
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<0> {
SCRATCHPTR_W::new(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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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 = "Field `ENDKSGEN_CRYPT` reader - Shortcut between event ENDKSGEN and task CRYPT"]
pub type ENDKSGEN_CRYPT_R = crate::BitReader<ENDKSGEN_CRYPT_A>;
#[doc = "Shortcut between event ENDKSGEN and task CRYPT\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
}
}
impl ENDKSGEN_CRYPT_R {
#[doc = "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
}
}
#[doc = "Field `ENDKSGEN_CRYPT` writer - Shortcut between event ENDKSGEN and task CRYPT"]
pub type ENDKSGEN_CRYPT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, ENDKSGEN_CRYPT_A, O>;
impl<'a, const O: u8> ENDKSGEN_CRYPT_W<'a, O> {
#[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)
}
}
impl R {
#[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"]
#[inline(always)]
pub fn endksgen_crypt(&self) -> ENDKSGEN_CRYPT_R {
ENDKSGEN_CRYPT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"]
#[inline(always)]
pub fn endksgen_crypt(&mut self) -> ENDKSGEN_CRYPT_W<0> {
ENDKSGEN_CRYPT_W::new(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 = "Shortcuts between local events and tasks\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
}
}
+72
View File
@@ -0,0 +1,72 @@
#[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)
}
}
#[doc = "Start encryption/decryption. This operation will stop by itself when completed.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_CRYPT_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_CRYPT_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_CRYPT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_CRYPT` writer - Start encryption/decryption. This operation will stop by itself when completed."]
pub type TASKS_CRYPT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_CRYPT_SPEC, TASKS_CRYPT_AW, O>;
impl<'a, const O: u8> TASKS_CRYPT_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_CRYPT_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Start encryption/decryption. This operation will stop by itself when completed."]
#[inline(always)]
pub fn tasks_crypt(&mut self) -> TASKS_CRYPT_W<0> {
TASKS_CRYPT_W::new(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 = "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
}
}
+72
View File
@@ -0,0 +1,72 @@
#[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)
}
}
#[doc = "Start generation of key-stream. This operation will stop by itself when completed.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_KSGEN_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_KSGEN_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_KSGEN_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_KSGEN` writer - Start generation of key-stream. This operation will stop by itself when completed."]
pub type TASKS_KSGEN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_KSGEN_SPEC, TASKS_KSGEN_AW, O>;
impl<'a, const O: u8> TASKS_KSGEN_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_KSGEN_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Start generation of key-stream. This operation will stop by itself when completed."]
#[inline(always)]
pub fn tasks_ksgen(&mut self) -> TASKS_KSGEN_W<0> {
TASKS_KSGEN_W::new(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 = "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
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_RATEOVERRIDE` writer"]
pub struct W(crate::W<TASKS_RATEOVERRIDE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RATEOVERRIDE_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_RATEOVERRIDE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RATEOVERRIDE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Override DATARATE setting in MODE register with the contents of the RATEOVERRIDE register for any ongoing encryption/decryption\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_RATEOVERRIDE_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_RATEOVERRIDE_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_RATEOVERRIDE_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_RATEOVERRIDE` writer - Override DATARATE setting in MODE register with the contents of the RATEOVERRIDE register for any ongoing encryption/decryption"]
pub type TASKS_RATEOVERRIDE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_RATEOVERRIDE_SPEC, TASKS_RATEOVERRIDE_AW, O>;
impl<'a, const O: u8> TASKS_RATEOVERRIDE_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_RATEOVERRIDE_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Override DATARATE setting in MODE register with the contents of the RATEOVERRIDE register for any ongoing encryption/decryption"]
#[inline(always)]
pub fn tasks_rateoverride(&mut self) -> TASKS_RATEOVERRIDE_W<0> {
TASKS_RATEOVERRIDE_W::new(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 = "Override DATARATE setting in MODE register with the contents of the RATEOVERRIDE register for any ongoing 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_rateoverride](index.html) module"]
pub struct TASKS_RATEOVERRIDE_SPEC;
impl crate::RegisterSpec for TASKS_RATEOVERRIDE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rateoverride::W](W) writer structure"]
impl crate::Writable for TASKS_RATEOVERRIDE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RATEOVERRIDE to value 0"]
impl crate::Resettable for TASKS_RATEOVERRIDE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[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)
}
}
#[doc = "Stop encryption/decryption\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_STOP_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_STOP_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_STOP_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_STOP` writer - Stop encryption/decryption"]
pub type TASKS_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>;
impl<'a, const O: u8> TASKS_STOP_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_STOP_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Stop encryption/decryption"]
#[inline(always)]
pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> {
TASKS_STOP_W::new(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 = "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
}
}