Struct Csr
#[repr(transparent)]pub struct Csr(pub u32);Expand description
Control/status register
Tuple Fields§
§0: u32Implementations§
§impl Csr
impl Csr
pub const fn set_opampen(&mut self, val: bool)
pub const fn set_opampen(&mut self, val: bool)
Enable
pub const fn opalpm(&self) -> bool
pub const fn opalpm(&self) -> bool
Low-power mode enable. The operational amplifier must be disabled to change this configuration.
pub const fn set_opalpm(&mut self, val: bool)
pub const fn set_opalpm(&mut self, val: bool)
Low-power mode enable. The operational amplifier must be disabled to change this configuration.
pub const fn set_opamode(&mut self, val: Opamode)
pub const fn set_opamode(&mut self, val: Opamode)
PGA mode
pub const fn set_pga_gain(&mut self, val: PgaGain)
pub const fn set_pga_gain(&mut self, val: PgaGain)
Gain in PGA mode
pub const fn vm_sel(&self) -> VmSel
pub const fn vm_sel(&self) -> VmSel
Inverting input selection. On STM32U3 only bit 9 exists (bit 8 is reserved): use GPIO or NOT_CONNECTED
pub const fn set_vm_sel(&mut self, val: VmSel)
pub const fn set_vm_sel(&mut self, val: VmSel)
Inverting input selection. On STM32U3 only bit 9 exists (bit 8 is reserved): use GPIO or NOT_CONNECTED
pub const fn set_vp_sel(&mut self, val: VpSel)
pub const fn set_vp_sel(&mut self, val: VpSel)
Non inverted input selection
pub const fn set_calsel(&mut self, val: Calsel)
pub const fn set_calsel(&mut self, val: Calsel)
Calibration selection
pub const fn set_usertrim(&mut self, val: bool)
pub const fn set_usertrim(&mut self, val: bool)
User trimming enable
pub const fn set_calout(&mut self, val: bool)
pub const fn set_calout(&mut self, val: bool)
Calibration output
pub const fn set_opahsm(&mut self, val: bool)
pub const fn set_opahsm(&mut self, val: bool)
High-speed mode enable (only on STM32U5/U3)
pub const fn opa_range(&self) -> OpaRange
pub const fn opa_range(&self) -> OpaRange
Power supply range for stability. Only in OPAMP1_CSR (reserved in OPAMP2), affects all OPAMP instances. On STM32U5/U3 this bit must be set to 1 before enabling the OPAMP
pub const fn set_opa_range(&mut self, val: OpaRange)
pub const fn set_opa_range(&mut self, val: OpaRange)
Power supply range for stability. Only in OPAMP1_CSR (reserved in OPAMP2), affects all OPAMP instances. On STM32U5/U3 this bit must be set to 1 before enabling the OPAMP