Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added POWER register for TWIM peripheral. #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pacs/nrf52832-pac/src/twim0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ pub struct RegisterBlock {
_reserved22: [u8; 0x34],
#[doc = "0x588 - Address used in the TWI transfer"]
pub address: ADDRESS,
_reserved23: [u8; 0x0a70],
#[doc = "0xffc - Peripheral power control register"]
pub per_power: PER_POWER,
}
#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg<TASKS_STARTRX_SPEC>`"]
pub type TASKS_STARTRX = crate::Reg<tasks_startrx::TASKS_STARTRX_SPEC>;
Expand Down Expand Up @@ -158,3 +161,7 @@ pub mod txd;
pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
#[doc = "Address used in the TWI transfer"]
pub mod address;
#[doc = "PER_POWER (rw) register accessor: an alias for `Reg<PER_POWER_SPEC>`"]
pub type PER_POWER = crate::Reg<per_power::PER_POWER_SPEC>;
#[doc = "Peripheral power control register"]
pub mod per_power;
64 changes: 64 additions & 0 deletions pacs/nrf52832-pac/src/twim0/per_power.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#[doc = "Register `PER_POWER` reader"]
pub struct R(crate::R<PER_POWER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PER_POWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PER_POWER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PER_POWER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PER_POWER` writer"]
pub struct W(crate::W<PER_POWER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PER_POWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PER_POWER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PER_POWER_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Peripheral power control register\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 [per_power](index.html) module"]
pub struct PER_POWER_SPEC;
impl crate::RegisterSpec for PER_POWER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [per_power::R](R) reader structure"]
impl crate::Readable for PER_POWER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [per_power::W](W) writer structure"]
impl crate::Writable for PER_POWER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PER_POWER to value 0"]
impl crate::Resettable for PER_POWER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
6 changes: 6 additions & 0 deletions svds/nrf52832.svd
Original file line number Diff line number Diff line change
Expand Up @@ -11913,6 +11913,12 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
</field>
</fields>
</register>
<register>
<name>PER_POWER</name>
<description>Peripheral power control register</description>
<addressOffset>0xffc</addressOffset>
<access>read-write</access>
</register>
</registers>
</peripheral>
<peripheral>
Expand Down