1//! Program counter
2
3/// Reads the CPU register
4///
5/// **NOTE** This function is available if `cortex-m` is built with the `"inline-asm"` feature.
6#[inline]
7pub fn read() -> u32 {
8 call_asm!(__pc_r() -> u32)
9}
10
11/// Writes `bits` to the CPU register
12///
13/// **NOTE** This function is available if `cortex-m` is built with the `"inline-asm"` feature.
14#[inline]
15pub unsafe fn write(bits: u32) {
16 call_asm!(__pc_w(bits: u32));
17}
18