diff --git a/va416xx/Cargo.toml b/va416xx/Cargo.toml index cda5be5..7310426 100644 --- a/va416xx/Cargo.toml +++ b/va416xx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "va416xx" -version = "0.3.0" +version = "0.4.0" authors = ["Robin Mueller "] edition = "2021" description = "PAC for the Vorago VA416xx family of MCUs" @@ -15,6 +15,8 @@ categories = ["embedded", "no-std", "hardware-support"] [dependencies] cortex-m = "0.7" vcell = "0.1.3" + +defmt = { version = "0.3", optional = true } critical-section = { version = "1", optional = true } [dependencies.cortex-m-rt] @@ -23,6 +25,8 @@ version = ">=0.6.15,<0.8" [features] rt = ["cortex-m-rt/device"] +# Adds Debug implementation +debug = [] [package.metadata.docs.rs] all-features = true diff --git a/va416xx/gen-helper.sh b/va416xx/gen-helper.sh index 09f6377..499e3c9 100755 --- a/va416xx/gen-helper.sh +++ b/va416xx/gen-helper.sh @@ -29,7 +29,7 @@ then fi svdtools patch svd/va416xx-patch.yml -${svd2rust_bin} --reexport-interrupt -i svd/va416xx.svd.patched +${svd2rust_bin} --reexport-interrupt --impl-defmt defmt --impl-debug-feature debug -i svd/va416xx.svd.patched result=$? if [ $result -ne 0 ]; then diff --git a/va416xx/src/adc/perid.rs b/va416xx/src/adc/perid.rs index babd7d3..33365d7 100644 --- a/va416xx/src/adc/perid.rs +++ b/va416xx/src/adc/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/dac0/perid.rs b/va416xx/src/dac0/perid.rs index 64b61aa..6eb9587 100644 --- a/va416xx/src/dac0/perid.rs +++ b/va416xx/src/dac0/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/address.rs b/va416xx/src/i2c0/address.rs index 51f6c13..51d1ae1 100644 --- a/va416xx/src/i2c0/address.rs +++ b/va416xx/src/i2c0/address.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `ADDRESS` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/clktolimit.rs b/va416xx/src/i2c0/clktolimit.rs index 7816c03..4c289f7 100644 --- a/va416xx/src/i2c0/clktolimit.rs +++ b/va416xx/src/i2c0/clktolimit.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKTOLIMIT` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/cmd.rs b/va416xx/src/i2c0/cmd.rs index 67d22b0..8ae8aaa 100644 --- a/va416xx/src/i2c0/cmd.rs +++ b/va416xx/src/i2c0/cmd.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CMD` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/data.rs b/va416xx/src/i2c0/data.rs index b981752..55983d3 100644 --- a/va416xx/src/i2c0/data.rs +++ b/va416xx/src/i2c0/data.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `DATA` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/perid.rs b/va416xx/src/i2c0/perid.rs index 5e1b8ec..2f71382 100644 --- a/va416xx/src/i2c0/perid.rs +++ b/va416xx/src/i2c0/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/rxcount.rs b/va416xx/src/i2c0/rxcount.rs index f0d332e..af5fae5 100644 --- a/va416xx/src/i2c0/rxcount.rs +++ b/va416xx/src/i2c0/rxcount.rs @@ -1,5 +1,6 @@ #[doc = "Register `RXCOUNT` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/rxfifoirqtrg.rs b/va416xx/src/i2c0/rxfifoirqtrg.rs index 8376847..450e256 100644 --- a/va416xx/src/i2c0/rxfifoirqtrg.rs +++ b/va416xx/src/i2c0/rxfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `RXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/s0_state.rs b/va416xx/src/i2c0/s0_state.rs index 9be0a91..d68368e 100644 --- a/va416xx/src/i2c0/s0_state.rs +++ b/va416xx/src/i2c0/s0_state.rs @@ -1,5 +1,6 @@ #[doc = "Register `S0_STATE` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/state.rs b/va416xx/src/i2c0/state.rs index 81fe633..d623f7f 100644 --- a/va416xx/src/i2c0/state.rs +++ b/va416xx/src/i2c0/state.rs @@ -1,5 +1,6 @@ #[doc = "Register `STATE` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/tmconfig.rs b/va416xx/src/i2c0/tmconfig.rs index aa219ba..c8ac040 100644 --- a/va416xx/src/i2c0/tmconfig.rs +++ b/va416xx/src/i2c0/tmconfig.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `TMCONFIG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/txcount.rs b/va416xx/src/i2c0/txcount.rs index 41e1987..239cae9 100644 --- a/va416xx/src/i2c0/txcount.rs +++ b/va416xx/src/i2c0/txcount.rs @@ -1,5 +1,6 @@ #[doc = "Register `TXCOUNT` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/txfifoirqtrg.rs b/va416xx/src/i2c0/txfifoirqtrg.rs index 8d0ae92..00aa42f 100644 --- a/va416xx/src/i2c0/txfifoirqtrg.rs +++ b/va416xx/src/i2c0/txfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `TXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/i2c0/words.rs b/va416xx/src/i2c0/words.rs index 2b890bf..a7385e2 100644 --- a/va416xx/src/i2c0/words.rs +++ b/va416xx/src/i2c0/words.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `WORDS` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv0.rs b/va416xx/src/ioconfig/clkdiv0.rs index b31bf69..009d409 100644 --- a/va416xx/src/ioconfig/clkdiv0.rs +++ b/va416xx/src/ioconfig/clkdiv0.rs @@ -1,5 +1,6 @@ #[doc = "Register `CLKDIV0` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv1.rs b/va416xx/src/ioconfig/clkdiv1.rs index f5e0ba5..e85921c 100644 --- a/va416xx/src/ioconfig/clkdiv1.rs +++ b/va416xx/src/ioconfig/clkdiv1.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV1` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv2.rs b/va416xx/src/ioconfig/clkdiv2.rs index 826224c..b6c7d55 100644 --- a/va416xx/src/ioconfig/clkdiv2.rs +++ b/va416xx/src/ioconfig/clkdiv2.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV2` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv3.rs b/va416xx/src/ioconfig/clkdiv3.rs index a9e1662..09323ad 100644 --- a/va416xx/src/ioconfig/clkdiv3.rs +++ b/va416xx/src/ioconfig/clkdiv3.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV3` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv4.rs b/va416xx/src/ioconfig/clkdiv4.rs index 9198928..703efca 100644 --- a/va416xx/src/ioconfig/clkdiv4.rs +++ b/va416xx/src/ioconfig/clkdiv4.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV4` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv5.rs b/va416xx/src/ioconfig/clkdiv5.rs index d57a955..e7455a6 100644 --- a/va416xx/src/ioconfig/clkdiv5.rs +++ b/va416xx/src/ioconfig/clkdiv5.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV5` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv6.rs b/va416xx/src/ioconfig/clkdiv6.rs index b066fe5..05f0da1 100644 --- a/va416xx/src/ioconfig/clkdiv6.rs +++ b/va416xx/src/ioconfig/clkdiv6.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV6` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/clkdiv7.rs b/va416xx/src/ioconfig/clkdiv7.rs index b68af9c..358942f 100644 --- a/va416xx/src/ioconfig/clkdiv7.rs +++ b/va416xx/src/ioconfig/clkdiv7.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKDIV7` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/perid.rs b/va416xx/src/ioconfig/perid.rs index b01da2f..8c23707 100644 --- a/va416xx/src/ioconfig/perid.rs +++ b/va416xx/src/ioconfig/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/ioconfig/porta.rs b/va416xx/src/ioconfig/porta.rs index 32e9ef5..9dd8a98 100644 --- a/va416xx/src/ioconfig/porta.rs +++ b/va416xx/src/ioconfig/porta.rs @@ -3,6 +3,7 @@ pub type R = crate::R; #[doc = "Register `PORTA[%s]` writer"] pub type W = crate::W; #[doc = "Input Filter Selectoin\n\nValue on reset: 0"] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] pub enum Flttype { diff --git a/va416xx/src/irq_router/perid.rs b/va416xx/src/irq_router/perid.rs index 11f4ce5..339b0c6 100644 --- a/va416xx/src/irq_router/perid.rs +++ b/va416xx/src/irq_router/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/lib.rs b/va416xx/src/lib.rs index ca3163f..9a1b13e 100644 --- a/va416xx/src/lib.rs +++ b/va416xx/src/lib.rs @@ -3,8 +3,6 @@ svd2rust release can be generated by cloning the svd2rust [repository], checking #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![no_std] -// Manually inserted. -#![cfg_attr(docsrs, feature(doc_auto_cfg))] use core::marker::PhantomData; use core::ops::Deref; #[doc = r"Number available in the NVIC for configuring priority"] @@ -467,6 +465,7 @@ pub static __INTERRUPTS: [Vector; 196] = [ Vector { _handler: TXEV }, ]; #[doc = r"Enumeration of all the interrupts."] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[derive(Copy, Clone, Debug, PartialEq, Eq)] #[repr(u16)] pub enum Interrupt { diff --git a/va416xx/src/porta/datain.rs b/va416xx/src/porta/datain.rs index 10c0f7c..1038a45 100644 --- a/va416xx/src/porta/datain.rs +++ b/va416xx/src/porta/datain.rs @@ -1,5 +1,6 @@ #[doc = "Register `DATAIN` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/datainbyte.rs b/va416xx/src/porta/datainbyte.rs index 975ec65..1fd62e9 100644 --- a/va416xx/src/porta/datainbyte.rs +++ b/va416xx/src/porta/datainbyte.rs @@ -1,5 +1,6 @@ #[doc = "Register `DATAINBYTE[%s]` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/datamask.rs b/va416xx/src/porta/datamask.rs index 5185323..50c9bde 100644 --- a/va416xx/src/porta/datamask.rs +++ b/va416xx/src/porta/datamask.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `DATAMASK` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/datamaskbyte.rs b/va416xx/src/porta/datamaskbyte.rs index 5ac5d4c..5705734 100644 --- a/va416xx/src/porta/datamaskbyte.rs +++ b/va416xx/src/porta/datamaskbyte.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `DATAMASKBYTE[%s]` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/dataout.rs b/va416xx/src/porta/dataout.rs index f36ae05..3ced437 100644 --- a/va416xx/src/porta/dataout.rs +++ b/va416xx/src/porta/dataout.rs @@ -1,5 +1,6 @@ #[doc = "Register `DATAOUT` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for crate::generic::Reg { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "(not readable)") diff --git a/va416xx/src/porta/dataoutbyte.rs b/va416xx/src/porta/dataoutbyte.rs index 3344ad6..a125cd7 100644 --- a/va416xx/src/porta/dataoutbyte.rs +++ b/va416xx/src/porta/dataoutbyte.rs @@ -1,5 +1,6 @@ #[doc = "Register `DATAOUTBYTE[%s]` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for crate::generic::Reg { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "(not readable)") diff --git a/va416xx/src/porta/edge_status.rs b/va416xx/src/porta/edge_status.rs index 2c33d2a..16b3b53 100644 --- a/va416xx/src/porta/edge_status.rs +++ b/va416xx/src/porta/edge_status.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `EDGE_STATUS` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_edge.rs b/va416xx/src/porta/irq_edge.rs index 1f24586..010e596 100644 --- a/va416xx/src/porta/irq_edge.rs +++ b/va416xx/src/porta/irq_edge.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `IRQ_EDGE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_enb.rs b/va416xx/src/porta/irq_enb.rs index 3f1c60e..6a308e3 100644 --- a/va416xx/src/porta/irq_enb.rs +++ b/va416xx/src/porta/irq_enb.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `IRQ_ENB` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_end.rs b/va416xx/src/porta/irq_end.rs index 9cc9e4e..5701cd8 100644 --- a/va416xx/src/porta/irq_end.rs +++ b/va416xx/src/porta/irq_end.rs @@ -1,5 +1,6 @@ #[doc = "Register `IRQ_END` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_evt.rs b/va416xx/src/porta/irq_evt.rs index f23485c..1b727da 100644 --- a/va416xx/src/porta/irq_evt.rs +++ b/va416xx/src/porta/irq_evt.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `IRQ_EVT` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_raw.rs b/va416xx/src/porta/irq_raw.rs index d30086c..95d08c5 100644 --- a/va416xx/src/porta/irq_raw.rs +++ b/va416xx/src/porta/irq_raw.rs @@ -1,5 +1,6 @@ #[doc = "Register `IRQ_RAW` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/irq_sen.rs b/va416xx/src/porta/irq_sen.rs index 70346cc..05a689a 100644 --- a/va416xx/src/porta/irq_sen.rs +++ b/va416xx/src/porta/irq_sen.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `IRQ_SEN` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/porta/perid.rs b/va416xx/src/porta/perid.rs index 02cb718..0ca4da2 100644 --- a/va416xx/src/porta/perid.rs +++ b/va416xx/src/porta/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/clkprescale.rs b/va416xx/src/spi0/clkprescale.rs index bcf8350..3c7a5ad 100644 --- a/va416xx/src/spi0/clkprescale.rs +++ b/va416xx/src/spi0/clkprescale.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CLKPRESCALE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/data.rs b/va416xx/src/spi0/data.rs index b981752..55983d3 100644 --- a/va416xx/src/spi0/data.rs +++ b/va416xx/src/spi0/data.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `DATA` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/perid.rs b/va416xx/src/spi0/perid.rs index dd964dd..e1b3ea3 100644 --- a/va416xx/src/spi0/perid.rs +++ b/va416xx/src/spi0/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/rxfifoirqtrg.rs b/va416xx/src/spi0/rxfifoirqtrg.rs index 8376847..450e256 100644 --- a/va416xx/src/spi0/rxfifoirqtrg.rs +++ b/va416xx/src/spi0/rxfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `RXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/state.rs b/va416xx/src/spi0/state.rs index 96de72f..0e11448 100644 --- a/va416xx/src/spi0/state.rs +++ b/va416xx/src/spi0/state.rs @@ -1,5 +1,6 @@ #[doc = "Register `STATE` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/spi0/txfifoirqtrg.rs b/va416xx/src/spi0/txfifoirqtrg.rs index 8d0ae92..00aa42f 100644 --- a/va416xx/src/spi0/txfifoirqtrg.rs +++ b/va416xx/src/spi0/txfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `TXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/sysconfig/ef_id0.rs b/va416xx/src/sysconfig/ef_id0.rs index bd02128..ff1d078 100644 --- a/va416xx/src/sysconfig/ef_id0.rs +++ b/va416xx/src/sysconfig/ef_id0.rs @@ -1,5 +1,6 @@ #[doc = "Register `EF_ID0` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/sysconfig/ef_id1.rs b/va416xx/src/sysconfig/ef_id1.rs index 4d82c27..08aa933 100644 --- a/va416xx/src/sysconfig/ef_id1.rs +++ b/va416xx/src/sysconfig/ef_id1.rs @@ -1,5 +1,6 @@ #[doc = "Register `EF_ID1` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/sysconfig/procid.rs b/va416xx/src/sysconfig/procid.rs index e73a814..05497b9 100644 --- a/va416xx/src/sysconfig/procid.rs +++ b/va416xx/src/sysconfig/procid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PROCID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/cnt_value.rs b/va416xx/src/tim0/cnt_value.rs index 7ae8efe..ca86af8 100644 --- a/va416xx/src/tim0/cnt_value.rs +++ b/va416xx/src/tim0/cnt_value.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `CNT_VALUE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/ctrl.rs b/va416xx/src/tim0/ctrl.rs index ca33018..16f504b 100644 --- a/va416xx/src/tim0/ctrl.rs +++ b/va416xx/src/tim0/ctrl.rs @@ -21,6 +21,7 @@ pub type IrqEnbR = crate::BitReader; #[doc = "Field `IRQ_ENB` writer - Interrupt Enable"] pub type IrqEnbW<'a, REG> = crate::BitWriter<'a, REG>; #[doc = "Counter Status Selection\n\nValue on reset: 0"] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] pub enum StatusSel { diff --git a/va416xx/src/tim0/perid.rs b/va416xx/src/tim0/perid.rs index d48a2d8..c1a7193 100644 --- a/va416xx/src/tim0/perid.rs +++ b/va416xx/src/tim0/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/pwm_value.rs b/va416xx/src/tim0/pwm_value.rs index 0501c17..690a640 100644 --- a/va416xx/src/tim0/pwm_value.rs +++ b/va416xx/src/tim0/pwm_value.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `PWM_VALUE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/pwma_value.rs b/va416xx/src/tim0/pwma_value.rs index 9536145..4a1bf39 100644 --- a/va416xx/src/tim0/pwma_value.rs +++ b/va416xx/src/tim0/pwma_value.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `PWMA_VALUE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/pwmb_value.rs b/va416xx/src/tim0/pwmb_value.rs index 803f9df..20dd4b0 100644 --- a/va416xx/src/tim0/pwmb_value.rs +++ b/va416xx/src/tim0/pwmb_value.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `PWMB_VALUE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/tim0/rst_value.rs b/va416xx/src/tim0/rst_value.rs index 76c0ddb..42a8873 100644 --- a/va416xx/src/tim0/rst_value.rs +++ b/va416xx/src/tim0/rst_value.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `RST_VALUE` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/addr9.rs b/va416xx/src/uart0/addr9.rs index 0c011f2..7cd2716 100644 --- a/va416xx/src/uart0/addr9.rs +++ b/va416xx/src/uart0/addr9.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `ADDR9` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/addr9mask.rs b/va416xx/src/uart0/addr9mask.rs index d130f41..f2b86c6 100644 --- a/va416xx/src/uart0/addr9mask.rs +++ b/va416xx/src/uart0/addr9mask.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `ADDR9MASK` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/data.rs b/va416xx/src/uart0/data.rs index f4f09cb..6a18c04 100644 --- a/va416xx/src/uart0/data.rs +++ b/va416xx/src/uart0/data.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `DATA` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/perid.rs b/va416xx/src/uart0/perid.rs index 391ae4a..9f5c112 100644 --- a/va416xx/src/uart0/perid.rs +++ b/va416xx/src/uart0/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/rxfifoirqtrg.rs b/va416xx/src/uart0/rxfifoirqtrg.rs index 8376847..450e256 100644 --- a/va416xx/src/uart0/rxfifoirqtrg.rs +++ b/va416xx/src/uart0/rxfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `RXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/rxfifortstrg.rs b/va416xx/src/uart0/rxfifortstrg.rs index 2938f15..06971f4 100644 --- a/va416xx/src/uart0/rxfifortstrg.rs +++ b/va416xx/src/uart0/rxfifortstrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `RXFIFORTSTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/state.rs b/va416xx/src/uart0/state.rs index ecdf97f..71c172a 100644 --- a/va416xx/src/uart0/state.rs +++ b/va416xx/src/uart0/state.rs @@ -1,5 +1,6 @@ #[doc = "Register `STATE` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/uart0/txbreak.rs b/va416xx/src/uart0/txbreak.rs index 5e5002f..f54c610 100644 --- a/va416xx/src/uart0/txbreak.rs +++ b/va416xx/src/uart0/txbreak.rs @@ -1,5 +1,6 @@ #[doc = "Register `TXBREAK` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for crate::generic::Reg { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "(not readable)") diff --git a/va416xx/src/uart0/txfifoirqtrg.rs b/va416xx/src/uart0/txfifoirqtrg.rs index 8d0ae92..00aa42f 100644 --- a/va416xx/src/uart0/txfifoirqtrg.rs +++ b/va416xx/src/uart0/txfifoirqtrg.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `TXFIFOIRQTRG` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/utility/perid.rs b/va416xx/src/utility/perid.rs index 8884bb7..89f37f1 100644 --- a/va416xx/src/utility/perid.rs +++ b/va416xx/src/utility/perid.rs @@ -1,5 +1,6 @@ #[doc = "Register `PERID` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/utility/synd_check_32_44_data.rs b/va416xx/src/utility/synd_check_32_44_data.rs index ca46fcd..18aceaf 100644 --- a/va416xx/src/utility/synd_check_32_44_data.rs +++ b/va416xx/src/utility/synd_check_32_44_data.rs @@ -1,5 +1,6 @@ #[doc = "Register `SYND_CHECK_32_44_DATA` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/utility/synd_check_32_52_data.rs b/va416xx/src/utility/synd_check_32_52_data.rs index 61c912c..b16658d 100644 --- a/va416xx/src/utility/synd_check_32_52_data.rs +++ b/va416xx/src/utility/synd_check_32_52_data.rs @@ -1,5 +1,6 @@ #[doc = "Register `SYND_CHECK_32_52_DATA` reader"] pub type R = crate::R; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits()) diff --git a/va416xx/src/utility/synd_data.rs b/va416xx/src/utility/synd_data.rs index 5ad1d07..07c0ab5 100644 --- a/va416xx/src/utility/synd_data.rs +++ b/va416xx/src/utility/synd_data.rs @@ -2,6 +2,7 @@ pub type R = crate::R; #[doc = "Register `SYND_DATA` writer"] pub type W = crate::W; +#[cfg(feature = "debug")] impl core::fmt::Debug for R { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.bits())