@@ -206,7 +206,7 @@ macro_rules! pwm_4_channels {
206206
207207 //NOTE(unsafe) atomic read with no side effects
208208 fn get_duty( & self ) -> u16 {
209- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
209+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
210210 }
211211
212212 //NOTE(unsafe) atomic read with no side effects
@@ -216,7 +216,7 @@ macro_rules! pwm_4_channels {
216216
217217 //NOTE(unsafe) atomic write with no side effects
218218 fn set_duty( & mut self , duty: u16 ) {
219- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
219+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
220220 }
221221 }
222222
@@ -235,7 +235,7 @@ macro_rules! pwm_4_channels {
235235
236236 //NOTE(unsafe) atomic read with no side effects
237237 fn get_duty( & self ) -> u16 {
238- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. read( ) . ccr( ) . bits( ) as u16 }
238+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . read( ) . ccr( ) . bits( ) as u16 }
239239 }
240240
241241 //NOTE(unsafe) atomic read with no side effects
@@ -245,7 +245,7 @@ macro_rules! pwm_4_channels {
245245
246246 //NOTE(unsafe) atomic write with no side effects
247247 fn set_duty( & mut self , duty: u16 ) {
248- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
248+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
249249 }
250250 }
251251
@@ -264,7 +264,7 @@ macro_rules! pwm_4_channels {
264264
265265 //NOTE(unsafe) atomic read with no side effects
266266 fn get_duty( & self ) -> u16 {
267- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. read( ) . ccr( ) . bits( ) as u16 }
267+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . read( ) . ccr( ) . bits( ) as u16 }
268268 }
269269
270270 //NOTE(unsafe) atomic read with no side effects
@@ -274,7 +274,7 @@ macro_rules! pwm_4_channels {
274274
275275 //NOTE(unsafe) atomic write with no side effects
276276 fn set_duty( & mut self , duty: u16 ) {
277- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
277+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
278278 }
279279 }
280280
@@ -293,7 +293,7 @@ macro_rules! pwm_4_channels {
293293
294294 //NOTE(unsafe) atomic read with no side effects
295295 fn get_duty( & self ) -> u16 {
296- unsafe { ( * $TIMX:: ptr( ) ) . ccr4. read( ) . ccr( ) . bits( ) as u16 }
296+ unsafe { ( * $TIMX:: ptr( ) ) . ccr4( ) . read( ) . ccr( ) . bits( ) as u16 }
297297 }
298298
299299 //NOTE(unsafe) atomic read with no side effects
@@ -303,7 +303,7 @@ macro_rules! pwm_4_channels {
303303
304304 //NOTE(unsafe) atomic write with no side effects
305305 fn set_duty( & mut self , duty: u16 ) {
306- unsafe { ( * $TIMX:: ptr( ) ) . ccr4. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
306+ unsafe { ( * $TIMX:: ptr( ) ) . ccr4( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
307307 }
308308 }
309309 ) +
@@ -395,7 +395,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
395395
396396 //NOTE(unsafe) atomic read with no side effects
397397 fn get_duty( & self ) -> u16 {
398- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
398+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
399399 }
400400
401401 //NOTE(unsafe) atomic read with no side effects
@@ -405,7 +405,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
405405
406406 //NOTE(unsafe) atomic write with no side effects
407407 fn set_duty( & mut self , duty: u16 ) {
408- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
408+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
409409 }
410410 }
411411
@@ -424,7 +424,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
424424
425425 //NOTE(unsafe) atomic read with no side effects
426426 fn get_duty( & self ) -> u16 {
427- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
427+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
428428 }
429429
430430 //NOTE(unsafe) atomic read with no side effects
@@ -434,7 +434,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
434434
435435 //NOTE(unsafe) atomic write with no side effects
436436 fn set_duty( & mut self , duty: u16 ) {
437- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
437+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
438438 }
439439 }
440440
@@ -453,7 +453,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
453453
454454 //NOTE(unsafe) atomic read with no side effects
455455 fn get_duty( & self ) -> u16 {
456- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. read( ) . ccr( ) . bits( ) as u16 }
456+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . read( ) . ccr( ) . bits( ) as u16 }
457457 }
458458
459459 //NOTE(unsafe) atomic read with no side effects
@@ -463,7 +463,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
463463
464464 //NOTE(unsafe) atomic write with no side effects
465465 fn set_duty( & mut self , duty: u16 ) {
466- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
466+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
467467 }
468468 }
469469
@@ -482,7 +482,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
482482
483483 //NOTE(unsafe) atomic read with no side effects
484484 fn get_duty( & self ) -> u16 {
485- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. read( ) . ccr( ) . bits( ) as u16 }
485+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . read( ) . ccr( ) . bits( ) as u16 }
486486 }
487487
488488 //NOTE(unsafe) atomic read with no side effects
@@ -492,7 +492,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
492492
493493 //NOTE(unsafe) atomic write with no side effects
494494 fn set_duty( & mut self , duty: u16 ) {
495- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
495+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
496496 }
497497 }
498498
@@ -511,7 +511,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
511511
512512 //NOTE(unsafe) atomic read with no side effects
513513 fn get_duty( & self ) -> u16 {
514- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. read( ) . ccr( ) . bits( ) as u16 }
514+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . read( ) . ccr( ) . bits( ) as u16 }
515515 }
516516
517517 //NOTE(unsafe) atomic read with no side effects
@@ -521,7 +521,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
521521
522522 //NOTE(unsafe) atomic write with no side effects
523523 fn set_duty( & mut self , duty: u16 ) {
524- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
524+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
525525 }
526526 }
527527
@@ -540,7 +540,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
540540
541541 //NOTE(unsafe) atomic read with no side effects
542542 fn get_duty( & self ) -> u16 {
543- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. read( ) . ccr( ) . bits( ) as u16 }
543+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . read( ) . ccr( ) . bits( ) as u16 }
544544 }
545545
546546 //NOTE(unsafe) atomic read with no side effects
@@ -550,7 +550,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
550550
551551 //NOTE(unsafe) atomic write with no side effects
552552 fn set_duty( & mut self , duty: u16 ) {
553- unsafe { ( * $TIMX:: ptr( ) ) . ccr3. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
553+ unsafe { ( * $TIMX:: ptr( ) ) . ccr3( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
554554 }
555555 }
556556
@@ -569,7 +569,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
569569
570570 //NOTE(unsafe) atomic read with no side effects
571571 fn get_duty( & self ) -> u16 {
572- unsafe { ( * $TIMX:: ptr( ) ) . ccr4. read( ) . ccr( ) . bits( ) as u16 }
572+ unsafe { ( * $TIMX:: ptr( ) ) . ccr4( ) . read( ) . ccr( ) . bits( ) as u16 }
573573 }
574574
575575 //NOTE(unsafe) atomic read with no side effects
@@ -579,7 +579,7 @@ macro_rules! pwm_4_channels_with_3_complementary_outputs {
579579
580580 //NOTE(unsafe) atomic write with no side effects
581581 fn set_duty( & mut self , duty: u16 ) {
582- unsafe { ( * $TIMX:: ptr( ) ) . ccr4. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
582+ unsafe { ( * $TIMX:: ptr( ) ) . ccr4( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
583583 }
584584 }
585585 ) +
@@ -666,7 +666,7 @@ macro_rules! pwm_2_channels {
666666
667667 //NOTE(unsafe) atomic read with no side effects
668668 fn get_duty( & self ) -> u16 {
669- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
669+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
670670 }
671671
672672 //NOTE(unsafe) atomic read with no side effects
@@ -676,7 +676,7 @@ macro_rules! pwm_2_channels {
676676
677677 //NOTE(unsafe) atomic write with no side effects
678678 fn set_duty( & mut self , duty: u16 ) {
679- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
679+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
680680 }
681681 }
682682
@@ -695,7 +695,7 @@ macro_rules! pwm_2_channels {
695695
696696 //NOTE(unsafe) atomic read with no side effects
697697 fn get_duty( & self ) -> u16 {
698- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. read( ) . ccr( ) . bits( ) as u16 }
698+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . read( ) . ccr( ) . bits( ) as u16 }
699699 }
700700
701701 //NOTE(unsafe) atomic read with no side effects
@@ -705,7 +705,7 @@ macro_rules! pwm_2_channels {
705705
706706 //NOTE(unsafe) atomic write with no side effects
707707 fn set_duty( & mut self , duty: u16 ) {
708- unsafe { ( * $TIMX:: ptr( ) ) . ccr2. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
708+ unsafe { ( * $TIMX:: ptr( ) ) . ccr2( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
709709 }
710710 }
711711 ) +
@@ -775,7 +775,7 @@ macro_rules! pwm_1_channel {
775775
776776 //NOTE(unsafe) atomic read with no side effects
777777 fn get_duty( & self ) -> u16 {
778- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
778+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
779779 }
780780
781781 //NOTE(unsafe) atomic read with no side effects
@@ -785,7 +785,7 @@ macro_rules! pwm_1_channel {
785785
786786 //NOTE(unsafe) atomic write with no side effects
787787 fn set_duty( & mut self , duty: u16 ) {
788- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
788+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
789789 }
790790 }
791791 ) +
@@ -858,7 +858,7 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
858858
859859 //NOTE(unsafe) atomic read with no side effects
860860 fn get_duty( & self ) -> u16 {
861- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
861+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
862862 }
863863
864864 //NOTE(unsafe) atomic read with no side effects
@@ -868,7 +868,7 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
868868
869869 //NOTE(unsafe) atomic write with no side effects
870870 fn set_duty( & mut self , duty: u16 ) {
871- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
871+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
872872 }
873873 }
874874
@@ -887,7 +887,7 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
887887
888888 //NOTE(unsafe) atomic read with no side effects
889889 fn get_duty( & self ) -> u16 {
890- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. read( ) . ccr( ) . bits( ) as u16 }
890+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . read( ) . ccr( ) . bits( ) as u16 }
891891 }
892892
893893 //NOTE(unsafe) atomic read with no side effects
@@ -897,7 +897,7 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
897897
898898 //NOTE(unsafe) atomic write with no side effects
899899 fn set_duty( & mut self , duty: u16 ) {
900- unsafe { ( * $TIMX:: ptr( ) ) . ccr1. write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
900+ unsafe { ( * $TIMX:: ptr( ) ) . ccr1( ) . write( |w| w. ccr( ) . bits( duty. into( ) ) ) }
901901 }
902902 }
903903 ) +
0 commit comments