File tree Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ device-selected = []
4848rt = [" stm32c0/rt" ]
4949stm32c011 = [" stm32c0/stm32c011" , " device-selected" ]
5050stm32c031 = [" stm32c0/stm32c031" , " device-selected" ]
51+ stm32c071 = [" stm32c0/stm32c071" , " device-selected" ]
5152
5253i2c-blocking = []
5354i2c-nonblocking = []
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ pub use stm32c0::stm32c011 as stm32;
2323#[ cfg( feature = "stm32c031" ) ]
2424pub use stm32c0:: stm32c031 as stm32;
2525
26+ #[ cfg( feature = "stm32c071" ) ]
27+ pub use stm32c0:: stm32c071 as stm32;
28+
2629#[ cfg( feature = "rt" ) ]
2730pub use crate :: stm32:: interrupt;
2831
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ macro_rules! opm {
6767 unsafe {
6868 let tim = & * $TIMX:: ptr( ) ;
6969 tim. psc( ) . write( |w| w. psc( ) . bits( psc as u16 ) ) ;
70- tim. arr( ) . write( |w| w. $arr( ) . bits( reload as u16 ) ) ;
70+ tim. arr( ) . write( |w| w. $arr( ) . bits( ( reload as u16 ) . into ( ) ) ) ;
7171 $(
7272 tim. arr. modify( |_, w| w. $arr_h( ) . bits( ( reload >> 16 ) as u16 ) ) ;
7373 ) *
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ macro_rules! pwm {
8888
8989 unsafe {
9090 self . tim. psc( ) . write( |w| w. psc( ) . bits( psc as u16 ) ) ;
91- self . tim. arr( ) . write( |w| w. $arr( ) . bits( arr as u16 ) ) ;
91+ self . tim. arr( ) . write( |w| w. $arr( ) . bits( ( arr as u16 ) . into ( ) ) ) ;
9292 $(
9393 self . tim. arr( ) . modify( |_, w| w. $arr_h( ) . bits( ( arr >> 16 ) as u16 ) ) ;
9494 ) *
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ macro_rules! qei {
8383 type Count = u16 ;
8484
8585 fn count( & self ) -> u16 {
86- self . tim. cnt( ) . read( ) . $cnt( ) . bits( )
86+ self . tim. cnt( ) . read( ) . $cnt( ) . bits( ) as u16
8787 }
8888
8989 fn direction( & self ) -> Direction {
You can’t perform that action at this time.
0 commit comments