Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/rcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl RccExt for RCC {
pclk: None,
sysclk: None,
clock_src: SysClkSource::HSI,
/// CRS is only available on devices with HSI48
// CRS is only available on devices with HSI48
#[cfg(any(
feature = "stm32f042",
feature = "stm32f048",
Expand Down
4 changes: 2 additions & 2 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ where

fn send_u8(&mut self, byte: u8) {
// NOTE(write_volatile) see note above
unsafe { ptr::write_volatile(&self.spi.dr as *const _ as *mut u8, byte) }
unsafe { ptr::write_volatile(ptr::addr_of!(self.spi.dr) as *mut u8, byte) }
}

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

fn send_u16(&mut self, byte: u16) {
// NOTE(write_volatile) see note above
unsafe { ptr::write_volatile(&self.spi.dr as *const _ as *mut u16, byte) }
unsafe { ptr::write_volatile(ptr::addr_of!(self.spi.dr) as *mut u16, byte) }
}

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