@@ -471,7 +471,6 @@ pub mod h0021 {
471
471
}
472
472
473
473
#[ derive( Clone , Copy ) ]
474
- #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
475
474
pub union Argument {
476
475
pub raw : u16 ,
477
476
pub control : args:: Control ,
@@ -486,6 +485,13 @@ pub mod h0021 {
486
485
}
487
486
}
488
487
488
+ #[ cfg( feature = "defmt" ) ]
489
+ impl defmt:: Format for Argument {
490
+ fn format ( & self , fmt : defmt:: Formatter ) {
491
+ defmt:: write!( fmt, "{}" , unsafe { self . raw } )
492
+ }
493
+ }
494
+
489
495
pub mod args {
490
496
use num_enum:: TryFromPrimitive ;
491
497
@@ -741,7 +747,6 @@ pub mod h0050 {
741
747
}
742
748
743
749
#[ derive( Clone , Copy ) ]
744
- #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
745
750
pub union Argument {
746
751
pub raw : u16 ,
747
752
pub led_test_sequence : args:: LedTestSequence ,
@@ -755,6 +760,13 @@ pub mod h0050 {
755
760
}
756
761
}
757
762
763
+ #[ cfg( feature = "defmt" ) ]
764
+ impl defmt:: Format for Argument {
765
+ fn format ( & self , fmt : defmt:: Formatter ) {
766
+ defmt:: write!( fmt, "{}" , unsafe { self . raw } )
767
+ }
768
+ }
769
+
758
770
#[ derive( Clone , Debug ) ]
759
771
#[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
760
772
pub struct Cmd {
@@ -815,7 +827,6 @@ pub mod h0051 {
815
827
}
816
828
817
829
#[ derive( Clone , Copy ) ]
818
- #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
819
830
pub union Argument {
820
831
pub raw : u16 ,
821
832
pub led_test_sequence : args:: LedTestSequence ,
@@ -829,6 +840,13 @@ pub mod h0051 {
829
840
}
830
841
}
831
842
843
+ #[ cfg( feature = "defmt" ) ]
844
+ impl defmt:: Format for Argument {
845
+ fn format ( & self , fmt : defmt:: Formatter ) {
846
+ defmt:: write!( fmt, "{}" , unsafe { self . raw } )
847
+ }
848
+ }
849
+
832
850
#[ derive( Clone , Debug ) ]
833
851
#[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
834
852
pub struct Cmd < const D : usize > {
0 commit comments