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
130130 /// Writes 0 to a `Writable` register.
131131 ///
132132 /// 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.
133137 #[ inline( always) ]
134138 pub unsafe fn write_with_zero < F > ( & self , f : F )
135139 where
@@ -232,6 +236,10 @@ pub struct W<REG: RegisterSpec + ?Sized> {
232236
233237impl < REG : RegisterSpec > W < REG > {
234238 /// Writes raw bits to the register.
239+ ///
240+ /// # Safety
241+ ///
242+ /// Read datasheet or reference manual to find what values are allowed to pass.
235243 #[ inline( always) ]
236244 pub unsafe fn bits ( & mut self , bits : REG :: Ux ) -> & mut Self {
237245 self . bits = bits;
You can’t perform that action at this time.
0 commit comments