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:
17624 files changed
+4564928
-38
No files matched your search
+81
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `ADDRESS[%s]` reader"]
|
||||
pub struct R(crate::R<ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDRESS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDRESS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDRESS[%s]` writer"]
|
||||
pub struct W(crate::W<ADDRESS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDRESS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<ADDRESS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDRESS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESS` reader - TWI slave address"]
|
||||
pub type ADDRESS_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `ADDRESS` writer - TWI slave address"]
|
||||
pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:6 - TWI slave address"]
|
||||
#[inline(always)]
|
||||
pub fn address(&self) -> ADDRESS_R {
|
||||
ADDRESS_R::new((self.bits & 0x7f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:6 - TWI slave address"]
|
||||
#[inline(always)]
|
||||
pub fn address(&mut self) -> ADDRESS_W<0> {
|
||||
ADDRESS_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 = "Description collection: TWI slave address n\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [address](index.html) module"]
|
||||
pub struct ADDRESS_SPEC;
|
||||
impl crate::RegisterSpec for ADDRESS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [address::R](R) reader structure"]
|
||||
impl crate::Readable for ADDRESS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"]
|
||||
impl crate::Writable for ADDRESS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDRESS[%s]
|
||||
to value 0"]
|
||||
impl crate::Resettable for ADDRESS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
#[doc = "Register `CONFIG` reader"]
|
||||
pub struct R(crate::R<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONFIG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CONFIG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONFIG` writer"]
|
||||
pub struct W(crate::W<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONFIG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<CONFIG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESS0` reader - Enable or disable address matching on ADDRESS\\[0\\]"]
|
||||
pub type ADDRESS0_R = crate::BitReader<ADDRESS0_A>;
|
||||
#[doc = "Enable or disable address matching on ADDRESS\\[0\\]\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADDRESS0_A {
|
||||
#[doc = "0: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ADDRESS0_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ADDRESS0_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl ADDRESS0_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ADDRESS0_A {
|
||||
match self.bits {
|
||||
false => ADDRESS0_A::DISABLED,
|
||||
true => ADDRESS0_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == ADDRESS0_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == ADDRESS0_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESS0` writer - Enable or disable address matching on ADDRESS\\[0\\]"]
|
||||
pub type ADDRESS0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS0_A, O>;
|
||||
impl<'a, const O: u8> ADDRESS0_W<'a, O> {
|
||||
#[doc = "Disabled"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ADDRESS0_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ADDRESS0_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESS1` reader - Enable or disable address matching on ADDRESS\\[1\\]"]
|
||||
pub type ADDRESS1_R = crate::BitReader<ADDRESS1_A>;
|
||||
#[doc = "Enable or disable address matching on ADDRESS\\[1\\]\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ADDRESS1_A {
|
||||
#[doc = "0: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<ADDRESS1_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ADDRESS1_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl ADDRESS1_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> ADDRESS1_A {
|
||||
match self.bits {
|
||||
false => ADDRESS1_A::DISABLED,
|
||||
true => ADDRESS1_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == ADDRESS1_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == ADDRESS1_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ADDRESS1` writer - Enable or disable address matching on ADDRESS\\[1\\]"]
|
||||
pub type ADDRESS1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS1_A, O>;
|
||||
impl<'a, const O: u8> ADDRESS1_W<'a, O> {
|
||||
#[doc = "Disabled"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ADDRESS1_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enabled"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ADDRESS1_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn address0(&self) -> ADDRESS0_R {
|
||||
ADDRESS0_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"]
|
||||
#[inline(always)]
|
||||
pub fn address1(&self) -> ADDRESS1_R {
|
||||
ADDRESS1_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"]
|
||||
#[inline(always)]
|
||||
pub fn address0(&mut self) -> ADDRESS0_W<0> {
|
||||
ADDRESS0_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"]
|
||||
#[inline(always)]
|
||||
pub fn address1(&mut self) -> ADDRESS1_W<1> {
|
||||
ADDRESS1_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 = "Configuration register for the address match 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 [config](index.html) module"]
|
||||
pub struct CONFIG_SPEC;
|
||||
impl crate::RegisterSpec for CONFIG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [config::R](R) reader structure"]
|
||||
impl crate::Readable for CONFIG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
|
||||
impl crate::Writable for CONFIG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONFIG to value 0x01"]
|
||||
impl crate::Resettable for CONFIG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
+128
@@ -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 TWIS"]
|
||||
pub type ENABLE_R = crate::FieldReader<u8, ENABLE_A>;
|
||||
#[doc = "Enable or disable TWIS\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum ENABLE_A {
|
||||
#[doc = "0: Disable TWIS"]
|
||||
DISABLED = 0,
|
||||
#[doc = "9: Enable TWIS"]
|
||||
ENABLED = 9,
|
||||
}
|
||||
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),
|
||||
9 => 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 TWIS"]
|
||||
pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>;
|
||||
impl<'a, const O: u8> ENABLE_W<'a, O> {
|
||||
#[doc = "Disable TWIS"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable TWIS"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Enable or disable TWIS"]
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) -> ENABLE_R {
|
||||
ENABLE_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Enable or disable TWIS"]
|
||||
#[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 TWIS\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
|
||||
}
|
||||
}
|
||||
+246
@@ -0,0 +1,246 @@
|
||||
#[doc = "Register `ERRORSRC` reader"]
|
||||
pub struct R(crate::R<ERRORSRC_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ERRORSRC_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ERRORSRC_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ERRORSRC_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ERRORSRC` writer"]
|
||||
pub struct W(crate::W<ERRORSRC_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERRORSRC_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<ERRORSRC_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERRORSRC_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OVERFLOW` reader - RX buffer overflow detected, and prevented"]
|
||||
pub type OVERFLOW_R = crate::BitReader<OVERFLOW_A>;
|
||||
#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum OVERFLOW_A {
|
||||
#[doc = "0: Error did not occur"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Error occurred"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<OVERFLOW_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: OVERFLOW_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl OVERFLOW_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> OVERFLOW_A {
|
||||
match self.bits {
|
||||
false => OVERFLOW_A::NOT_DETECTED,
|
||||
true => OVERFLOW_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == OVERFLOW_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == OVERFLOW_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OVERFLOW` writer - RX buffer overflow detected, and prevented"]
|
||||
pub type OVERFLOW_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERFLOW_A, O>;
|
||||
impl<'a, const O: u8> OVERFLOW_W<'a, O> {
|
||||
#[doc = "Error did not occur"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(OVERFLOW_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Error occurred"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(OVERFLOW_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DNACK` reader - NACK sent after receiving a data byte"]
|
||||
pub type DNACK_R = crate::BitReader<DNACK_A>;
|
||||
#[doc = "NACK sent after receiving a data byte\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DNACK_A {
|
||||
#[doc = "0: Error did not occur"]
|
||||
NOT_RECEIVED = 0,
|
||||
#[doc = "1: Error occurred"]
|
||||
RECEIVED = 1,
|
||||
}
|
||||
impl From<DNACK_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DNACK_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DNACK_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DNACK_A {
|
||||
match self.bits {
|
||||
false => DNACK_A::NOT_RECEIVED,
|
||||
true => DNACK_A::RECEIVED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_RECEIVED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_received(&self) -> bool {
|
||||
*self == DNACK_A::NOT_RECEIVED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `RECEIVED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_received(&self) -> bool {
|
||||
*self == DNACK_A::RECEIVED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DNACK` writer - NACK sent after receiving a data byte"]
|
||||
pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_A, O>;
|
||||
impl<'a, const O: u8> DNACK_W<'a, O> {
|
||||
#[doc = "Error did not occur"]
|
||||
#[inline(always)]
|
||||
pub fn not_received(self) -> &'a mut W {
|
||||
self.variant(DNACK_A::NOT_RECEIVED)
|
||||
}
|
||||
#[doc = "Error occurred"]
|
||||
#[inline(always)]
|
||||
pub fn received(self) -> &'a mut W {
|
||||
self.variant(DNACK_A::RECEIVED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OVERREAD` reader - TX buffer over-read detected, and prevented"]
|
||||
pub type OVERREAD_R = crate::BitReader<OVERREAD_A>;
|
||||
#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum OVERREAD_A {
|
||||
#[doc = "0: Error did not occur"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Error occurred"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<OVERREAD_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: OVERREAD_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl OVERREAD_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> OVERREAD_A {
|
||||
match self.bits {
|
||||
false => OVERREAD_A::NOT_DETECTED,
|
||||
true => OVERREAD_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == OVERREAD_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == OVERREAD_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OVERREAD` writer - TX buffer over-read detected, and prevented"]
|
||||
pub type OVERREAD_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERREAD_A, O>;
|
||||
impl<'a, const O: u8> OVERREAD_W<'a, O> {
|
||||
#[doc = "Error did not occur"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(OVERREAD_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Error occurred"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(OVERREAD_A::DETECTED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RX buffer overflow detected, and prevented"]
|
||||
#[inline(always)]
|
||||
pub fn overflow(&self) -> OVERFLOW_R {
|
||||
OVERFLOW_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - NACK sent after receiving a data byte"]
|
||||
#[inline(always)]
|
||||
pub fn dnack(&self) -> DNACK_R {
|
||||
DNACK_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - TX buffer over-read detected, and prevented"]
|
||||
#[inline(always)]
|
||||
pub fn overread(&self) -> OVERREAD_R {
|
||||
OVERREAD_R::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - RX buffer overflow detected, and prevented"]
|
||||
#[inline(always)]
|
||||
pub fn overflow(&mut self) -> OVERFLOW_W<0> {
|
||||
OVERFLOW_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 2 - NACK sent after receiving a data byte"]
|
||||
#[inline(always)]
|
||||
pub fn dnack(&mut self) -> DNACK_W<2> {
|
||||
DNACK_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 3 - TX buffer over-read detected, and prevented"]
|
||||
#[inline(always)]
|
||||
pub fn overread(&mut self) -> OVERREAD_W<3> {
|
||||
OVERREAD_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 = "Error source\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 [errorsrc](index.html) module"]
|
||||
pub struct ERRORSRC_SPEC;
|
||||
impl crate::RegisterSpec for ERRORSRC_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [errorsrc::R](R) reader structure"]
|
||||
impl crate::Readable for ERRORSRC_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"]
|
||||
impl crate::Writable for ERRORSRC_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERRORSRC to value 0"]
|
||||
impl crate::Resettable for ERRORSRC_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+127
@@ -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 - TWI error"]
|
||||
pub type EVENTS_ERROR_R = crate::BitReader<EVENTS_ERROR_A>;
|
||||
#[doc = "TWI error\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 - TWI error"]
|
||||
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 - TWI error"]
|
||||
#[inline(always)]
|
||||
pub fn events_error(&self) -> EVENTS_ERROR_R {
|
||||
EVENTS_ERROR_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - TWI error"]
|
||||
#[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 = "TWI error\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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_READ` reader"]
|
||||
pub struct R(crate::R<EVENTS_READ_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_READ_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_READ_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_READ_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_READ` writer"]
|
||||
pub struct W(crate::W<EVENTS_READ_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_READ_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_READ_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_READ_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_READ` reader - Read command received"]
|
||||
pub type EVENTS_READ_R = crate::BitReader<EVENTS_READ_A>;
|
||||
#[doc = "Read command received\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_READ_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_READ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_READ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_READ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_READ_A {
|
||||
match self.bits {
|
||||
false => EVENTS_READ_A::NOT_GENERATED,
|
||||
true => EVENTS_READ_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_READ_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_READ_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_READ` writer - Read command received"]
|
||||
pub type EVENTS_READ_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_READ_SPEC, EVENTS_READ_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_READ_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_READ_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_READ_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Read command received"]
|
||||
#[inline(always)]
|
||||
pub fn events_read(&self) -> EVENTS_READ_R {
|
||||
EVENTS_READ_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Read command received"]
|
||||
#[inline(always)]
|
||||
pub fn events_read(&mut self) -> EVENTS_READ_W<0> {
|
||||
EVENTS_READ_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 = "Read command received\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_read](index.html) module"]
|
||||
pub struct EVENTS_READ_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_READ_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_read::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_READ_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_read::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_READ_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_READ to value 0"]
|
||||
impl crate::Resettable for EVENTS_READ_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_RXSTARTED` reader"]
|
||||
pub struct R(crate::R<EVENTS_RXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_RXSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_RXSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_RXSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_RXSTARTED` writer"]
|
||||
pub struct W(crate::W<EVENTS_RXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_RXSTARTED_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_RXSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_RXSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXSTARTED` reader - Receive sequence started"]
|
||||
pub type EVENTS_RXSTARTED_R = crate::BitReader<EVENTS_RXSTARTED_A>;
|
||||
#[doc = "Receive sequence started\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_RXSTARTED_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_RXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_RXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_RXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_RXSTARTED_A {
|
||||
match self.bits {
|
||||
false => EVENTS_RXSTARTED_A::NOT_GENERATED,
|
||||
true => EVENTS_RXSTARTED_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_RXSTARTED_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_RXSTARTED_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXSTARTED` writer - Receive sequence started"]
|
||||
pub type EVENTS_RXSTARTED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXSTARTED_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Receive sequence started"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R {
|
||||
EVENTS_RXSTARTED_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Receive sequence started"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> {
|
||||
EVENTS_RXSTARTED_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 = "Receive sequence 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_rxstarted](index.html) module"]
|
||||
pub struct EVENTS_RXSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_RXSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_RXSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"]
|
||||
impl crate::Resettable for EVENTS_RXSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_STOPPED` reader"]
|
||||
pub struct R(crate::R<EVENTS_STOPPED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_STOPPED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_STOPPED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_STOPPED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_STOPPED` writer"]
|
||||
pub struct W(crate::W<EVENTS_STOPPED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_STOPPED_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_STOPPED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_STOPPED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_STOPPED` reader - TWI stopped"]
|
||||
pub type EVENTS_STOPPED_R = crate::BitReader<EVENTS_STOPPED_A>;
|
||||
#[doc = "TWI stopped\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_STOPPED_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_STOPPED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_STOPPED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_STOPPED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_STOPPED_A {
|
||||
match self.bits {
|
||||
false => EVENTS_STOPPED_A::NOT_GENERATED,
|
||||
true => EVENTS_STOPPED_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_STOPPED_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_STOPPED_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"]
|
||||
pub type EVENTS_STOPPED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_STOPPED_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_STOPPED_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - TWI stopped"]
|
||||
#[inline(always)]
|
||||
pub fn events_stopped(&self) -> EVENTS_STOPPED_R {
|
||||
EVENTS_STOPPED_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - TWI stopped"]
|
||||
#[inline(always)]
|
||||
pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> {
|
||||
EVENTS_STOPPED_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 = "TWI stopped\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_stopped](index.html) module"]
|
||||
pub struct EVENTS_STOPPED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_STOPPED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_stopped::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_STOPPED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_STOPPED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"]
|
||||
impl crate::Resettable for EVENTS_STOPPED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_TXSTARTED` reader"]
|
||||
pub struct R(crate::R<EVENTS_TXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_TXSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_TXSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_TXSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_TXSTARTED` writer"]
|
||||
pub struct W(crate::W<EVENTS_TXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_TXSTARTED_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_TXSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_TXSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_TXSTARTED` reader - Transmit sequence started"]
|
||||
pub type EVENTS_TXSTARTED_R = crate::BitReader<EVENTS_TXSTARTED_A>;
|
||||
#[doc = "Transmit sequence started\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_TXSTARTED_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_TXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_TXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_TXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_TXSTARTED_A {
|
||||
match self.bits {
|
||||
false => EVENTS_TXSTARTED_A::NOT_GENERATED,
|
||||
true => EVENTS_TXSTARTED_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_TXSTARTED_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_TXSTARTED_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_TXSTARTED` writer - Transmit sequence started"]
|
||||
pub type EVENTS_TXSTARTED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_TXSTARTED_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Transmit sequence started"]
|
||||
#[inline(always)]
|
||||
pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R {
|
||||
EVENTS_TXSTARTED_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Transmit sequence started"]
|
||||
#[inline(always)]
|
||||
pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> {
|
||||
EVENTS_TXSTARTED_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 = "Transmit sequence 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_txstarted](index.html) module"]
|
||||
pub struct EVENTS_TXSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_TXSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_TXSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"]
|
||||
impl crate::Resettable for EVENTS_TXSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_WRITE` reader"]
|
||||
pub struct R(crate::R<EVENTS_WRITE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_WRITE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_WRITE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_WRITE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_WRITE` writer"]
|
||||
pub struct W(crate::W<EVENTS_WRITE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_WRITE_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_WRITE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_WRITE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_WRITE` reader - Write command received"]
|
||||
pub type EVENTS_WRITE_R = crate::BitReader<EVENTS_WRITE_A>;
|
||||
#[doc = "Write command received\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_WRITE_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_WRITE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_WRITE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_WRITE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_WRITE_A {
|
||||
match self.bits {
|
||||
false => EVENTS_WRITE_A::NOT_GENERATED,
|
||||
true => EVENTS_WRITE_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_WRITE_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_WRITE_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_WRITE` writer - Write command received"]
|
||||
pub type EVENTS_WRITE_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_WRITE_SPEC, EVENTS_WRITE_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_WRITE_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_WRITE_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_WRITE_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write command received"]
|
||||
#[inline(always)]
|
||||
pub fn events_write(&self) -> EVENTS_WRITE_R {
|
||||
EVENTS_WRITE_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write command received"]
|
||||
#[inline(always)]
|
||||
pub fn events_write(&mut self) -> EVENTS_WRITE_W<0> {
|
||||
EVENTS_WRITE_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 = "Write command received\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_write](index.html) module"]
|
||||
pub struct EVENTS_WRITE_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_WRITE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_write::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_WRITE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_write::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_WRITE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_WRITE to value 0"]
|
||||
impl crate::Resettable for EVENTS_WRITE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
#[doc = "Register `INTEN` reader"]
|
||||
pub struct R(crate::R<INTEN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<INTEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<INTEN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<INTEN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `INTEN` writer"]
|
||||
pub struct W(crate::W<INTEN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<INTEN_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<INTEN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<INTEN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"]
|
||||
pub type STOPPED_R = crate::BitReader<STOPPED_A>;
|
||||
#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOPPED_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<STOPPED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOPPED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl STOPPED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STOPPED_A {
|
||||
match self.bits {
|
||||
false => STOPPED_A::DISABLED,
|
||||
true => STOPPED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == STOPPED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == STOPPED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"]
|
||||
pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>;
|
||||
impl<'a, const O: u8> STOPPED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(STOPPED_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(STOPPED_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"]
|
||||
pub type ERROR_R = crate::BitReader<ERROR_A>;
|
||||
#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERROR_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
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 = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"]
|
||||
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>;
|
||||
impl<'a, const O: u8> ERROR_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ERROR_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ERROR_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
|
||||
#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RXSTARTED_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<RXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RXSTARTED_A {
|
||||
match self.bits {
|
||||
false => RXSTARTED_A::DISABLED,
|
||||
true => RXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>;
|
||||
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(RXSTARTED_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(RXSTARTED_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
|
||||
#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TXSTARTED_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<TXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl TXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> TXSTARTED_A {
|
||||
match self.bits {
|
||||
false => TXSTARTED_A::DISABLED,
|
||||
true => TXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>;
|
||||
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(TXSTARTED_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(TXSTARTED_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` reader - Enable or disable interrupt for event WRITE"]
|
||||
pub type WRITE_R = crate::BitReader<WRITE_A>;
|
||||
#[doc = "Enable or disable interrupt for event WRITE\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<WRITE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl WRITE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> WRITE_A {
|
||||
match self.bits {
|
||||
false => WRITE_A::DISABLED,
|
||||
true => WRITE_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == WRITE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == WRITE_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` writer - Enable or disable interrupt for event WRITE"]
|
||||
pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, WRITE_A, O>;
|
||||
impl<'a, const O: u8> WRITE_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(WRITE_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(WRITE_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` reader - Enable or disable interrupt for event READ"]
|
||||
pub type READ_R = crate::BitReader<READ_A>;
|
||||
#[doc = "Enable or disable interrupt for event READ\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<READ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READ_A {
|
||||
match self.bits {
|
||||
false => READ_A::DISABLED,
|
||||
true => READ_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == READ_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == READ_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` writer - Enable or disable interrupt for event READ"]
|
||||
pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READ_A, O>;
|
||||
impl<'a, const O: u8> READ_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(READ_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(READ_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&self) -> STOPPED_R {
|
||||
STOPPED_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Enable or disable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&self) -> ERROR_R {
|
||||
ERROR_R::new(((self.bits >> 9) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&self) -> RXSTARTED_R {
|
||||
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&self) -> TXSTARTED_R {
|
||||
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 25 - Enable or disable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&self) -> WRITE_R {
|
||||
WRITE_R::new(((self.bits >> 25) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 26 - Enable or disable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&self) -> READ_R {
|
||||
READ_R::new(((self.bits >> 26) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&mut self) -> STOPPED_W<1> {
|
||||
STOPPED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Enable or disable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W<9> {
|
||||
ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
|
||||
RXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
|
||||
TXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 25 - Enable or disable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&mut self) -> WRITE_W<25> {
|
||||
WRITE_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 26 - Enable or disable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&mut self) -> READ_W<26> {
|
||||
READ_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 or 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 [inten](index.html) module"]
|
||||
pub struct INTEN_SPEC;
|
||||
impl crate::RegisterSpec for INTEN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [inten::R](R) reader structure"]
|
||||
impl crate::Readable for INTEN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
|
||||
impl crate::Writable for INTEN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets INTEN to value 0"]
|
||||
impl crate::Resettable for INTEN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+468
@@ -0,0 +1,468 @@
|
||||
#[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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"]
|
||||
pub type STOPPED_R = crate::BitReader<STOPPED_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOPPED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<STOPPED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOPPED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl STOPPED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STOPPED_A {
|
||||
match self.bits {
|
||||
false => STOPPED_A::DISABLED,
|
||||
true => STOPPED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == STOPPED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == STOPPED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOPPED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<STOPPED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOPPED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"]
|
||||
pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>;
|
||||
impl<'a, const O: u8> STOPPED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(STOPPED_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"]
|
||||
pub type ERROR_R = crate::BitReader<ERROR_A>;
|
||||
#[doc = "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 = "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 - 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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RXSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<RXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RXSTARTED_A {
|
||||
match self.bits {
|
||||
false => RXSTARTED_A::DISABLED,
|
||||
true => RXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RXSTARTED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<RXSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RXSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>;
|
||||
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(RXSTARTED_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TXSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<TXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl TXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> TXSTARTED_A {
|
||||
match self.bits {
|
||||
false => TXSTARTED_A::DISABLED,
|
||||
true => TXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TXSTARTED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<TXSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TXSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>;
|
||||
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(TXSTARTED_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` reader - Write '1' to disable interrupt for event WRITE"]
|
||||
pub type WRITE_R = crate::BitReader<WRITE_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<WRITE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl WRITE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> WRITE_A {
|
||||
match self.bits {
|
||||
false => WRITE_A::DISABLED,
|
||||
true => WRITE_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == WRITE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == WRITE_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<WRITE_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` writer - Write '1' to disable interrupt for event WRITE"]
|
||||
pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, WRITE_AW, O>;
|
||||
impl<'a, const O: u8> WRITE_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(WRITE_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` reader - Write '1' to disable interrupt for event READ"]
|
||||
pub type READ_R = crate::BitReader<READ_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<READ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READ_A {
|
||||
match self.bits {
|
||||
false => READ_A::DISABLED,
|
||||
true => READ_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == READ_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == READ_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<READ_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` writer - Write '1' to disable interrupt for event READ"]
|
||||
pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READ_AW, O>;
|
||||
impl<'a, const O: u8> READ_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(READ_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&self) -> STOPPED_R {
|
||||
STOPPED_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&self) -> ERROR_R {
|
||||
ERROR_R::new(((self.bits >> 9) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&self) -> RXSTARTED_R {
|
||||
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&self) -> TXSTARTED_R {
|
||||
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&self) -> WRITE_R {
|
||||
WRITE_R::new(((self.bits >> 25) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 26 - Write '1' to disable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&self) -> READ_R {
|
||||
READ_R::new(((self.bits >> 26) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&mut self) -> STOPPED_W<1> {
|
||||
STOPPED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W<9> {
|
||||
ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
|
||||
RXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
|
||||
TXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&mut self) -> WRITE_W<25> {
|
||||
WRITE_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 26 - Write '1' to disable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&mut self) -> READ_W<26> {
|
||||
READ_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
|
||||
}
|
||||
}
|
||||
+468
@@ -0,0 +1,468 @@
|
||||
#[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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"]
|
||||
pub type STOPPED_R = crate::BitReader<STOPPED_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOPPED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<STOPPED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOPPED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl STOPPED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STOPPED_A {
|
||||
match self.bits {
|
||||
false => STOPPED_A::DISABLED,
|
||||
true => STOPPED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == STOPPED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == STOPPED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOPPED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<STOPPED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOPPED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"]
|
||||
pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>;
|
||||
impl<'a, const O: u8> STOPPED_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(STOPPED_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"]
|
||||
pub type ERROR_R = crate::BitReader<ERROR_A>;
|
||||
#[doc = "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 = "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 - 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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RXSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<RXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RXSTARTED_A {
|
||||
match self.bits {
|
||||
false => RXSTARTED_A::DISABLED,
|
||||
true => RXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == RXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RXSTARTED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<RXSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RXSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"]
|
||||
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>;
|
||||
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(RXSTARTED_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TXSTARTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<TXSTARTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TXSTARTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl TXSTARTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> TXSTARTED_A {
|
||||
match self.bits {
|
||||
false => TXSTARTED_A::DISABLED,
|
||||
true => TXSTARTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == TXSTARTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TXSTARTED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<TXSTARTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TXSTARTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"]
|
||||
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>;
|
||||
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(TXSTARTED_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` reader - Write '1' to enable interrupt for event WRITE"]
|
||||
pub type WRITE_R = crate::BitReader<WRITE_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<WRITE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl WRITE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> WRITE_A {
|
||||
match self.bits {
|
||||
false => WRITE_A::DISABLED,
|
||||
true => WRITE_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == WRITE_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == WRITE_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<WRITE_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE` writer - Write '1' to enable interrupt for event WRITE"]
|
||||
pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, WRITE_AW, O>;
|
||||
impl<'a, const O: u8> WRITE_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(WRITE_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` reader - Write '1' to enable interrupt for event READ"]
|
||||
pub type READ_R = crate::BitReader<READ_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<READ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READ_A {
|
||||
match self.bits {
|
||||
false => READ_A::DISABLED,
|
||||
true => READ_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == READ_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == READ_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<READ_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ` writer - Write '1' to enable interrupt for event READ"]
|
||||
pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READ_AW, O>;
|
||||
impl<'a, const O: u8> READ_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(READ_AW::SET)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&self) -> STOPPED_R {
|
||||
STOPPED_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&self) -> ERROR_R {
|
||||
ERROR_R::new(((self.bits >> 9) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&self) -> RXSTARTED_R {
|
||||
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&self) -> TXSTARTED_R {
|
||||
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&self) -> WRITE_R {
|
||||
WRITE_R::new(((self.bits >> 25) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 26 - Write '1' to enable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&self) -> READ_R {
|
||||
READ_R::new(((self.bits >> 26) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"]
|
||||
#[inline(always)]
|
||||
pub fn stopped(&mut self) -> STOPPED_W<1> {
|
||||
STOPPED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W<9> {
|
||||
ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
|
||||
RXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"]
|
||||
#[inline(always)]
|
||||
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
|
||||
TXSTARTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"]
|
||||
#[inline(always)]
|
||||
pub fn write(&mut self) -> WRITE_W<25> {
|
||||
WRITE_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 26 - Write '1' to enable interrupt for event READ"]
|
||||
#[inline(always)]
|
||||
pub fn read(&mut self) -> READ_W<26> {
|
||||
READ_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
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `MATCH` reader"]
|
||||
pub struct R(crate::R<MATCH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MATCH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MATCH_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MATCH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MATCH` reader - Which of the addresses in {ADDRESS} matched the incoming address"]
|
||||
pub type MATCH_R = crate::BitReader<bool>;
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Which of the addresses in {ADDRESS} matched the incoming address"]
|
||||
#[inline(always)]
|
||||
pub fn match_(&self) -> MATCH_R {
|
||||
MATCH_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Status register indicating which address had a match\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 [match_](index.html) module"]
|
||||
pub struct MATCH_SPEC;
|
||||
impl crate::RegisterSpec for MATCH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [match_::R](R) reader structure"]
|
||||
impl crate::Readable for MATCH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets MATCH to value 0"]
|
||||
impl crate::Resettable for MATCH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `ORC` reader"]
|
||||
pub struct R(crate::R<ORC_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ORC_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ORC_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ORC_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ORC` writer"]
|
||||
pub struct W(crate::W<ORC_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ORC_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<ORC_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ORC_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ORC` reader - Over-read character. Character sent out in case of an over-read of the transmit buffer."]
|
||||
pub type ORC_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `ORC` writer - Over-read character. Character sent out in case of an over-read of the transmit buffer."]
|
||||
pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."]
|
||||
#[inline(always)]
|
||||
pub fn orc(&self) -> ORC_R {
|
||||
ORC_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."]
|
||||
#[inline(always)]
|
||||
pub fn orc(&mut self) -> ORC_W<0> {
|
||||
ORC_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 = "Over-read character. Character sent out in case of an over-read of the transmit buffer.\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 [orc](index.html) module"]
|
||||
pub struct ORC_SPEC;
|
||||
impl crate::RegisterSpec for ORC_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [orc::R](R) reader structure"]
|
||||
impl crate::Readable for ORC_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"]
|
||||
impl crate::Writable for ORC_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ORC to value 0"]
|
||||
impl crate::Resettable for ORC_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct PSEL {
|
||||
#[doc = "0x00 - Pin select for SCL signal"]
|
||||
pub scl: SCL,
|
||||
#[doc = "0x04 - Pin select for SDA signal"]
|
||||
pub sda: SDA,
|
||||
}
|
||||
#[doc = "SCL (rw) register accessor: an alias for `Reg<SCL_SPEC>`"]
|
||||
pub type SCL = crate::Reg<scl::SCL_SPEC>;
|
||||
#[doc = "Pin select for SCL signal"]
|
||||
pub mod scl;
|
||||
#[doc = "SDA (rw) register accessor: an alias for `Reg<SDA_SPEC>`"]
|
||||
pub type SDA = crate::Reg<sda::SDA_SPEC>;
|
||||
#[doc = "Pin select for SDA signal"]
|
||||
pub mod sda;
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `SCL` reader"]
|
||||
pub struct R(crate::R<SCL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SCL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SCL_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SCL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SCL` writer"]
|
||||
pub struct W(crate::W<SCL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SCL_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<SCL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SCL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PIN` reader - Pin number"]
|
||||
pub type PIN_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `PIN` writer - Pin number"]
|
||||
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCL_SPEC, u8, u8, 5, O>;
|
||||
#[doc = "Field `CONNECT` reader - Connection"]
|
||||
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
|
||||
#[doc = "Connection\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CONNECT_A {
|
||||
#[doc = "1: Disconnect"]
|
||||
DISCONNECTED = 1,
|
||||
#[doc = "0: Connect"]
|
||||
CONNECTED = 0,
|
||||
}
|
||||
impl From<CONNECT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CONNECT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl CONNECT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CONNECT_A {
|
||||
match self.bits {
|
||||
true => CONNECT_A::DISCONNECTED,
|
||||
false => CONNECT_A::CONNECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disconnected(&self) -> bool {
|
||||
*self == CONNECT_A::DISCONNECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_connected(&self) -> bool {
|
||||
*self == CONNECT_A::CONNECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CONNECT` writer - Connection"]
|
||||
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCL_SPEC, CONNECT_A, O>;
|
||||
impl<'a, const O: u8> CONNECT_W<'a, O> {
|
||||
#[doc = "Disconnect"]
|
||||
#[inline(always)]
|
||||
pub fn disconnected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::DISCONNECTED)
|
||||
}
|
||||
#[doc = "Connect"]
|
||||
#[inline(always)]
|
||||
pub fn connected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::CONNECTED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:4 - Pin number"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&self) -> PIN_R {
|
||||
PIN_R::new((self.bits & 0x1f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&self) -> CONNECT_R {
|
||||
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:4 - Pin number"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&mut self) -> PIN_W<0> {
|
||||
PIN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&mut self) -> CONNECT_W<31> {
|
||||
CONNECT_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 = "Pin select for SCL signal\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 [scl](index.html) module"]
|
||||
pub struct SCL_SPEC;
|
||||
impl crate::RegisterSpec for SCL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [scl::R](R) reader structure"]
|
||||
impl crate::Readable for SCL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [scl::W](W) writer structure"]
|
||||
impl crate::Writable for SCL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SCL to value 0xffff_ffff"]
|
||||
impl crate::Resettable for SCL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `SDA` reader"]
|
||||
pub struct R(crate::R<SDA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SDA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SDA_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SDA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SDA` writer"]
|
||||
pub struct W(crate::W<SDA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SDA_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<SDA_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SDA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PIN` reader - Pin number"]
|
||||
pub type PIN_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `PIN` writer - Pin number"]
|
||||
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDA_SPEC, u8, u8, 5, O>;
|
||||
#[doc = "Field `CONNECT` reader - Connection"]
|
||||
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
|
||||
#[doc = "Connection\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CONNECT_A {
|
||||
#[doc = "1: Disconnect"]
|
||||
DISCONNECTED = 1,
|
||||
#[doc = "0: Connect"]
|
||||
CONNECTED = 0,
|
||||
}
|
||||
impl From<CONNECT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CONNECT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl CONNECT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CONNECT_A {
|
||||
match self.bits {
|
||||
true => CONNECT_A::DISCONNECTED,
|
||||
false => CONNECT_A::CONNECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disconnected(&self) -> bool {
|
||||
*self == CONNECT_A::DISCONNECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_connected(&self) -> bool {
|
||||
*self == CONNECT_A::CONNECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CONNECT` writer - Connection"]
|
||||
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDA_SPEC, CONNECT_A, O>;
|
||||
impl<'a, const O: u8> CONNECT_W<'a, O> {
|
||||
#[doc = "Disconnect"]
|
||||
#[inline(always)]
|
||||
pub fn disconnected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::DISCONNECTED)
|
||||
}
|
||||
#[doc = "Connect"]
|
||||
#[inline(always)]
|
||||
pub fn connected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::CONNECTED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:4 - Pin number"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&self) -> PIN_R {
|
||||
PIN_R::new((self.bits & 0x1f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&self) -> CONNECT_R {
|
||||
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:4 - Pin number"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&mut self) -> PIN_W<0> {
|
||||
PIN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&mut self) -> CONNECT_W<31> {
|
||||
CONNECT_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 = "Pin select for SDA signal\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 [sda](index.html) module"]
|
||||
pub struct SDA_SPEC;
|
||||
impl crate::RegisterSpec for SDA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [sda::R](R) reader structure"]
|
||||
impl crate::Readable for SDA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [sda::W](W) writer structure"]
|
||||
impl crate::Writable for SDA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SDA to value 0xffff_ffff"]
|
||||
impl crate::Resettable for SDA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `PUBLISH_ERROR` reader"]
|
||||
pub struct R(crate::R<PUBLISH_ERROR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_ERROR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_ERROR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_ERROR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_ERROR` writer"]
|
||||
pub struct W(crate::W<PUBLISH_ERROR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_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<PUBLISH_ERROR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_ERROR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event ERROR will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event ERROR will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_ERROR_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_ERROR_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event ERROR will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event ERROR will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event ERROR\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 [publish_error](index.html) module"]
|
||||
pub struct PUBLISH_ERROR_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_ERROR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_error::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_ERROR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_error::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_ERROR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_ERROR to value 0"]
|
||||
impl crate::Resettable for PUBLISH_ERROR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `PUBLISH_READ` reader"]
|
||||
pub struct R(crate::R<PUBLISH_READ_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_READ_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_READ_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_READ_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_READ` writer"]
|
||||
pub struct W(crate::W<PUBLISH_READ_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_READ_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<PUBLISH_READ_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_READ_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event READ will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event READ will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_READ_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_READ_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event READ will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event READ will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event READ\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 [publish_read](index.html) module"]
|
||||
pub struct PUBLISH_READ_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_READ_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_read::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_READ_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_read::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_READ_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_READ to value 0"]
|
||||
impl crate::Resettable for PUBLISH_READ_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `PUBLISH_RXSTARTED` reader"]
|
||||
pub struct R(crate::R<PUBLISH_RXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_RXSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_RXSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_RXSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_RXSTARTED` writer"]
|
||||
pub struct W(crate::W<PUBLISH_RXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_RXSTARTED_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<PUBLISH_RXSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_RXSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event RXSTARTED will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event RXSTARTED will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, PUBLISH_RXSTARTED_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_RXSTARTED_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event RXSTARTED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event RXSTARTED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event RXSTARTED\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 [publish_rxstarted](index.html) module"]
|
||||
pub struct PUBLISH_RXSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_RXSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_rxstarted::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_RXSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_rxstarted::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_RXSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_RXSTARTED to value 0"]
|
||||
impl crate::Resettable for PUBLISH_RXSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `PUBLISH_STOPPED` reader"]
|
||||
pub struct R(crate::R<PUBLISH_STOPPED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_STOPPED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_STOPPED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_STOPPED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_STOPPED` writer"]
|
||||
pub struct W(crate::W<PUBLISH_STOPPED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_STOPPED_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<PUBLISH_STOPPED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_STOPPED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event STOPPED will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event STOPPED will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_STOPPED_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_STOPPED_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event STOPPED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event STOPPED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event STOPPED\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 [publish_stopped](index.html) module"]
|
||||
pub struct PUBLISH_STOPPED_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_STOPPED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_stopped::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_STOPPED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_stopped::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_STOPPED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_STOPPED to value 0"]
|
||||
impl crate::Resettable for PUBLISH_STOPPED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `PUBLISH_TXSTARTED` reader"]
|
||||
pub struct R(crate::R<PUBLISH_TXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_TXSTARTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_TXSTARTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_TXSTARTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_TXSTARTED` writer"]
|
||||
pub struct W(crate::W<PUBLISH_TXSTARTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_TXSTARTED_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<PUBLISH_TXSTARTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_TXSTARTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event TXSTARTED will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event TXSTARTED will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, PUBLISH_TXSTARTED_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_TXSTARTED_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event TXSTARTED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event TXSTARTED will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event TXSTARTED\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 [publish_txstarted](index.html) module"]
|
||||
pub struct PUBLISH_TXSTARTED_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_TXSTARTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_txstarted::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_TXSTARTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_txstarted::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_TXSTARTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_TXSTARTED to value 0"]
|
||||
impl crate::Resettable for PUBLISH_TXSTARTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `PUBLISH_WRITE` reader"]
|
||||
pub struct R(crate::R<PUBLISH_WRITE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PUBLISH_WRITE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PUBLISH_WRITE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PUBLISH_WRITE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PUBLISH_WRITE` writer"]
|
||||
pub struct W(crate::W<PUBLISH_WRITE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PUBLISH_WRITE_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<PUBLISH_WRITE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PUBLISH_WRITE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that event WRITE will publish to."]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that event WRITE will publish to."]
|
||||
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_WRITE_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable publishing"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable publishing"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_WRITE_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable publishing"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that event WRITE will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that event WRITE will publish to."]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Publish configuration for event WRITE\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 [publish_write](index.html) module"]
|
||||
pub struct PUBLISH_WRITE_SPEC;
|
||||
impl crate::RegisterSpec for PUBLISH_WRITE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [publish_write::R](R) reader structure"]
|
||||
impl crate::Readable for PUBLISH_WRITE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [publish_write::W](W) writer structure"]
|
||||
impl crate::Writable for PUBLISH_WRITE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PUBLISH_WRITE to value 0"]
|
||||
impl crate::Resettable for PUBLISH_WRITE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RXD {
|
||||
#[doc = "0x00 - RXD Data pointer"]
|
||||
pub ptr: PTR,
|
||||
#[doc = "0x04 - Maximum number of bytes in RXD buffer"]
|
||||
pub maxcnt: MAXCNT,
|
||||
#[doc = "0x08 - Number of bytes transferred in the last RXD transaction"]
|
||||
pub amount: AMOUNT,
|
||||
#[doc = "0x0c - EasyDMA list type"]
|
||||
pub list: LIST,
|
||||
}
|
||||
#[doc = "PTR (rw) register accessor: an alias for `Reg<PTR_SPEC>`"]
|
||||
pub type PTR = crate::Reg<ptr::PTR_SPEC>;
|
||||
#[doc = "RXD Data pointer"]
|
||||
pub mod ptr;
|
||||
#[doc = "MAXCNT (rw) register accessor: an alias for `Reg<MAXCNT_SPEC>`"]
|
||||
pub type MAXCNT = crate::Reg<maxcnt::MAXCNT_SPEC>;
|
||||
#[doc = "Maximum number of bytes in RXD buffer"]
|
||||
pub mod maxcnt;
|
||||
#[doc = "AMOUNT (r) register accessor: an alias for `Reg<AMOUNT_SPEC>`"]
|
||||
pub type AMOUNT = crate::Reg<amount::AMOUNT_SPEC>;
|
||||
#[doc = "Number of bytes transferred in the last RXD transaction"]
|
||||
pub mod amount;
|
||||
#[doc = "LIST (rw) register accessor: an alias for `Reg<LIST_SPEC>`"]
|
||||
pub type LIST = crate::Reg<list::LIST_SPEC>;
|
||||
#[doc = "EasyDMA list type"]
|
||||
pub mod list;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `AMOUNT` reader"]
|
||||
pub struct R(crate::R<AMOUNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMOUNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<AMOUNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<AMOUNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AMOUNT` reader - Number of bytes transferred in the last RXD transaction"]
|
||||
pub type AMOUNT_R = crate::FieldReader<u16, u16>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:12 - Number of bytes transferred in the last RXD transaction"]
|
||||
#[inline(always)]
|
||||
pub fn amount(&self) -> AMOUNT_R {
|
||||
AMOUNT_R::new((self.bits & 0x1fff) as u16)
|
||||
}
|
||||
}
|
||||
#[doc = "Number of bytes transferred in the last RXD transaction\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 [amount](index.html) module"]
|
||||
pub struct AMOUNT_SPEC;
|
||||
impl crate::RegisterSpec for AMOUNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amount::R](R) reader structure"]
|
||||
impl crate::Readable for AMOUNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMOUNT to value 0"]
|
||||
impl crate::Resettable for AMOUNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
#[doc = "Register `LIST` reader"]
|
||||
pub struct R(crate::R<LIST_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<LIST_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<LIST_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<LIST_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `LIST` writer"]
|
||||
pub struct W(crate::W<LIST_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<LIST_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<LIST_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<LIST_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LIST` reader - List type"]
|
||||
pub type LIST_R = crate::FieldReader<u8, LIST_A>;
|
||||
#[doc = "List type\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum LIST_A {
|
||||
#[doc = "0: Disable EasyDMA list"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Use array list"]
|
||||
ARRAY_LIST = 1,
|
||||
}
|
||||
impl From<LIST_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: LIST_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl LIST_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<LIST_A> {
|
||||
match self.bits {
|
||||
0 => Some(LIST_A::DISABLED),
|
||||
1 => Some(LIST_A::ARRAY_LIST),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == LIST_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ARRAY_LIST`"]
|
||||
#[inline(always)]
|
||||
pub fn is_array_list(&self) -> bool {
|
||||
*self == LIST_A::ARRAY_LIST
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LIST` writer - List type"]
|
||||
pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 2, O>;
|
||||
impl<'a, const O: u8> LIST_W<'a, O> {
|
||||
#[doc = "Disable EasyDMA list"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(LIST_A::DISABLED)
|
||||
}
|
||||
#[doc = "Use array list"]
|
||||
#[inline(always)]
|
||||
pub fn array_list(self) -> &'a mut W {
|
||||
self.variant(LIST_A::ARRAY_LIST)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:1 - List type"]
|
||||
#[inline(always)]
|
||||
pub fn list(&self) -> LIST_R {
|
||||
LIST_R::new((self.bits & 3) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:1 - List type"]
|
||||
#[inline(always)]
|
||||
pub fn list(&mut self) -> LIST_W<0> {
|
||||
LIST_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 = "EasyDMA list type\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 [list](index.html) module"]
|
||||
pub struct LIST_SPEC;
|
||||
impl crate::RegisterSpec for LIST_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [list::R](R) reader structure"]
|
||||
impl crate::Readable for LIST_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"]
|
||||
impl crate::Writable for LIST_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets LIST to value 0"]
|
||||
impl crate::Resettable for LIST_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `MAXCNT` reader"]
|
||||
pub struct R(crate::R<MAXCNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MAXCNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MAXCNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MAXCNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `MAXCNT` writer"]
|
||||
pub struct W(crate::W<MAXCNT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<MAXCNT_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<MAXCNT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<MAXCNT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MAXCNT` reader - Maximum number of bytes in RXD buffer"]
|
||||
pub type MAXCNT_R = crate::FieldReader<u16, u16>;
|
||||
#[doc = "Field `MAXCNT` writer - Maximum number of bytes in RXD buffer"]
|
||||
pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 13, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:12 - Maximum number of bytes in RXD buffer"]
|
||||
#[inline(always)]
|
||||
pub fn maxcnt(&self) -> MAXCNT_R {
|
||||
MAXCNT_R::new((self.bits & 0x1fff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:12 - Maximum number of bytes in RXD buffer"]
|
||||
#[inline(always)]
|
||||
pub fn maxcnt(&mut self) -> MAXCNT_W<0> {
|
||||
MAXCNT_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 = "Maximum number of bytes in RXD buffer\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 [maxcnt](index.html) module"]
|
||||
pub struct MAXCNT_SPEC;
|
||||
impl crate::RegisterSpec for MAXCNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [maxcnt::R](R) reader structure"]
|
||||
impl crate::Readable for MAXCNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"]
|
||||
impl crate::Writable for MAXCNT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets MAXCNT to value 0"]
|
||||
impl crate::Resettable for MAXCNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `PTR` reader"]
|
||||
pub struct R(crate::R<PTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PTR` writer"]
|
||||
pub struct W(crate::W<PTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PTR_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<PTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PTR` reader - RXD Data pointer"]
|
||||
pub type PTR_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `PTR` writer - RXD Data pointer"]
|
||||
pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - RXD Data pointer"]
|
||||
#[inline(always)]
|
||||
pub fn ptr(&self) -> PTR_R {
|
||||
PTR_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - RXD Data pointer"]
|
||||
#[inline(always)]
|
||||
pub fn ptr(&mut self) -> PTR_W<0> {
|
||||
PTR_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 = "RXD Data 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 [ptr](index.html) module"]
|
||||
pub struct PTR_SPEC;
|
||||
impl crate::RegisterSpec for PTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ptr::R](R) reader structure"]
|
||||
impl crate::Readable for PTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"]
|
||||
impl crate::Writable for PTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PTR to value 0"]
|
||||
impl crate::Resettable for PTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
#[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 `WRITE_SUSPEND` reader - Shortcut between event WRITE and task SUSPEND"]
|
||||
pub type WRITE_SUSPEND_R = crate::BitReader<WRITE_SUSPEND_A>;
|
||||
#[doc = "Shortcut between event WRITE and task SUSPEND\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WRITE_SUSPEND_A {
|
||||
#[doc = "0: Disable shortcut"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable shortcut"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<WRITE_SUSPEND_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: WRITE_SUSPEND_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl WRITE_SUSPEND_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> WRITE_SUSPEND_A {
|
||||
match self.bits {
|
||||
false => WRITE_SUSPEND_A::DISABLED,
|
||||
true => WRITE_SUSPEND_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == WRITE_SUSPEND_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == WRITE_SUSPEND_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRITE_SUSPEND` writer - Shortcut between event WRITE and task SUSPEND"]
|
||||
pub type WRITE_SUSPEND_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, SHORTS_SPEC, WRITE_SUSPEND_A, O>;
|
||||
impl<'a, const O: u8> WRITE_SUSPEND_W<'a, O> {
|
||||
#[doc = "Disable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(WRITE_SUSPEND_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(WRITE_SUSPEND_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ_SUSPEND` reader - Shortcut between event READ and task SUSPEND"]
|
||||
pub type READ_SUSPEND_R = crate::BitReader<READ_SUSPEND_A>;
|
||||
#[doc = "Shortcut between event READ and task SUSPEND\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READ_SUSPEND_A {
|
||||
#[doc = "0: Disable shortcut"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable shortcut"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<READ_SUSPEND_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READ_SUSPEND_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READ_SUSPEND_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READ_SUSPEND_A {
|
||||
match self.bits {
|
||||
false => READ_SUSPEND_A::DISABLED,
|
||||
true => READ_SUSPEND_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == READ_SUSPEND_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == READ_SUSPEND_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READ_SUSPEND` writer - Shortcut between event READ and task SUSPEND"]
|
||||
pub type READ_SUSPEND_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, SHORTS_SPEC, READ_SUSPEND_A, O>;
|
||||
impl<'a, const O: u8> READ_SUSPEND_W<'a, O> {
|
||||
#[doc = "Disable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(READ_SUSPEND_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(READ_SUSPEND_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"]
|
||||
#[inline(always)]
|
||||
pub fn write_suspend(&self) -> WRITE_SUSPEND_R {
|
||||
WRITE_SUSPEND_R::new(((self.bits >> 13) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"]
|
||||
#[inline(always)]
|
||||
pub fn read_suspend(&self) -> READ_SUSPEND_R {
|
||||
READ_SUSPEND_R::new(((self.bits >> 14) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"]
|
||||
#[inline(always)]
|
||||
pub fn write_suspend(&mut self) -> WRITE_SUSPEND_W<13> {
|
||||
WRITE_SUSPEND_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"]
|
||||
#[inline(always)]
|
||||
pub fn read_suspend(&mut self) -> READ_SUSPEND_W<14> {
|
||||
READ_SUSPEND_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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_PREPARERX` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_PREPARERX_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_PREPARERX_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_PREPARERX_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_PREPARERX_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_PREPARERX` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_PREPARERX_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_PREPARERX_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<SUBSCRIBE_PREPARERX_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_PREPARERX_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that task PREPARERX will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that task PREPARERX will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_PREPARERX_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable subscription"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable subscription"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_PREPARERX_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that task PREPARERX will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that task PREPARERX will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Subscribe configuration for task PREPARERX\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 [subscribe_preparerx](index.html) module"]
|
||||
pub struct SUBSCRIBE_PREPARERX_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_PREPARERX_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_preparerx::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_PREPARERX_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_preparerx::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_PREPARERX_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_PREPARERX to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_PREPARERX_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_PREPARETX` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_PREPARETX_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_PREPARETX_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_PREPARETX_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_PREPARETX_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_PREPARETX` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_PREPARETX_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_PREPARETX_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<SUBSCRIBE_PREPARETX_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_PREPARETX_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that task PREPARETX will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that task PREPARETX will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_PREPARETX_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable subscription"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable subscription"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_PREPARETX_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that task PREPARETX will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that task PREPARETX will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Subscribe configuration for task PREPARETX\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 [subscribe_preparetx](index.html) module"]
|
||||
pub struct SUBSCRIBE_PREPARETX_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_PREPARETX_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_preparetx::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_PREPARETX_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_preparetx::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_PREPARETX_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_PREPARETX to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_PREPARETX_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_RESUME` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_RESUME_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_RESUME_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_RESUME_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_RESUME_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_RESUME` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_RESUME_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_RESUME_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<SUBSCRIBE_RESUME_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_RESUME_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that task RESUME will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that task RESUME will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_RESUME_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable subscription"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable subscription"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_RESUME_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that task RESUME will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that task RESUME will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Subscribe configuration for task RESUME\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 [subscribe_resume](index.html) module"]
|
||||
pub struct SUBSCRIBE_RESUME_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_RESUME_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_resume::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_RESUME_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_resume::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_RESUME_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_RESUME to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_RESUME_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
#[doc = "Register `SUBSCRIBE_STOP` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_STOP_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_STOP_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_STOP_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_STOP_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_STOP` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_STOP_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_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<SUBSCRIBE_STOP_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_STOP_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that task STOP will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that task STOP will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SUBSCRIBE_STOP_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable subscription"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable subscription"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_STOP_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that task STOP will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that task STOP will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Subscribe configuration for task STOP\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 [subscribe_stop](index.html) module"]
|
||||
pub struct SUBSCRIBE_STOP_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_STOP_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_stop::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_STOP_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_stop::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_STOP_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_STOP to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_STOP_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_SUSPEND` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_SUSPEND_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_SUSPEND_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_SUSPEND_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_SUSPEND_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_SUSPEND` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_SUSPEND_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_SUSPEND_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<SUBSCRIBE_SUSPEND_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_SUSPEND_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - Channel that task SUSPEND will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - Channel that task SUSPEND will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_SUSPEND_SPEC, u8, u8, 4, O>;
|
||||
#[doc = "Field `EN` reader - "]
|
||||
pub type EN_R = crate::BitReader<EN_A>;
|
||||
#[doc = "\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EN_A {
|
||||
#[doc = "0: Disable subscription"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable subscription"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<EN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EN_A {
|
||||
match self.bits {
|
||||
false => EN_A::DISABLED,
|
||||
true => EN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == EN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == EN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EN` writer - "]
|
||||
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_SUSPEND_SPEC, EN_A, O>;
|
||||
impl<'a, const O: u8> EN_W<'a, O> {
|
||||
#[doc = "Disable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable subscription"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(EN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Channel that task SUSPEND will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&self) -> CHIDX_R {
|
||||
CHIDX_R::new((self.bits & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&self) -> EN_R {
|
||||
EN_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:3 - Channel that task SUSPEND will subscribe to"]
|
||||
#[inline(always)]
|
||||
pub fn chidx(&mut self) -> CHIDX_W<0> {
|
||||
CHIDX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31"]
|
||||
#[inline(always)]
|
||||
pub fn en(&mut self) -> EN_W<31> {
|
||||
EN_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 = "Subscribe configuration for task SUSPEND\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 [subscribe_suspend](index.html) module"]
|
||||
pub struct SUBSCRIBE_SUSPEND_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_SUSPEND_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_suspend::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_SUSPEND_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_suspend::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_SUSPEND_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_SUSPEND to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_SUSPEND_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_PREPARERX` writer"]
|
||||
pub struct W(crate::W<TASKS_PREPARERX_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_PREPARERX_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_PREPARERX_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_PREPARERX_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Prepare the TWI slave to respond to a write command\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_PREPARERX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_PREPARERX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_PREPARERX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_PREPARERX` writer - Prepare the TWI slave to respond to a write command"]
|
||||
pub type TASKS_PREPARERX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_PREPARERX_SPEC, TASKS_PREPARERX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_PREPARERX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_PREPARERX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Prepare the TWI slave to respond to a write command"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_preparerx(&mut self) -> TASKS_PREPARERX_W<0> {
|
||||
TASKS_PREPARERX_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 = "Prepare the TWI slave to respond to a write command\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_preparerx](index.html) module"]
|
||||
pub struct TASKS_PREPARERX_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_PREPARERX_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_preparerx::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_PREPARERX_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_PREPARERX to value 0"]
|
||||
impl crate::Resettable for TASKS_PREPARERX_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_PREPARETX` writer"]
|
||||
pub struct W(crate::W<TASKS_PREPARETX_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_PREPARETX_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_PREPARETX_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_PREPARETX_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Prepare the TWI slave to respond to a read command\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_PREPARETX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_PREPARETX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_PREPARETX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_PREPARETX` writer - Prepare the TWI slave to respond to a read command"]
|
||||
pub type TASKS_PREPARETX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_PREPARETX_SPEC, TASKS_PREPARETX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_PREPARETX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_PREPARETX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Prepare the TWI slave to respond to a read command"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_preparetx(&mut self) -> TASKS_PREPARETX_W<0> {
|
||||
TASKS_PREPARETX_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 = "Prepare the TWI slave to respond to a read command\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_preparetx](index.html) module"]
|
||||
pub struct TASKS_PREPARETX_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_PREPARETX_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_preparetx::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_PREPARETX_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_PREPARETX to value 0"]
|
||||
impl crate::Resettable for TASKS_PREPARETX_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_RESUME` writer"]
|
||||
pub struct W(crate::W<TASKS_RESUME_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_RESUME_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_RESUME_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_RESUME_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Resume TWI transaction\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_RESUME_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_RESUME_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_RESUME_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"]
|
||||
pub type TASKS_RESUME_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_RESUME_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_RESUME_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Resume TWI transaction"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> {
|
||||
TASKS_RESUME_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 = "Resume TWI transaction\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_resume](index.html) module"]
|
||||
pub struct TASKS_RESUME_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_RESUME_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_RESUME_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_RESUME to value 0"]
|
||||
impl crate::Resettable for TASKS_RESUME_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+72
@@ -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 TWI transaction\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 TWI transaction"]
|
||||
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 TWI transaction"]
|
||||
#[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 TWI transaction\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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_SUSPEND` writer"]
|
||||
pub struct W(crate::W<TASKS_SUSPEND_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_SUSPEND_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_SUSPEND_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_SUSPEND_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Suspend TWI transaction\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_SUSPEND_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_SUSPEND_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_SUSPEND_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"]
|
||||
pub type TASKS_SUSPEND_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_SUSPEND_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Suspend TWI transaction"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> {
|
||||
TASKS_SUSPEND_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 = "Suspend TWI transaction\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_suspend](index.html) module"]
|
||||
pub struct TASKS_SUSPEND_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_SUSPEND_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_SUSPEND_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"]
|
||||
impl crate::Resettable for TASKS_SUSPEND_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct TXD {
|
||||
#[doc = "0x00 - TXD Data pointer"]
|
||||
pub ptr: PTR,
|
||||
#[doc = "0x04 - Maximum number of bytes in TXD buffer"]
|
||||
pub maxcnt: MAXCNT,
|
||||
#[doc = "0x08 - Number of bytes transferred in the last TXD transaction"]
|
||||
pub amount: AMOUNT,
|
||||
#[doc = "0x0c - EasyDMA list type"]
|
||||
pub list: LIST,
|
||||
}
|
||||
#[doc = "PTR (rw) register accessor: an alias for `Reg<PTR_SPEC>`"]
|
||||
pub type PTR = crate::Reg<ptr::PTR_SPEC>;
|
||||
#[doc = "TXD Data pointer"]
|
||||
pub mod ptr;
|
||||
#[doc = "MAXCNT (rw) register accessor: an alias for `Reg<MAXCNT_SPEC>`"]
|
||||
pub type MAXCNT = crate::Reg<maxcnt::MAXCNT_SPEC>;
|
||||
#[doc = "Maximum number of bytes in TXD buffer"]
|
||||
pub mod maxcnt;
|
||||
#[doc = "AMOUNT (r) register accessor: an alias for `Reg<AMOUNT_SPEC>`"]
|
||||
pub type AMOUNT = crate::Reg<amount::AMOUNT_SPEC>;
|
||||
#[doc = "Number of bytes transferred in the last TXD transaction"]
|
||||
pub mod amount;
|
||||
#[doc = "LIST (rw) register accessor: an alias for `Reg<LIST_SPEC>`"]
|
||||
pub type LIST = crate::Reg<list::LIST_SPEC>;
|
||||
#[doc = "EasyDMA list type"]
|
||||
pub mod list;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `AMOUNT` reader"]
|
||||
pub struct R(crate::R<AMOUNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<AMOUNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<AMOUNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<AMOUNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AMOUNT` reader - Number of bytes transferred in the last TXD transaction"]
|
||||
pub type AMOUNT_R = crate::FieldReader<u16, u16>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:12 - Number of bytes transferred in the last TXD transaction"]
|
||||
#[inline(always)]
|
||||
pub fn amount(&self) -> AMOUNT_R {
|
||||
AMOUNT_R::new((self.bits & 0x1fff) as u16)
|
||||
}
|
||||
}
|
||||
#[doc = "Number of bytes transferred in the last TXD transaction\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 [amount](index.html) module"]
|
||||
pub struct AMOUNT_SPEC;
|
||||
impl crate::RegisterSpec for AMOUNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [amount::R](R) reader structure"]
|
||||
impl crate::Readable for AMOUNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets AMOUNT to value 0"]
|
||||
impl crate::Resettable for AMOUNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
#[doc = "Register `LIST` reader"]
|
||||
pub struct R(crate::R<LIST_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<LIST_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<LIST_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<LIST_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `LIST` writer"]
|
||||
pub struct W(crate::W<LIST_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<LIST_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<LIST_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<LIST_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LIST` reader - List type"]
|
||||
pub type LIST_R = crate::FieldReader<u8, LIST_A>;
|
||||
#[doc = "List type\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum LIST_A {
|
||||
#[doc = "0: Disable EasyDMA list"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Use array list"]
|
||||
ARRAY_LIST = 1,
|
||||
}
|
||||
impl From<LIST_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: LIST_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl LIST_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<LIST_A> {
|
||||
match self.bits {
|
||||
0 => Some(LIST_A::DISABLED),
|
||||
1 => Some(LIST_A::ARRAY_LIST),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == LIST_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ARRAY_LIST`"]
|
||||
#[inline(always)]
|
||||
pub fn is_array_list(&self) -> bool {
|
||||
*self == LIST_A::ARRAY_LIST
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LIST` writer - List type"]
|
||||
pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 2, O>;
|
||||
impl<'a, const O: u8> LIST_W<'a, O> {
|
||||
#[doc = "Disable EasyDMA list"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(LIST_A::DISABLED)
|
||||
}
|
||||
#[doc = "Use array list"]
|
||||
#[inline(always)]
|
||||
pub fn array_list(self) -> &'a mut W {
|
||||
self.variant(LIST_A::ARRAY_LIST)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:1 - List type"]
|
||||
#[inline(always)]
|
||||
pub fn list(&self) -> LIST_R {
|
||||
LIST_R::new((self.bits & 3) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:1 - List type"]
|
||||
#[inline(always)]
|
||||
pub fn list(&mut self) -> LIST_W<0> {
|
||||
LIST_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 = "EasyDMA list type\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 [list](index.html) module"]
|
||||
pub struct LIST_SPEC;
|
||||
impl crate::RegisterSpec for LIST_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [list::R](R) reader structure"]
|
||||
impl crate::Readable for LIST_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"]
|
||||
impl crate::Writable for LIST_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets LIST to value 0"]
|
||||
impl crate::Resettable for LIST_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `MAXCNT` reader"]
|
||||
pub struct R(crate::R<MAXCNT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MAXCNT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MAXCNT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MAXCNT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `MAXCNT` writer"]
|
||||
pub struct W(crate::W<MAXCNT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<MAXCNT_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<MAXCNT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<MAXCNT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MAXCNT` reader - Maximum number of bytes in TXD buffer"]
|
||||
pub type MAXCNT_R = crate::FieldReader<u16, u16>;
|
||||
#[doc = "Field `MAXCNT` writer - Maximum number of bytes in TXD buffer"]
|
||||
pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 13, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:12 - Maximum number of bytes in TXD buffer"]
|
||||
#[inline(always)]
|
||||
pub fn maxcnt(&self) -> MAXCNT_R {
|
||||
MAXCNT_R::new((self.bits & 0x1fff) as u16)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:12 - Maximum number of bytes in TXD buffer"]
|
||||
#[inline(always)]
|
||||
pub fn maxcnt(&mut self) -> MAXCNT_W<0> {
|
||||
MAXCNT_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 = "Maximum number of bytes in TXD buffer\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 [maxcnt](index.html) module"]
|
||||
pub struct MAXCNT_SPEC;
|
||||
impl crate::RegisterSpec for MAXCNT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [maxcnt::R](R) reader structure"]
|
||||
impl crate::Readable for MAXCNT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"]
|
||||
impl crate::Writable for MAXCNT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets MAXCNT to value 0"]
|
||||
impl crate::Resettable for MAXCNT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `PTR` reader"]
|
||||
pub struct R(crate::R<PTR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PTR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PTR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PTR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PTR` writer"]
|
||||
pub struct W(crate::W<PTR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PTR_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<PTR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PTR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PTR` reader - TXD Data pointer"]
|
||||
pub type PTR_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `PTR` writer - TXD Data pointer"]
|
||||
pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - TXD Data pointer"]
|
||||
#[inline(always)]
|
||||
pub fn ptr(&self) -> PTR_R {
|
||||
PTR_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - TXD Data pointer"]
|
||||
#[inline(always)]
|
||||
pub fn ptr(&mut self) -> PTR_W<0> {
|
||||
PTR_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 = "TXD Data 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 [ptr](index.html) module"]
|
||||
pub struct PTR_SPEC;
|
||||
impl crate::RegisterSpec for PTR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ptr::R](R) reader structure"]
|
||||
impl crate::Readable for PTR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"]
|
||||
impl crate::Writable for PTR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PTR to value 0"]
|
||||
impl crate::Resettable for PTR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user