Skip to content

Commit e69f477

Browse files
committed
Derive common traits for write enums like for read enums
The enums are just values so this should do no harm, and it helps building interfaces around the peripherals that do validation or otherwise pass those values around. Closes: #135
1 parent d5e5b4d commit e69f477

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/generate/register.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ pub fn fields(
685685
let variants_doc = variants.iter().map(|v| &*v.doc);
686686
mod_items.push(quote! {
687687
#[doc = #pc_w_doc]
688+
#[derive(Clone, Copy, Debug, PartialEq)]
688689
pub enum #pc_w {
689690
#(#[doc = #variants_doc]
690691
#variants_pc),*

0 commit comments

Comments
 (0)