Skip to content
Open
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ categories = ["embedded", "hardware-support", "no-std"]
description = "HAL for GD32VF103 microcontrollers"
keywords = ["riscv", "gd32", "hal"]
license = "ISC"
edition = "2018"
edition = "2024"

[dependencies]
gd32vf103-pac = "0.4.0"
Expand Down
4 changes: 2 additions & 2 deletions src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ macro_rules! dma {
///
/// `inc` indicates whether the address will be incremented after every byte transfer
pub unsafe fn set_peripheral_address(&mut self, address: u32, inc: bool) {
self.paddr().write(|w| w.bits(address) );
self.paddr().write(|w| unsafe { w.bits(address) } );
self.ctl().modify(|_, w| w.pnaga().bit(inc) );
}

/// `address` where from/to data will be read/write
///
/// `inc` indicates whether the address will be incremented after every byte transfer
pub unsafe fn set_memory_address(&mut self, address: u32, inc: bool) {
self.maddr().write(|w| w.bits(address) );
self.maddr().write(|w| unsafe { w.bits(address) } );
self.ctl().modify(|_, w| w.mnaga().bit(inc) );
}

Expand Down
2 changes: 1 addition & 1 deletion src/eclic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl EclicExt for ECLIC {
unsafe fn unmask<I: Nr>(interrupt: I) {
let nr = usize::from(interrupt.nr());

(*Self::ptr()).clicints[nr]
unsafe { &*Self::ptr() }.clicints[nr]
.clicintie
.write(|w| w.ie().set_bit())
}
Expand Down
Loading