Commit 29129c0
Merge #476
476: Fix derivedFrom enumerated values r=therealprof a=couchand
derivedFrom FieldReaders should always be a type alias for the base FieldReader, rather than each their own newtype.
~I believe this fixes #474, however I'm having trouble getting a working development environment set up for the `esp32` project.~
~@MabezDev, would you mind giving this a spin and posting a diff of the generated code?~
Figured out my issue, the generated code looks good, e.g.:
```diff
diff --git a/src/rtccntl/wdtconfig0.rs b/src/rtccntl/wdtconfig0.rs
index 6851bff..089e4e1 100644
--- a/src/rtccntl/wdtconfig0.rs
+++ b/src/rtccntl/wdtconfig0.rs
@@ -186,19 +186,7 @@ impl<'a> WDT_STG0_W<'a> {
#[doc = ""]
pub type WDT_STG1_A = WDT_STG0_A;
#[doc = "Field `WDT_STG1` reader - "]
-pub struct WDT_STG1_R(crate::FieldReader<u8, WDT_STG1_A>);
-impl WDT_STG1_R {
- pub(crate) fn new(bits: u8) -> Self {
- WDT_STG1_R(crate::FieldReader::new(bits))
- }
-}
-impl core::ops::Deref for WDT_STG1_R {
- type Target = crate::FieldReader<u8, WDT_STG1_A>;
- #[inline(always)]
- fn deref(&self) -> &Self::Target {
- &self.0
- }
-}
+pub type WDT_STG1_R = WDT_STG0_R;
#[doc = "Field `WDT_STG1` writer - "]
pub struct WDT_STG1_W<'a> {
w: &'a mut W,
```
Co-authored-by: Andrew Dona-Couch <hi@andrewcou.ch>1 file changed
+7
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 433 | + | |
437 | 434 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
447 | 438 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
457 | 442 | | |
458 | 443 | | |
459 | 444 | | |
| |||
0 commit comments