File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ macro_rules! hal {
109109 // SSI: set nss high = master mode
110110 // CRCEN: hardware CRC calculation disabled
111111 // BIDIMODE: 2 line unidirectional (full duplex)
112- spi. cr1. write( |w|
112+ spi. cr1. write( |w| unsafe {
113113 w. cpha( )
114114 . bit( mode. phase == Phase :: CaptureOnSecondTransition )
115115 . cpol( )
@@ -130,7 +130,7 @@ macro_rules! hal {
130130 . clear_bit( )
131131 . bidimode( )
132132 . clear_bit( )
133- ) ;
133+ } ) ;
134134
135135 Spi { spi, pins }
136136 }
@@ -190,7 +190,7 @@ macro_rules! hal {
190190 /// Change the baud rate of the SPI
191191 pub fn reclock( & mut self , freq: Hertz , clocks: Clocks ) {
192192 self . spi. cr1. modify( |_, w| w. spe( ) . clear_bit( ) ) ;
193- self . spi. cr1. modify( |_, w| {
193+ self . spi. cr1. modify( |_, w| unsafe {
194194 w. br( ) . bits( Self :: compute_baud_rate( clocks. $pclkX( ) , freq) ) ;
195195 w. spe( ) . set_bit( )
196196 } ) ;
You can’t perform that action at this time.
0 commit comments