Skip to content

Commit 91e287b

Browse files
authored
Merge branch 'master' into tim16-pwm
2 parents a81a513 + 73b81e6 commit 91e287b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2222

2323
- Wrong mode when using PWM channel 2 of a two-channel timer
2424
- `adc_values` example conversion error
25+
- `invalid_reference_casting` Compilation error in spi.rs for Rust version 1.73+ (
26+
See [PR#112431](https://github.com/rust-lang/rust/pull/112431) for more info)
27+
- `unused_doc_comments` Warning in rcc.rs
2528

2629
## [v0.18.0] - 2021-11-14
2730

src/rcc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl RccExt for RCC {
1414
pclk: None,
1515
sysclk: None,
1616
clock_src: SysClkSource::HSI,
17-
/// CRS is only available on devices with HSI48
17+
// CRS is only available on devices with HSI48
1818
#[cfg(any(
1919
feature = "stm32f042",
2020
feature = "stm32f048",

src/spi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ where
413413

414414
fn send_u8(&mut self, byte: u8) {
415415
// 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) }
417417
}
418418

419419
fn read_u16(&mut self) -> u16 {
@@ -423,7 +423,7 @@ where
423423

424424
fn send_u16(&mut self, byte: u16) {
425425
// 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) }
427427
}
428428

429429
pub fn release(self) -> (SPI, (SCKPIN, MISOPIN, MOSIPIN)) {

0 commit comments

Comments
 (0)