forked from rp-rs/rp2040-pac
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This currently requires usage of a fork of svd2rust: https://github.com/henkkuli/svd2rust/tree/mark-range
- Loading branch information
Showing
301 changed files
with
550 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
impl<REG: Readable + Writable<Ux = u32> + crate::markers::AtomicMarker> Reg<REG> { | ||
/// Set high every bit in the register that was set in the write proxy. Leave other bits | ||
/// untouched. The write is done in a single atomic instruction. | ||
#[inline(always)] | ||
pub unsafe fn set_bits<F>(&self, f: F) | ||
where | ||
F: FnOnce(&mut REG::Writer) -> &mut REG::Writer, | ||
{ | ||
let bits = f(&mut REG::Writer::from(W { | ||
bits: Default::default(), | ||
_reg: marker::PhantomData, | ||
})) | ||
.bits; | ||
let alias = (self.register.as_ptr() as usize + 0x2000) as *mut u32; | ||
alias.write_volatile(bits); | ||
} | ||
|
||
/// Clear every bit in the register that was cleared in the write proxy. Leave other bits | ||
/// untouched. The write is done in a single atomic instruction. | ||
#[inline(always)] | ||
pub unsafe fn clear_bits<F>(&self, f: F) | ||
where | ||
F: FnOnce(&mut REG::Writer) -> &mut REG::Writer, | ||
{ | ||
let bits = f(&mut REG::Writer::from(W { | ||
bits: !REG::Ux::default(), | ||
_reg: marker::PhantomData, | ||
})) | ||
.bits; | ||
let alias = (self.register.as_ptr() as usize + 0x3000) as *mut u32; | ||
alias.write_volatile(bits); | ||
} | ||
|
||
/// Toggle every bit in the register that was set in the write proxy. Leave other bits | ||
/// untouched. The write is done in a single atomic instruction. | ||
#[inline(always)] | ||
pub unsafe fn toggle_bits<F>(&self, f: F) | ||
where | ||
F: FnOnce(&mut REG::Writer) -> &mut REG::Writer, | ||
{ | ||
let bits = f(&mut REG::Writer::from(W { | ||
bits: Default::default(), | ||
_reg: marker::PhantomData, | ||
})) | ||
.bits; | ||
let alias = (self.register.as_ptr() as usize + 0x1000) as *mut u32; | ||
alias.write_volatile(bits); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -435,3 +435,4 @@ impl crate::Resettable for CS_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for CS_SPEC {} |
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 |
---|---|---|
|
@@ -145,3 +145,4 @@ impl crate::Resettable for DIV_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for DIV_SPEC {} |
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 |
---|---|---|
|
@@ -447,3 +447,4 @@ impl crate::Resettable for FCS_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FCS_SPEC {} |
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 |
---|---|---|
|
@@ -75,3 +75,4 @@ impl crate::Resettable for FIFO_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FIFO_SPEC {} |
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 |
---|---|---|
|
@@ -119,3 +119,4 @@ impl crate::Resettable for INTE_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTE_SPEC {} |
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 |
---|---|---|
|
@@ -119,3 +119,4 @@ impl crate::Resettable for INTF_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTF_SPEC {} |
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 |
---|---|---|
|
@@ -57,3 +57,4 @@ impl crate::Resettable for INTR_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTR_SPEC {} |
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 |
---|---|---|
|
@@ -57,3 +57,4 @@ impl crate::Resettable for INTS_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTS_SPEC {} |
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 |
---|---|---|
|
@@ -55,3 +55,4 @@ impl crate::Resettable for RESULT_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for RESULT_SPEC {} |
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 |
---|---|---|
|
@@ -113,3 +113,4 @@ impl crate::Resettable for PERFCTR0_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFCTR0_SPEC {} |
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 |
---|---|---|
|
@@ -113,3 +113,4 @@ impl crate::Resettable for PERFCTR1_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFCTR1_SPEC {} |
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 |
---|---|---|
|
@@ -113,3 +113,4 @@ impl crate::Resettable for PERFCTR2_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFCTR2_SPEC {} |
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 |
---|---|---|
|
@@ -113,3 +113,4 @@ impl crate::Resettable for PERFCTR3_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFCTR3_SPEC {} |
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 |
---|---|---|
|
@@ -390,3 +390,4 @@ impl crate::Resettable for PERFSEL0_SPEC { | |
0x1f | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFSEL0_SPEC {} |
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 |
---|---|---|
|
@@ -390,3 +390,4 @@ impl crate::Resettable for PERFSEL1_SPEC { | |
0x1f | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFSEL1_SPEC {} |
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 |
---|---|---|
|
@@ -390,3 +390,4 @@ impl crate::Resettable for PERFSEL2_SPEC { | |
0x1f | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFSEL2_SPEC {} |
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 |
---|---|---|
|
@@ -390,3 +390,4 @@ impl crate::Resettable for PERFSEL3_SPEC { | |
0x1f | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for PERFSEL3_SPEC {} |
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -675,3 +675,4 @@ impl crate::Resettable for ENABLED0_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for ENABLED0_SPEC {} |
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 |
---|---|---|
|
@@ -335,3 +335,4 @@ impl crate::Resettable for ENABLED1_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for ENABLED1_SPEC {} |
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 |
---|---|---|
|
@@ -106,3 +106,4 @@ impl crate::Resettable for FC0_DELAY_SPEC { | |
0x01 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_DELAY_SPEC {} |
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 |
---|---|---|
|
@@ -105,3 +105,4 @@ impl crate::Resettable for FC0_MIN_KHZ_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_MIN_KHZ_SPEC {} |
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 |
---|---|---|
|
@@ -105,3 +105,4 @@ impl crate::Resettable for FC0_REF_KHZ_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_REF_KHZ_SPEC {} |
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 |
---|---|---|
|
@@ -75,3 +75,4 @@ impl crate::Resettable for FC0_RESULT_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_RESULT_SPEC {} |
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 |
---|---|---|
|
@@ -313,3 +313,4 @@ impl crate::Resettable for FC0_SRC_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_SRC_SPEC {} |
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 |
---|---|---|
|
@@ -195,3 +195,4 @@ impl crate::Resettable for FC0_STATUS_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for FC0_STATUS_SPEC {} |
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 |
---|---|---|
|
@@ -115,3 +115,4 @@ impl crate::Resettable for INTE_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTE_SPEC {} |
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 |
---|---|---|
|
@@ -115,3 +115,4 @@ impl crate::Resettable for INTF_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTF_SPEC {} |
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 |
---|---|---|
|
@@ -55,3 +55,4 @@ impl crate::Resettable for INTR_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTR_SPEC {} |
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 |
---|---|---|
|
@@ -55,3 +55,4 @@ impl crate::Resettable for INTS_SPEC { | |
0 | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for INTS_SPEC {} |
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
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 |
---|---|---|
|
@@ -773,3 +773,4 @@ impl crate::Resettable for WAKE_EN1_SPEC { | |
0x7fff | ||
} | ||
} | ||
impl crate::markers::AtomicMarker for WAKE_EN1_SPEC {} |
Oops, something went wrong.