cortex_ar/register/
irbar.rs1use crate::register::{SysReg, SysRegRead, SysRegWrite};
4
5#[derive(Debug, Copy, Clone)]
7#[cfg_attr(feature = "defmt", derive(defmt::Format))]
8pub struct Irbar(pub *mut u8);
9impl SysReg for Irbar {
10 const CP: u32 = 15;
11 const CRN: u32 = 6;
12 const OP1: u32 = 0;
13 const CRM: u32 = 1;
14 const OP2: u32 = 1;
15}
16impl crate::register::SysRegRead for Irbar {}
17impl Irbar {
18 #[inline]
19 pub fn read() -> Irbar {
23 unsafe { Self(<Self as SysRegRead>::read_raw() as *mut u8) }
24 }
25}
26
27impl crate::register::SysRegWrite for Irbar {}
28impl Irbar {
29 #[inline]
30 pub fn write(value: Irbar) {
34 unsafe { <Self as SysRegWrite>::write_raw(value.0 as u32) }
35 }
36}