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 {
109
109
// SSI: set nss high = master mode
110
110
// CRCEN: hardware CRC calculation disabled
111
111
// BIDIMODE: 2 line unidirectional (full duplex)
112
- spi. cr1. write( |w|
112
+ spi. cr1. write( |w| unsafe {
113
113
w. cpha( )
114
114
. bit( mode. phase == Phase :: CaptureOnSecondTransition )
115
115
. cpol( )
@@ -130,7 +130,7 @@ macro_rules! hal {
130
130
. clear_bit( )
131
131
. bidimode( )
132
132
. clear_bit( )
133
- ) ;
133
+ } ) ;
134
134
135
135
Spi { spi, pins }
136
136
}
@@ -190,7 +190,7 @@ macro_rules! hal {
190
190
/// Change the baud rate of the SPI
191
191
pub fn reclock( & mut self , freq: Hertz , clocks: Clocks ) {
192
192
self . spi. cr1. modify( |_, w| w. spe( ) . clear_bit( ) ) ;
193
- self . spi. cr1. modify( |_, w| {
193
+ self . spi. cr1. modify( |_, w| unsafe {
194
194
w. br( ) . bits( Self :: compute_baud_rate( clocks. $pclkX( ) , freq) ) ;
195
195
w. spe( ) . set_bit( )
196
196
} ) ;
You can’t perform that action at this time.
0 commit comments