Move register writer bits method to end and add doc comment
@@ -82,13 +82,6 @@ pub fn render(
#[doc = #desc]
pub struct W(crate::W<#name_uc_spec>);
- impl W {
- pub unsafe fn bits(&mut self, bits: #rty) -> &mut Self {
- self.0.bits(bits);
- self
- }
- }
-
impl core::ops::Deref for W {
type Target = crate::W<#name_uc_spec>;
@@ -166,6 +159,14 @@ pub fn render(
mod_items.extend(w_impl_items);
+ mod_items.extend(quote! {
+ #[doc = "Writes raw bits to the register."]
+ pub unsafe fn bits(&mut self, bits: #rty) -> &mut Self {
+ self.0.bits(bits);
+ self
+ }
+ });
+
close.to_tokens(&mut mod_items);
}
