File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010### Added
1111
1212 - ` i2c_scanner ` example [ #758 ]
13+ - Enable ` sdio ` for stm32f446
1314 - port LTDC implementation and example from stm32f7xx-hal [ #731 ]
1415 - IrDA mode for USARTs
1516
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ gpio-f446 = [
374374 " otg-hs" ,
375375 " sai1" ,
376376 " sai2" ,
377- # "sdio",
377+ " sdio" ,
378378 " spi3" ,
379379 " spi4" ,
380380 " spdifrx" ,
Original file line number Diff line number Diff line change @@ -352,7 +352,10 @@ impl<P: SdioPeripheral> Sdio<P> {
352352 self . sdio . dlen ( ) . write ( |w| w. datalength ( ) . set ( length_bytes) ) ;
353353 // Transfer
354354 self . sdio . dctrl ( ) . write ( |w| {
355- w. dblocksize ( ) . set ( block_size) ; // 2^n bytes block size
355+ #[ allow( unused_unsafe) ]
356+ unsafe {
357+ w. dblocksize ( ) . bits ( block_size) ;
358+ } // 2^n bytes block size
356359 w. dtdir ( ) . variant ( dtdir) ;
357360 w. dten ( ) . enabled ( ) // Enable transfer
358361 } ) ;
@@ -755,6 +758,7 @@ fn clear_all_interrupts(icr: &pac::sdio::ICR) {
755758 icr. modify ( |_, w| {
756759 w. ccrcfailc ( ) . set_bit ( ) ;
757760 w. ctimeoutc ( ) . set_bit ( ) ;
761+ #[ cfg( not( feature = "stm32f446" ) ) ]
758762 w. ceataendc ( ) . set_bit ( ) ;
759763 w. cmdrendc ( ) . set_bit ( ) ;
760764 w. cmdsentc ( ) . set_bit ( ) ;
@@ -763,6 +767,7 @@ fn clear_all_interrupts(icr: &pac::sdio::ICR) {
763767 w. dcrcfailc ( ) . set_bit ( ) ;
764768 w. dtimeoutc ( ) . set_bit ( ) ;
765769 w. sdioitc ( ) . set_bit ( ) ;
770+ #[ cfg( not( feature = "stm32f446" ) ) ]
766771 w. stbiterrc ( ) . set_bit ( ) ;
767772 w. rxoverrc ( ) . set_bit ( ) ;
768773 w. txunderrc ( ) . set_bit ( )
You can’t perform that action at this time.
0 commit comments