1 | //! Link register |
---|---|
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] |
7 | pub fn read() -> u32 { |
8 | call_asm!(__lr_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] |
15 | pub unsafe fn write(bits: u32) { |
16 | call_asm!(__lr_w(bits: u32)); |
17 | } |
18 |