File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ where
130
130
/// Writes 0 to a `Writable` register.
131
131
///
132
132
/// Similar to `write`, but unused bits will contain 0.
133
+ ///
134
+ /// # Safety
135
+ ///
136
+ /// Unsafe to use with registers which don't allow to write 0.
133
137
#[ inline( always) ]
134
138
pub unsafe fn write_with_zero < F > ( & self , f : F )
135
139
where
@@ -232,6 +236,10 @@ pub struct W<REG: RegisterSpec + ?Sized> {
232
236
233
237
impl < REG : RegisterSpec > W < REG > {
234
238
/// Writes raw bits to the register.
239
+ ///
240
+ /// # Safety
241
+ ///
242
+ /// Read datasheet or reference manual to find what values are allowed to pass.
235
243
#[ inline( always) ]
236
244
pub unsafe fn bits ( & mut self , bits : REG :: Ux ) -> & mut Self {
237
245
self . bits = bits;
You can’t perform that action at this time.
0 commit comments