gd32vf103-hal 0.0.6

Hardware abstract layer (HAL) for RISC-V microcontroller GD32VF103
1
2
3
4
5
6
7
8
9
10
//! Debug features

// todo: design mode hold register (instead of `pub use`)
use crate::pac::DBG;

/// Read the DBG ID code register
pub fn debug_id() -> u32 {
    // note(unsafe): read read-only register
    unsafe { &*DBG::ptr() }.id.read().bits()
}