36#define OPAMP_MUXNEG_NEG (0)
37#define OPAMP_MUXNEG_LADDER (1)
38#define OPAMP_MUXNEG_OUT (2)
39#define OPAMP0_MUXNEG_DAC (3)
40#define OPAMP1_MUXNEG_DAC (3)
41#define OPAMP2_MUXNEG_DAC (5)
42#define OPAMP2_MUXNEG_NEG_0 (3)
43#define OPAMP2_MUXNEG_NEG_1 (4)
45#define OPAMP_MUXPOS_POS (0)
46#define OPAMP_MUXPOS_LADDER (1)
47#define OPAMP0_MUXPOS_DAC (2)
48#define OPAMP1_MUXPOS_OUT_0 (2)
49#define OPAMP2_MUXPOS_OUT_1 (2)
50#define OPAMP_MUXPOS_GND (3)
51#define OPAMP2_MUXPOS_POS_0 (4)
52#define OPAMP2_MUXPOS_POS_1 (5)
53#define OPAMP2_MUXPOS_LADDER_0 (6)
55#define OPAMP_POTMUX_RATIO_14_2 (0)
56#define OPAMP_POTMUX_RATIO_12_4 (1)
57#define OPAMP_POTMUX_RATIO_8_8 (2)
58#define OPAMP_POTMUX_RATIO_6_10 (3)
59#define OPAMP_POTMUX_RATIO_4_12 (4)
60#define OPAMP_POTMUX_RATIO_3_13 (5)
61#define OPAMP_POTMUX_RATIO_2_14 (6)
62#define OPAMP_POTMUX_RATIO_1_15 (7)
64#define OPAMP_RES1MUX_POS (0)
65#define OPAMP_RES1MUX_NEG (1)
66#define OPAMP0_RES1MUX_DAC (2)
67#define OPAMP1_RES1MUX_OUT_0 (2)
68#define OPAMP2_RES1MUX_OUT_1 (2)
69#define OPAMP_RES1MUX_GND (3)
70#define OPAMP_RES1MUX_NC (4)
72#define OPAMP_RES2MUX_VCC (0)
73#define OPAMP_RES2MUX_OUT (1)
74#define OPAMP_RES2MUX_NC (2)
void opamp_set_potmux(uint16_t instance, uint8_t potmux)
Sets the potentiometer (resistor ladder) mux for the given opamp.
Definition: opamp.c:54
void opamp_disable(uint16_t instance)
Disables the given opamp.
Definition: opamp.c:90
void opamp_init(void)
Initializes the OPAMP peripheral, but does not enable any opamps.
Definition: opamp.c:32
void opamp_enable(uint16_t instance)
Enables the given opamp.
Definition: opamp.c:38
void opamp_set_analog_connection(uint16_t instance, bool connected)
Sets or removes the connection from the opamp output to the ADC / AC.
Definition: opamp.c:86
void opamp_set_muxneg(uint16_t instance, uint8_t muxneg)
Sets the negative input mux for the given opamp.
Definition: opamp.c:50
void opamp_set_res2mux(uint16_t instance, uint8_t res2mux)
Sets the connection for the top of the resistor ladder for the given instance.
Definition: opamp.c:68
void opamp_set_res1mux(uint16_t instance, uint8_t res1mux)
Sets the connection for the bottom of the resistor ladder for the given instance.
Definition: opamp.c:59
void opamp_set_muxpos(uint16_t instance, uint8_t muxpos)
Sets the positive input mux for the given opamp.
Definition: opamp.c:46