Skip to content

Commit

Permalink
S3: Remove SAR prefix in SENS peripheral (#45)
Browse files Browse the repository at this point in the history
* S3: Remove SAR prefix in SENS peripheral

* S3: regenerate the PAC for SENS peripheral and bump version number for S3
  • Loading branch information
JurajSadel authored Nov 2, 2022
1 parent a774821 commit 48dfeaf
Show file tree
Hide file tree
Showing 16 changed files with 375 additions and 359 deletions.
2 changes: 1 addition & 1 deletion esp32s3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "esp32s3"
version = "0.5.0"
version = "0.6.0"
authors = ["Jesse Braham <[email protected]>"]
edition = "2021"
rust-version = "1.60"
Expand Down
16 changes: 8 additions & 8 deletions esp32s3/src/apb_saradc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct RegisterBlock {
#[doc = "0x34 - configure apb saradc pattern table"]
pub sar2_patt_tab4: SAR2_PATT_TAB4,
#[doc = "0x38 - configure apb saradc arbit"]
pub apb_adc_arb_ctrl: APB_ADC_ARB_CTRL,
pub arb_ctrl: ARB_CTRL,
#[doc = "0x3c - configure apb saradc arbit"]
pub filter_ctrl0: FILTER_CTRL0,
#[doc = "0x40 - get apb saradc sample data"]
Expand All @@ -53,7 +53,7 @@ pub struct RegisterBlock {
#[doc = "0x6c - configure apb saradc dma"]
pub dma_conf: DMA_CONF,
#[doc = "0x70 - configure apb saradc clock"]
pub apb_adc_clkm_conf: APB_ADC_CLKM_CONF,
pub clkm_conf: CLKM_CONF,
_reserved26: [u8; 0x04],
#[doc = "0x78 - get apb saradc2 sample data"]
pub apb_saradc2_data_status: APB_SARADC2_DATA_STATUS,
Expand Down Expand Up @@ -117,10 +117,10 @@ pub mod sar2_patt_tab3;
pub type SAR2_PATT_TAB4 = crate::Reg<sar2_patt_tab4::SAR2_PATT_TAB4_SPEC>;
#[doc = "configure apb saradc pattern table"]
pub mod sar2_patt_tab4;
#[doc = "APB_ADC_ARB_CTRL (rw) register accessor: an alias for `Reg<APB_ADC_ARB_CTRL_SPEC>`"]
pub type APB_ADC_ARB_CTRL = crate::Reg<apb_adc_arb_ctrl::APB_ADC_ARB_CTRL_SPEC>;
#[doc = "ARB_CTRL (rw) register accessor: an alias for `Reg<ARB_CTRL_SPEC>`"]
pub type ARB_CTRL = crate::Reg<arb_ctrl::ARB_CTRL_SPEC>;
#[doc = "configure apb saradc arbit"]
pub mod apb_adc_arb_ctrl;
pub mod arb_ctrl;
#[doc = "FILTER_CTRL0 (rw) register accessor: an alias for `Reg<FILTER_CTRL0_SPEC>`"]
pub type FILTER_CTRL0 = crate::Reg<filter_ctrl0::FILTER_CTRL0_SPEC>;
#[doc = "configure apb saradc arbit"]
Expand Down Expand Up @@ -162,10 +162,10 @@ pub mod int_clr;
pub type DMA_CONF = crate::Reg<dma_conf::DMA_CONF_SPEC>;
#[doc = "configure apb saradc dma"]
pub mod dma_conf;
#[doc = "APB_ADC_CLKM_CONF (rw) register accessor: an alias for `Reg<APB_ADC_CLKM_CONF_SPEC>`"]
pub type APB_ADC_CLKM_CONF = crate::Reg<apb_adc_clkm_conf::APB_ADC_CLKM_CONF_SPEC>;
#[doc = "CLKM_CONF (rw) register accessor: an alias for `Reg<CLKM_CONF_SPEC>`"]
pub type CLKM_CONF = crate::Reg<clkm_conf::CLKM_CONF_SPEC>;
#[doc = "configure apb saradc clock"]
pub mod apb_adc_clkm_conf;
pub mod clkm_conf;
#[doc = "APB_SARADC2_DATA_STATUS (r) register accessor: an alias for `Reg<APB_SARADC2_DATA_STATUS_SPEC>`"]
pub type APB_SARADC2_DATA_STATUS =
crate::Reg<apb_saradc2_data_status::APB_SARADC2_DATA_STATUS_SPEC>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[doc = "Register `APB_ADC_ARB_CTRL` reader"]
pub struct R(crate::R<APB_ADC_ARB_CTRL_SPEC>);
#[doc = "Register `ARB_CTRL` reader"]
pub struct R(crate::R<ARB_CTRL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<APB_ADC_ARB_CTRL_SPEC>;
type Target = crate::R<ARB_CTRL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<APB_ADC_ARB_CTRL_SPEC>> for R {
impl From<crate::R<ARB_CTRL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<APB_ADC_ARB_CTRL_SPEC>) -> Self {
fn from(reader: crate::R<ARB_CTRL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `APB_ADC_ARB_CTRL` writer"]
pub struct W(crate::W<APB_ADC_ARB_CTRL_SPEC>);
#[doc = "Register `ARB_CTRL` writer"]
pub struct W(crate::W<ARB_CTRL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<APB_ADC_ARB_CTRL_SPEC>;
type Target = crate::W<ARB_CTRL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
Expand All @@ -28,52 +28,48 @@ impl core::ops::DerefMut for W {
&mut self.0
}
}
impl From<crate::W<APB_ADC_ARB_CTRL_SPEC>> for W {
impl From<crate::W<ARB_CTRL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<APB_ADC_ARB_CTRL_SPEC>) -> Self {
fn from(writer: crate::W<ARB_CTRL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ADC_ARB_APB_FORCE` reader - adc2 arbiter force to enableapb controller"]
pub type ADC_ARB_APB_FORCE_R = crate::BitReader<bool>;
#[doc = "Field `ADC_ARB_APB_FORCE` writer - adc2 arbiter force to enableapb controller"]
pub type ADC_ARB_APB_FORCE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, bool, O>;
pub type ADC_ARB_APB_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ARB_CTRL_SPEC, bool, O>;
#[doc = "Field `ADC_ARB_RTC_FORCE` reader - adc2 arbiter force to enable rtc controller"]
pub type ADC_ARB_RTC_FORCE_R = crate::BitReader<bool>;
#[doc = "Field `ADC_ARB_RTC_FORCE` writer - adc2 arbiter force to enable rtc controller"]
pub type ADC_ARB_RTC_FORCE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, bool, O>;
pub type ADC_ARB_RTC_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ARB_CTRL_SPEC, bool, O>;
#[doc = "Field `ADC_ARB_WIFI_FORCE` reader - adc2 arbiter force to enable wifi controller"]
pub type ADC_ARB_WIFI_FORCE_R = crate::BitReader<bool>;
#[doc = "Field `ADC_ARB_WIFI_FORCE` writer - adc2 arbiter force to enable wifi controller"]
pub type ADC_ARB_WIFI_FORCE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, bool, O>;
pub type ADC_ARB_WIFI_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ARB_CTRL_SPEC, bool, O>;
#[doc = "Field `ADC_ARB_GRANT_FORCE` reader - adc2 arbiter force grant"]
pub type ADC_ARB_GRANT_FORCE_R = crate::BitReader<bool>;
#[doc = "Field `ADC_ARB_GRANT_FORCE` writer - adc2 arbiter force grant"]
pub type ADC_ARB_GRANT_FORCE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, bool, O>;
pub type ADC_ARB_GRANT_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ARB_CTRL_SPEC, bool, O>;
#[doc = "Field `ADC_ARB_APB_PRIORITY` reader - Set adc2 arbiterapb priority"]
pub type ADC_ARB_APB_PRIORITY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `ADC_ARB_APB_PRIORITY` writer - Set adc2 arbiterapb priority"]
pub type ADC_ARB_APB_PRIORITY_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, u8, u8, 2, O>;
crate::FieldWriter<'a, u32, ARB_CTRL_SPEC, u8, u8, 2, O>;
#[doc = "Field `ADC_ARB_RTC_PRIORITY` reader - Set adc2 arbiter rtc priority"]
pub type ADC_ARB_RTC_PRIORITY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `ADC_ARB_RTC_PRIORITY` writer - Set adc2 arbiter rtc priority"]
pub type ADC_ARB_RTC_PRIORITY_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, u8, u8, 2, O>;
crate::FieldWriter<'a, u32, ARB_CTRL_SPEC, u8, u8, 2, O>;
#[doc = "Field `ADC_ARB_WIFI_PRIORITY` reader - Set adc2 arbiter wifi priority"]
pub type ADC_ARB_WIFI_PRIORITY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `ADC_ARB_WIFI_PRIORITY` writer - Set adc2 arbiter wifi priority"]
pub type ADC_ARB_WIFI_PRIORITY_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, u8, u8, 2, O>;
crate::FieldWriter<'a, u32, ARB_CTRL_SPEC, u8, u8, 2, O>;
#[doc = "Field `ADC_ARB_FIX_PRIORITY` reader - adc2 arbiter uses fixed priority"]
pub type ADC_ARB_FIX_PRIORITY_R = crate::BitReader<bool>;
#[doc = "Field `ADC_ARB_FIX_PRIORITY` writer - adc2 arbiter uses fixed priority"]
pub type ADC_ARB_FIX_PRIORITY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, APB_ADC_ARB_CTRL_SPEC, bool, O>;
crate::BitWriter<'a, u32, ARB_CTRL_SPEC, bool, O>;
impl R {
#[doc = "Bit 2 - adc2 arbiter force to enableapb controller"]
#[inline(always)]
Expand Down Expand Up @@ -164,21 +160,21 @@ impl W {
self
}
}
#[doc = "configure apb saradc arbit\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 [apb_adc_arb_ctrl](index.html) module"]
pub struct APB_ADC_ARB_CTRL_SPEC;
impl crate::RegisterSpec for APB_ADC_ARB_CTRL_SPEC {
#[doc = "configure apb saradc arbit\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 [arb_ctrl](index.html) module"]
pub struct ARB_CTRL_SPEC;
impl crate::RegisterSpec for ARB_CTRL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [apb_adc_arb_ctrl::R](R) reader structure"]
impl crate::Readable for APB_ADC_ARB_CTRL_SPEC {
#[doc = "`read()` method returns [arb_ctrl::R](R) reader structure"]
impl crate::Readable for ARB_CTRL_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [apb_adc_arb_ctrl::W](W) writer structure"]
impl crate::Writable for APB_ADC_ARB_CTRL_SPEC {
#[doc = "`write(|w| ..)` method takes [arb_ctrl::W](W) writer structure"]
impl crate::Writable for ARB_CTRL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets APB_ADC_ARB_CTRL to value 0x0900"]
impl crate::Resettable for APB_ADC_ARB_CTRL_SPEC {
#[doc = "`reset()` method sets ARB_CTRL to value 0x0900"]
impl crate::Resettable for ARB_CTRL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0900
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[doc = "Register `APB_ADC_CLKM_CONF` reader"]
pub struct R(crate::R<APB_ADC_CLKM_CONF_SPEC>);
#[doc = "Register `CLKM_CONF` reader"]
pub struct R(crate::R<CLKM_CONF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<APB_ADC_CLKM_CONF_SPEC>;
type Target = crate::R<CLKM_CONF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<APB_ADC_CLKM_CONF_SPEC>> for R {
impl From<crate::R<CLKM_CONF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<APB_ADC_CLKM_CONF_SPEC>) -> Self {
fn from(reader: crate::R<CLKM_CONF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `APB_ADC_CLKM_CONF` writer"]
pub struct W(crate::W<APB_ADC_CLKM_CONF_SPEC>);
#[doc = "Register `CLKM_CONF` writer"]
pub struct W(crate::W<CLKM_CONF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<APB_ADC_CLKM_CONF_SPEC>;
type Target = crate::W<CLKM_CONF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
Expand All @@ -28,36 +28,33 @@ impl core::ops::DerefMut for W {
&mut self.0
}
}
impl From<crate::W<APB_ADC_CLKM_CONF_SPEC>> for W {
impl From<crate::W<CLKM_CONF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<APB_ADC_CLKM_CONF_SPEC>) -> Self {
fn from(writer: crate::W<CLKM_CONF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CLKM_DIV_NUM` reader - Integral clock divider value"]
pub type CLKM_DIV_NUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CLKM_DIV_NUM` writer - Integral clock divider value"]
pub type CLKM_DIV_NUM_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_CLKM_CONF_SPEC, u8, u8, 8, O>;
crate::FieldWriter<'a, u32, CLKM_CONF_SPEC, u8, u8, 8, O>;
#[doc = "Field `CLKM_DIV_B` reader - Fractional clock divider numerator value"]
pub type CLKM_DIV_B_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CLKM_DIV_B` writer - Fractional clock divider numerator value"]
pub type CLKM_DIV_B_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_CLKM_CONF_SPEC, u8, u8, 6, O>;
pub type CLKM_DIV_B_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKM_CONF_SPEC, u8, u8, 6, O>;
#[doc = "Field `CLKM_DIV_A` reader - Fractional clock divider denominator value"]
pub type CLKM_DIV_A_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CLKM_DIV_A` writer - Fractional clock divider denominator value"]
pub type CLKM_DIV_A_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_CLKM_CONF_SPEC, u8, u8, 6, O>;
pub type CLKM_DIV_A_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKM_CONF_SPEC, u8, u8, 6, O>;
#[doc = "Field `CLK_EN` reader - no public"]
pub type CLK_EN_R = crate::BitReader<bool>;
#[doc = "Field `CLK_EN` writer - no public"]
pub type CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, APB_ADC_CLKM_CONF_SPEC, bool, O>;
pub type CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKM_CONF_SPEC, bool, O>;
#[doc = "Field `CLK_SEL` reader - Set this bit to enable clk_apll"]
pub type CLK_SEL_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CLK_SEL` writer - Set this bit to enable clk_apll"]
pub type CLK_SEL_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, APB_ADC_CLKM_CONF_SPEC, u8, u8, 2, O>;
pub type CLK_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKM_CONF_SPEC, u8, u8, 2, O>;
impl R {
#[doc = "Bits 0:7 - Integral clock divider value"]
#[inline(always)]
Expand Down Expand Up @@ -118,21 +115,21 @@ impl W {
self
}
}
#[doc = "configure apb saradc clock\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 [apb_adc_clkm_conf](index.html) module"]
pub struct APB_ADC_CLKM_CONF_SPEC;
impl crate::RegisterSpec for APB_ADC_CLKM_CONF_SPEC {
#[doc = "configure apb saradc clock\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 [clkm_conf](index.html) module"]
pub struct CLKM_CONF_SPEC;
impl crate::RegisterSpec for CLKM_CONF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [apb_adc_clkm_conf::R](R) reader structure"]
impl crate::Readable for APB_ADC_CLKM_CONF_SPEC {
#[doc = "`read()` method returns [clkm_conf::R](R) reader structure"]
impl crate::Readable for CLKM_CONF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [apb_adc_clkm_conf::W](W) writer structure"]
impl crate::Writable for APB_ADC_CLKM_CONF_SPEC {
#[doc = "`write(|w| ..)` method takes [clkm_conf::W](W) writer structure"]
impl crate::Writable for CLKM_CONF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets APB_ADC_CLKM_CONF to value 0x04"]
impl crate::Resettable for APB_ADC_CLKM_CONF_SPEC {
#[doc = "`reset()` method sets CLKM_CONF to value 0x04"]
impl crate::Resettable for CLKM_CONF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x04
Expand Down
Loading

0 comments on commit 48dfeaf

Please sign in to comment.