-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
2,290 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#[repr(C)] | ||
#[cfg_attr(feature = "impl-register-debug", derive(Debug))] | ||
#[doc = "Register block"] | ||
pub struct RegisterBlock { | ||
i2c0_conf: I2C0_CONF, | ||
ana_config: ANA_CONFIG, | ||
ana_config2: ANA_CONFIG2, | ||
} | ||
impl RegisterBlock { | ||
#[doc = "0x00 - I2C0_CONF register"] | ||
#[inline(always)] | ||
pub const fn i2c0_conf(&self) -> &I2C0_CONF { | ||
&self.i2c0_conf | ||
} | ||
#[doc = "0x04 - ANA_CONFIG register"] | ||
#[inline(always)] | ||
pub const fn ana_config(&self) -> &ANA_CONFIG { | ||
&self.ana_config | ||
} | ||
#[doc = "0x08 - ANA_CONFIG2 register"] | ||
#[inline(always)] | ||
pub const fn ana_config2(&self) -> &ANA_CONFIG2 { | ||
&self.ana_config2 | ||
} | ||
} | ||
#[doc = "I2C0_CONF (rw) register accessor: I2C0_CONF register\n\nYou can [`read`](crate::Reg::read) this register and get [`i2c0_conf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`i2c0_conf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@i2c0_conf`] module"] | ||
pub type I2C0_CONF = crate::Reg<i2c0_conf::I2C0_CONF_SPEC>; | ||
#[doc = "I2C0_CONF register"] | ||
pub mod i2c0_conf; | ||
#[doc = "ANA_CONFIG (rw) register accessor: ANA_CONFIG register\n\nYou can [`read`](crate::Reg::read) this register and get [`ana_config::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ana_config::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ana_config`] module"] | ||
pub type ANA_CONFIG = crate::Reg<ana_config::ANA_CONFIG_SPEC>; | ||
#[doc = "ANA_CONFIG register"] | ||
pub mod ana_config; | ||
#[doc = "ANA_CONFIG2 (rw) register accessor: ANA_CONFIG2 register\n\nYou can [`read`](crate::Reg::read) this register and get [`ana_config2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ana_config2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ana_config2`] module"] | ||
pub type ANA_CONFIG2 = crate::Reg<ana_config2::ANA_CONFIG2_SPEC>; | ||
#[doc = "ANA_CONFIG2 register"] | ||
pub mod ana_config2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#[doc = "Register `ANA_CONFIG` reader"] | ||
pub type R = crate::R<ANA_CONFIG_SPEC>; | ||
#[doc = "Register `ANA_CONFIG` writer"] | ||
pub type W = crate::W<ANA_CONFIG_SPEC>; | ||
#[doc = "Field `SAR_FORCE_PU` reader - ?"] | ||
pub type SAR_FORCE_PU_R = crate::BitReader; | ||
#[doc = "Field `SAR_FORCE_PU` writer - ?"] | ||
pub type SAR_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
#[doc = "Field `BBPLL_PD` reader - Clear to enable BBPLL"] | ||
pub type BBPLL_PD_R = crate::BitReader; | ||
#[doc = "Field `BBPLL_PD` writer - Clear to enable BBPLL"] | ||
pub type BBPLL_PD_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
#[doc = "Field `SAR_FORCE_PD` reader - ?"] | ||
pub type SAR_FORCE_PD_R = crate::BitReader; | ||
#[doc = "Field `SAR_FORCE_PD` writer - ?"] | ||
pub type SAR_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
impl R { | ||
#[doc = "Bit 16 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pu(&self) -> SAR_FORCE_PU_R { | ||
SAR_FORCE_PU_R::new(((self.bits >> 16) & 1) != 0) | ||
} | ||
#[doc = "Bit 17 - Clear to enable BBPLL"] | ||
#[inline(always)] | ||
pub fn bbpll_pd(&self) -> BBPLL_PD_R { | ||
BBPLL_PD_R::new(((self.bits >> 17) & 1) != 0) | ||
} | ||
#[doc = "Bit 18 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pd(&self) -> SAR_FORCE_PD_R { | ||
SAR_FORCE_PD_R::new(((self.bits >> 18) & 1) != 0) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("ANA_CONFIG") | ||
.field("bbpll_pd", &self.bbpll_pd()) | ||
.field("sar_force_pd", &self.sar_force_pd()) | ||
.field("sar_force_pu", &self.sar_force_pu()) | ||
.finish() | ||
} | ||
} | ||
impl W { | ||
#[doc = "Bit 16 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pu(&mut self) -> SAR_FORCE_PU_W<ANA_CONFIG_SPEC> { | ||
SAR_FORCE_PU_W::new(self, 16) | ||
} | ||
#[doc = "Bit 17 - Clear to enable BBPLL"] | ||
#[inline(always)] | ||
pub fn bbpll_pd(&mut self) -> BBPLL_PD_W<ANA_CONFIG_SPEC> { | ||
BBPLL_PD_W::new(self, 17) | ||
} | ||
#[doc = "Bit 18 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pd(&mut self) -> SAR_FORCE_PD_W<ANA_CONFIG_SPEC> { | ||
SAR_FORCE_PD_W::new(self, 18) | ||
} | ||
} | ||
#[doc = "ANA_CONFIG register\n\nYou can [`read`](crate::Reg::read) this register and get [`ana_config::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ana_config::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct ANA_CONFIG_SPEC; | ||
impl crate::RegisterSpec for ANA_CONFIG_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`ana_config::R`](R) reader structure"] | ||
impl crate::Readable for ANA_CONFIG_SPEC {} | ||
#[doc = "`write(|w| ..)` method takes [`ana_config::W`](W) writer structure"] | ||
impl crate::Writable for ANA_CONFIG_SPEC { | ||
type Safety = crate::Unsafe; | ||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
} | ||
#[doc = "`reset()` method sets ANA_CONFIG to value 0"] | ||
impl crate::Resettable for ANA_CONFIG_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#[doc = "Register `ANA_CONFIG2` reader"] | ||
pub type R = crate::R<ANA_CONFIG2_SPEC>; | ||
#[doc = "Register `ANA_CONFIG2` writer"] | ||
pub type W = crate::W<ANA_CONFIG2_SPEC>; | ||
#[doc = "Field `SAR_FORCE_PU` reader - ?"] | ||
pub type SAR_FORCE_PU_R = crate::BitReader; | ||
#[doc = "Field `SAR_FORCE_PU` writer - ?"] | ||
pub type SAR_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
#[doc = "Field `SAR_FORCE_PD` reader - ?"] | ||
pub type SAR_FORCE_PD_R = crate::BitReader; | ||
#[doc = "Field `SAR_FORCE_PD` writer - ?"] | ||
pub type SAR_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
impl R { | ||
#[doc = "Bit 16 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pu(&self) -> SAR_FORCE_PU_R { | ||
SAR_FORCE_PU_R::new(((self.bits >> 16) & 1) != 0) | ||
} | ||
#[doc = "Bit 18 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pd(&self) -> SAR_FORCE_PD_R { | ||
SAR_FORCE_PD_R::new(((self.bits >> 18) & 1) != 0) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("ANA_CONFIG2") | ||
.field("sar_force_pd", &self.sar_force_pd()) | ||
.field("sar_force_pu", &self.sar_force_pu()) | ||
.finish() | ||
} | ||
} | ||
impl W { | ||
#[doc = "Bit 16 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pu(&mut self) -> SAR_FORCE_PU_W<ANA_CONFIG2_SPEC> { | ||
SAR_FORCE_PU_W::new(self, 16) | ||
} | ||
#[doc = "Bit 18 - ?"] | ||
#[inline(always)] | ||
pub fn sar_force_pd(&mut self) -> SAR_FORCE_PD_W<ANA_CONFIG2_SPEC> { | ||
SAR_FORCE_PD_W::new(self, 18) | ||
} | ||
} | ||
#[doc = "ANA_CONFIG2 register\n\nYou can [`read`](crate::Reg::read) this register and get [`ana_config2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ana_config2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct ANA_CONFIG2_SPEC; | ||
impl crate::RegisterSpec for ANA_CONFIG2_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`ana_config2::R`](R) reader structure"] | ||
impl crate::Readable for ANA_CONFIG2_SPEC {} | ||
#[doc = "`write(|w| ..)` method takes [`ana_config2::W`](W) writer structure"] | ||
impl crate::Writable for ANA_CONFIG2_SPEC { | ||
type Safety = crate::Unsafe; | ||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
} | ||
#[doc = "`reset()` method sets ANA_CONFIG2 to value 0"] | ||
impl crate::Resettable for ANA_CONFIG2_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#[doc = "Register `I2C0_CONF` reader"] | ||
pub type R = crate::R<I2C0_CONF_SPEC>; | ||
#[doc = "Register `I2C0_CONF` writer"] | ||
pub type W = crate::W<I2C0_CONF_SPEC>; | ||
#[doc = "Field `BBPLL_STOP_FORCE_HIGH` reader - ?"] | ||
pub type BBPLL_STOP_FORCE_HIGH_R = crate::BitReader; | ||
#[doc = "Field `BBPLL_STOP_FORCE_HIGH` writer - ?"] | ||
pub type BBPLL_STOP_FORCE_HIGH_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
#[doc = "Field `BBPLL_STOP_FORCE_LOW` reader - ?"] | ||
pub type BBPLL_STOP_FORCE_LOW_R = crate::BitReader; | ||
#[doc = "Field `BBPLL_STOP_FORCE_LOW` writer - ?"] | ||
pub type BBPLL_STOP_FORCE_LOW_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
#[doc = "Field `BBPLL_CAL_DONE` reader - ?"] | ||
pub type BBPLL_CAL_DONE_R = crate::BitReader; | ||
#[doc = "Field `BBPLL_CAL_DONE` writer - ?"] | ||
pub type BBPLL_CAL_DONE_W<'a, REG> = crate::BitWriter<'a, REG>; | ||
impl R { | ||
#[doc = "Bit 2 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_stop_force_high(&self) -> BBPLL_STOP_FORCE_HIGH_R { | ||
BBPLL_STOP_FORCE_HIGH_R::new(((self.bits >> 2) & 1) != 0) | ||
} | ||
#[doc = "Bit 3 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_stop_force_low(&self) -> BBPLL_STOP_FORCE_LOW_R { | ||
BBPLL_STOP_FORCE_LOW_R::new(((self.bits >> 3) & 1) != 0) | ||
} | ||
#[doc = "Bit 24 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_cal_done(&self) -> BBPLL_CAL_DONE_R { | ||
BBPLL_CAL_DONE_R::new(((self.bits >> 24) & 1) != 0) | ||
} | ||
} | ||
#[cfg(feature = "impl-register-debug")] | ||
impl core::fmt::Debug for R { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
f.debug_struct("I2C0_CONF") | ||
.field("bbpll_stop_force_high", &self.bbpll_stop_force_high()) | ||
.field("bbpll_stop_force_low", &self.bbpll_stop_force_low()) | ||
.field("bbpll_cal_done", &self.bbpll_cal_done()) | ||
.finish() | ||
} | ||
} | ||
impl W { | ||
#[doc = "Bit 2 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_stop_force_high(&mut self) -> BBPLL_STOP_FORCE_HIGH_W<I2C0_CONF_SPEC> { | ||
BBPLL_STOP_FORCE_HIGH_W::new(self, 2) | ||
} | ||
#[doc = "Bit 3 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_stop_force_low(&mut self) -> BBPLL_STOP_FORCE_LOW_W<I2C0_CONF_SPEC> { | ||
BBPLL_STOP_FORCE_LOW_W::new(self, 3) | ||
} | ||
#[doc = "Bit 24 - ?"] | ||
#[inline(always)] | ||
pub fn bbpll_cal_done(&mut self) -> BBPLL_CAL_DONE_W<I2C0_CONF_SPEC> { | ||
BBPLL_CAL_DONE_W::new(self, 24) | ||
} | ||
} | ||
#[doc = "I2C0_CONF register\n\nYou can [`read`](crate::Reg::read) this register and get [`i2c0_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`i2c0_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] | ||
pub struct I2C0_CONF_SPEC; | ||
impl crate::RegisterSpec for I2C0_CONF_SPEC { | ||
type Ux = u32; | ||
} | ||
#[doc = "`read()` method returns [`i2c0_conf::R`](R) reader structure"] | ||
impl crate::Readable for I2C0_CONF_SPEC {} | ||
#[doc = "`write(|w| ..)` method takes [`i2c0_conf::W`](W) writer structure"] | ||
impl crate::Writable for I2C0_CONF_SPEC { | ||
type Safety = crate::Unsafe; | ||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; | ||
} | ||
#[doc = "`reset()` method sets I2C0_CONF to value 0"] | ||
impl crate::Resettable for I2C0_CONF_SPEC { | ||
const RESET_VALUE: u32 = 0; | ||
} |
Oops, something went wrong.