File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
21
21
22
22
- Wrong mode when using PWM channel 2 of a two-channel timer
23
23
- ` adc_values ` example conversion error
24
+ - ` invalid_reference_casting ` Compilation error in spi.rs for Rust version 1.73+ (
25
+ See [ PR #112431 ] ( https://github.com/rust-lang/rust/pull/112431 ) for more info)
26
+ - ` unused_doc_comments ` Warning in rcc.rs
24
27
25
28
## [ v0.18.0] - 2021-11-14
26
29
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ impl RccExt for RCC {
14
14
pclk : None ,
15
15
sysclk : None ,
16
16
clock_src : SysClkSource :: HSI ,
17
- /// CRS is only available on devices with HSI48
17
+ // CRS is only available on devices with HSI48
18
18
#[ cfg( any(
19
19
feature = "stm32f042" ,
20
20
feature = "stm32f048" ,
Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ where
413
413
414
414
fn send_u8 ( & mut self , byte : u8 ) {
415
415
// NOTE(write_volatile) see note above
416
- unsafe { ptr:: write_volatile ( & self . spi . dr as * const _ as * mut u8 , byte) }
416
+ unsafe { ptr:: write_volatile ( ptr :: addr_of! ( self . spi. dr) as * mut u8 , byte) }
417
417
}
418
418
419
419
fn read_u16 ( & mut self ) -> u16 {
@@ -423,7 +423,7 @@ where
423
423
424
424
fn send_u16 ( & mut self , byte : u16 ) {
425
425
// NOTE(write_volatile) see note above
426
- unsafe { ptr:: write_volatile ( & self . spi . dr as * const _ as * mut u16 , byte) }
426
+ unsafe { ptr:: write_volatile ( ptr :: addr_of! ( self . spi. dr) as * mut u16 , byte) }
427
427
}
428
428
429
429
pub fn release ( self ) -> ( SPI , ( SCKPIN , MISOPIN , MOSIPIN ) ) {
You can’t perform that action at this time.
0 commit comments