Skip to content

Commit 116a125

Browse files
bors[bot]chrysn
andcommitted
Merge #227
227: Derive common traits for write enums like for read enums r=ryankurte a=chrysn 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 Co-authored-by: chrysn <[email protected]>
2 parents 3c8b5ce + e69f477 commit 116a125

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| util::escape_brackets(&v.doc).to_owned());
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)