cortex_ar/register/imp/
imp_pinoptr.rs

1//! Code for managing IMP_PINOPTR (*Pin Options Register*)
2
3use crate::register::{SysReg, SysRegRead};
4
5/// IMP_PINOPTR (*Pin Options Register*)
6#[derive(Debug, Clone, Copy)]
7#[cfg_attr(feature = "defmt", derive(defmt::Format))]
8#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
9pub struct ImpPinoptr(pub u32);
10impl SysReg for ImpPinoptr {
11    const CP: u32 = 15;
12    const CRN: u32 = 15;
13    const OP1: u32 = 0;
14    const CRM: u32 = 2;
15    const OP2: u32 = 7;
16}
17impl crate::register::SysRegRead for ImpPinoptr {}
18impl ImpPinoptr {
19    #[inline]
20    /// Reads IMP_PINOPTR (*Pin Options Register*)
21    pub fn read() -> ImpPinoptr {
22        unsafe { Self(<Self as SysRegRead>::read_raw()) }
23    }
24}