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/).
10
10
### Added
11
11
12
12
- ` i2c_scanner ` example [ #758 ]
13
+ - Enable ` sdio ` for stm32f446
13
14
- port LTDC implementation and example from stm32f7xx-hal [ #731 ]
14
15
- IrDA mode for USARTs
15
16
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ gpio-f446 = [
374
374
" otg-hs" ,
375
375
" sai1" ,
376
376
" sai2" ,
377
- # "sdio",
377
+ " sdio" ,
378
378
" spi3" ,
379
379
" spi4" ,
380
380
" spdifrx" ,
Original file line number Diff line number Diff line change @@ -352,7 +352,10 @@ impl<P: SdioPeripheral> Sdio<P> {
352
352
self . sdio . dlen ( ) . write ( |w| w. datalength ( ) . set ( length_bytes) ) ;
353
353
// Transfer
354
354
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
356
359
w. dtdir ( ) . variant ( dtdir) ;
357
360
w. dten ( ) . enabled ( ) // Enable transfer
358
361
} ) ;
@@ -755,6 +758,7 @@ fn clear_all_interrupts(icr: &pac::sdio::ICR) {
755
758
icr. modify ( |_, w| {
756
759
w. ccrcfailc ( ) . set_bit ( ) ;
757
760
w. ctimeoutc ( ) . set_bit ( ) ;
761
+ #[ cfg( not( feature = "stm32f446" ) ) ]
758
762
w. ceataendc ( ) . set_bit ( ) ;
759
763
w. cmdrendc ( ) . set_bit ( ) ;
760
764
w. cmdsentc ( ) . set_bit ( ) ;
@@ -763,6 +767,7 @@ fn clear_all_interrupts(icr: &pac::sdio::ICR) {
763
767
w. dcrcfailc ( ) . set_bit ( ) ;
764
768
w. dtimeoutc ( ) . set_bit ( ) ;
765
769
w. sdioitc ( ) . set_bit ( ) ;
770
+ #[ cfg( not( feature = "stm32f446" ) ) ]
766
771
w. stbiterrc ( ) . set_bit ( ) ;
767
772
w. rxoverrc ( ) . set_bit ( ) ;
768
773
w. txunderrc ( ) . set_bit ( )
You can’t perform that action at this time.
0 commit comments