Struct esp32_hal::pac::sens::sar_read_ctrl2::W
pub struct W(_);
Expand description
Register SAR_READ_CTRL2
writer
Implementations§
§impl W
impl W
pub fn sar2_clk_div(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 0>
pub fn sar2_clk_div(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 0>
Bits 0:7 - clock divider
pub fn sar2_sample_cycle(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 8>
pub fn sar2_sample_cycle(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 8>
Bits 8:15 - sample cycles for SAR ADC2
pub fn sar2_sample_bit(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 2, 16>
pub fn sar2_sample_bit(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 2, 16>
Bits 16:17 - 00: for 9-bit width 01: for 10-bit width 10: for 11-bit width 11: for 12-bit width
pub fn sar2_clk_gated(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 18>
pub fn sar2_clk_gated(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 18>
Bit 18
pub fn sar2_sample_num(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 19>
pub fn sar2_sample_num(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, u8, u8, Unsafe, 8, 19>
Bits 19:26
pub fn sar2_pwdet_force(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 27>
pub fn sar2_pwdet_force(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 27>
Bit 27
pub fn sar2_dig_force(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 28>
pub fn sar2_dig_force(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 28>
Bit 28 - 1: SAR ADC2 controlled by DIG ADC2 CTRL or PWDET CTRL 0: SAR ADC2 controlled by RTC ADC2 CTRL
pub fn sar2_data_inv(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 29>
pub fn sar2_data_inv(
&mut self
) -> BitWriterRaw<'_, u32, SAR_READ_CTRL2_SPEC, bool, BitM, 29>
Bit 29 - Invert SAR ADC2 data
Methods from Deref<Target = W<SAR_READ_CTRL2_SPEC>>§
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
Writes raw bits to the register.
Safety
Read datasheet or reference manual to find what values are allowed to pass.
Trait Implementations§
§impl From<W<SAR_READ_CTRL2_SPEC>> for W
impl From<W<SAR_READ_CTRL2_SPEC>> for W
§fn from(writer: W<SAR_READ_CTRL2_SPEC>) -> W
fn from(writer: W<SAR_READ_CTRL2_SPEC>) -> W
Converts to this type from the input type.