File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
88## [ Unreleased]
99
1010- Add ` base-address-shift ` config flag
11+ - Add ` write_raw ` to all writtable registers
1112
1213## [ v0.31.5] - 2024-01-04
1314
Original file line number Diff line number Diff line change @@ -203,6 +203,18 @@ impl<REG: Writable> Reg<REG> {
203203 }
204204}
205205
206+ impl < REG : Writable > Reg < REG > {
207+ /// Writes raw value to register.
208+ ///
209+ /// # Safety
210+ ///
211+ /// Unsafe as it passes value without checks.
212+ #[ inline( always) ]
213+ pub unsafe fn write_raw ( & self , bits : REG :: Ux ) {
214+ self . register . set ( bits) ;
215+ }
216+ }
217+
206218impl < REG : Readable + Writable > Reg < REG > {
207219 /// Modifies the contents of the register by reading and then writing it.
208220 ///
@@ -550,7 +562,7 @@ macro_rules! bit_proxy {
550562 pub const fn width( & self ) -> u8 {
551563 Self :: WIDTH
552564 }
553-
565+
554566 /// Field offset
555567 #[ inline( always) ]
556568 pub const fn offset( & self ) -> u8 {
You can’t perform that action at this time.
0 commit comments