ads1263/register/
mode0.rs

1#![allow(non_camel_case_types)]
2use crate::{impl_bitfield, register::bitfield::BitField, register::register::Register};
3
4#[repr(u8)]
5#[derive(Clone, Copy, Debug)]
6pub enum ConversionDelay {
7    DELAY_0 = 0b0000,
8    DELAY_8700 = 0b0001,
9    DELAY_17000 = 0b0010,
10    DELAY_35000 = 0b0011,
11    DELAY_69000 = 0b0100,
12    DELAY_139000 = 0b0101,
13    DELAY_278000 = 0b0110,
14    DELAY_555000 = 0b0111,
15    DELAY_1_1 = 0b1000,
16    DELAY_2_2 = 0b1001,
17    DELAY_4_4 = 0b1010,
18    DELAY_8_8 = 0b1011,
19}
20impl_bitfield!(ConversionDelay, 0, 3, Register::MODE0);
21
22#[repr(u8)]
23#[derive(Clone, Copy, Debug)]
24pub enum InputChop {
25    DISABLED = 0,
26    ENABLED = 1,
27}
28impl_bitfield!(InputChop, 4, 4, Register::MODE0);
29
30#[repr(u8)]
31#[derive(Clone, Copy, Debug)]
32pub enum IDACRotation {
33    DISABLED = 0,
34    ENABLED = 1,
35}
36impl_bitfield!(IDACRotation, 5, 5, Register::MODE0);
37
38#[repr(u8)]
39#[derive(Clone, Copy, Debug)]
40pub enum ADCConversionRunMode {
41    CONTINUOUS = 0,
42    PULSE = 1,
43}
44
45impl_bitfield!(ADCConversionRunMode, 6, 6, Register::MODE0);
46
47#[repr(u8)]
48#[derive(Clone, Copy, Debug)]
49pub enum RefMuxPolarity {
50    NORMAL = 0,
51    REVERSED = 1,
52}
53impl_bitfield!(RefMuxPolarity, 7, 7, Register::MODE0);