Struct esp32_hal::pac::sens::sar_dac_ctrl2::W
pub struct W(_);
Expand description
Register SAR_DAC_CTRL2
writer
Implementations§
§impl W
impl W
pub fn dac_dc1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 8, 0>
pub fn dac_dc1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 8, 0>
Bits 0:7 - DC offset for DAC1 CW generator
pub fn dac_dc2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 8, 8>
pub fn dac_dc2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 8, 8>
Bits 8:15 - DC offset for DAC2 CW generator
pub fn dac_scale1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 16>
pub fn dac_scale1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 16>
Bits 16:17 - 00: no scale 01: scale to 1/2 10: scale to 1/4 scale to 1/8
pub fn dac_scale2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 18>
pub fn dac_scale2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 18>
Bits 18:19 - 00: no scale 01: scale to 1/2 10: scale to 1/4 scale to 1/8
pub fn dac_inv1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 20>
pub fn dac_inv1(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 20>
Bits 20:21 - 00: do not invert any bits 01: invert all bits 10: invert MSB 11: invert all bits except MSB
pub fn dac_inv2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 22>
pub fn dac_inv2(
&mut self
) -> FieldWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, u8, u8, Unsafe, 2, 22>
Bits 22:23 - 00: do not invert any bits 01: invert all bits 10: invert MSB 11: invert all bits except MSB
pub fn dac_cw_en1(
&mut self
) -> BitWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, bool, BitM, 24>
pub fn dac_cw_en1(
&mut self
) -> BitWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, bool, BitM, 24>
Bit 24 - 1: to select CW generator as source to PDAC1_DAC[7:0] 0: to select register reg_pdac1_dac[7:0] as source to PDAC1_DAC[7:0]
pub fn dac_cw_en2(
&mut self
) -> BitWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, bool, BitM, 25>
pub fn dac_cw_en2(
&mut self
) -> BitWriterRaw<'_, u32, SAR_DAC_CTRL2_SPEC, bool, BitM, 25>
Bit 25 - 1: to select CW generator as source to PDAC2_DAC[7:0] 0: to select register reg_pdac2_dac[7:0] as source to PDAC2_DAC[7:0]
Methods from Deref<Target = W<SAR_DAC_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.