From 9b42643ee4ee6172238958300ccf9557480a05ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 22 Nov 2024 11:16:03 +0100 Subject: [PATCH] INT_CLR: Write 1 to clear --- esp32s2/src/copy_dma/int_clr.rs | 18 +++++++++--------- esp32s2/src/crypto_dma/int_clr.rs | 22 +++++++++++----------- esp32s2/svd/patches/copy_dma.yaml | 4 ++++ esp32s2/svd/patches/crypto_dma.yaml | 6 +++++- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/esp32s2/src/copy_dma/int_clr.rs b/esp32s2/src/copy_dma/int_clr.rs index 54538e04e..479f7c27b 100644 --- a/esp32s2/src/copy_dma/int_clr.rs +++ b/esp32s2/src/copy_dma/int_clr.rs @@ -1,21 +1,21 @@ #[doc = "Register `INT_CLR` writer"] pub type W = crate::W; #[doc = "Field `IN_DONE` writer - Set this bit to clear IN_DONE interrupt."] -pub type IN_DONE_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_SUC_EOF` writer - Set this bit to clear IN_SUC_EOF interrupt."] -pub type IN_SUC_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_SUC_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_DONE` writer - Set this bit to clear OUT_DONE interrupt."] -pub type OUT_DONE_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_EOF` writer - Set this bit to clear OUT_EOF interrupt."] -pub type OUT_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_DSCR_ERR` writer - Set this bit to clear IN_DSCR_ERR interrupt."] -pub type IN_DSCR_ERR_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DSCR_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_DSCR_ERR` writer - Set this bit to clear OUT_DSCR_ERR interrupt."] -pub type OUT_DSCR_ERR_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_DSCR_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_DSCR_EMPTY` writer - Set this bit to clear IN_DSCR_EMPTY interrupt."] -pub type IN_DSCR_EMPTY_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DSCR_EMPTY_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_TOTAL_EOF` writer - Set this bit to clear OUT_TOTAL_EOF interrupt."] -pub type OUT_TOTAL_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_TOTAL_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[cfg(feature = "impl-register-debug")] impl core::fmt::Debug for crate::generic::Reg { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { @@ -73,7 +73,7 @@ impl crate::RegisterSpec for INT_CLR_SPEC { impl crate::Writable for INT_CLR_SPEC { type Safety = crate::Unsafe; const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0xff; } #[doc = "`reset()` method sets INT_CLR to value 0"] impl crate::Resettable for INT_CLR_SPEC { diff --git a/esp32s2/src/crypto_dma/int_clr.rs b/esp32s2/src/crypto_dma/int_clr.rs index 73e38f21a..441000186 100644 --- a/esp32s2/src/crypto_dma/int_clr.rs +++ b/esp32s2/src/crypto_dma/int_clr.rs @@ -1,25 +1,25 @@ #[doc = "Register `INT_CLR` writer"] pub type W = crate::W; #[doc = "Field `IN_DONE` writer - Set this bit to clear the IN_DONE interrupt."] -pub type IN_DONE_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_SUC_EOF` writer - Set this bit to clear the IN_SUC_EOF interrupt."] -pub type IN_SUC_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_SUC_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_ERR_EOF` writer - Set this bit to clear the IN_ERR_EOF interrupt."] -pub type IN_ERR_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_ERR_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_DONE` writer - Set this bit to clear the OUT_DONE interrupt."] -pub type OUT_DONE_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_EOF` writer - Set this bit to clear the OUT_EOF interrupt."] -pub type OUT_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_DSCR_ERR` writer - Set this bit to clear the IN_DSCR_ERR interrupt."] -pub type IN_DSCR_ERR_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DSCR_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_DSCR_ERR` writer - Set this bit to clear the OUT_DSCR_ERR interrupt."] -pub type OUT_DSCR_ERR_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_DSCR_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `IN_DSCR_EMPTY` writer - Set this bit to clear the IN_DSCR_EMPTY interrupt."] -pub type IN_DSCR_EMPTY_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type IN_DSCR_EMPTY_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `OUT_TOTAL_EOF` writer - Set this bit to clear the OUT_TOTAL_EOF interrupt."] -pub type OUT_TOTAL_EOF_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type OUT_TOTAL_EOF_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[doc = "Field `INFIFO_FULL_WM` writer - Set this bit to clear the INFIFO_FULL_WM interrupt."] -pub type INFIFO_FULL_WM_W<'a, REG> = crate::BitWriter<'a, REG>; +pub type INFIFO_FULL_WM_W<'a, REG> = crate::BitWriter1C<'a, REG>; #[cfg(feature = "impl-register-debug")] impl core::fmt::Debug for crate::generic::Reg { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { @@ -87,7 +87,7 @@ impl crate::RegisterSpec for INT_CLR_SPEC { impl crate::Writable for INT_CLR_SPEC { type Safety = crate::Unsafe; const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x03ff; } #[doc = "`reset()` method sets INT_CLR to value 0"] impl crate::Resettable for INT_CLR_SPEC { diff --git a/esp32s2/svd/patches/copy_dma.yaml b/esp32s2/svd/patches/copy_dma.yaml index 0b6353900..cc3b7e51a 100644 --- a/esp32s2/svd/patches/copy_dma.yaml +++ b/esp32s2/svd/patches/copy_dma.yaml @@ -428,3 +428,7 @@ COPY_DMA: CLK_EN: FORCE: [1, "Force clock on for register"] ON_WRITE: [0, "Support clock only when application writes registers"] + INT_CLR: + _modify: + "*": + modifiedWriteValues: oneToClear diff --git a/esp32s2/svd/patches/crypto_dma.yaml b/esp32s2/svd/patches/crypto_dma.yaml index 72e53f801..cb156ac4c 100644 --- a/esp32s2/svd/patches/crypto_dma.yaml +++ b/esp32s2/svd/patches/crypto_dma.yaml @@ -608,4 +608,8 @@ CRYPTO_DMA: AES_SHA_SELECT: SELECT: AES: [0, "The AES peripheral uses the Crypto DMA"] - SHA: [1, "The SHA peripheral uses the Crypto DMA"] \ No newline at end of file + SHA: [1, "The SHA peripheral uses the Crypto DMA"] + INT_CLR: + _modify: + "*": + modifiedWriteValues: oneToClear