39#define OPAMP_MUXNEG_NEG (0)
40#define OPAMP_MUXNEG_LADDER (1)
41#define OPAMP_MUXNEG_OUT (2)
42#define OPAMP0_MUXNEG_DAC (3)
43#define OPAMP1_MUXNEG_DAC (3)
44#define OPAMP2_MUXNEG_DAC (5)
45#define OPAMP2_MUXNEG_NEG_0 (3)
46#define OPAMP2_MUXNEG_NEG_1 (4)
48#define OPAMP_MUXPOS_POS (0)
49#define OPAMP_MUXPOS_LADDER (1)
50#define OPAMP0_MUXPOS_DAC (2)
51#define OPAMP1_MUXPOS_OUT_0 (2)
52#define OPAMP2_MUXPOS_OUT_1 (2)
53#define OPAMP_MUXPOS_GND (3)
54#define OPAMP2_MUXPOS_POS_0 (4)
55#define OPAMP2_MUXPOS_POS_1 (5)
56#define OPAMP2_MUXPOS_LADDER_0 (6)
58#define OPAMP_POTMUX_RATIO_14_2 (0)
59#define OPAMP_POTMUX_RATIO_12_4 (1)
60#define OPAMP_POTMUX_RATIO_8_8 (2)
61#define OPAMP_POTMUX_RATIO_6_10 (3)
62#define OPAMP_POTMUX_RATIO_4_12 (4)
63#define OPAMP_POTMUX_RATIO_3_13 (5)
64#define OPAMP_POTMUX_RATIO_2_14 (6)
65#define OPAMP_POTMUX_RATIO_1_15 (7)
67#define OPAMP_RES1MUX_POS (0)
68#define OPAMP_RES1MUX_NEG (1)
69#define OPAMP0_RES1MUX_DAC (2)
70#define OPAMP1_RES1MUX_OUT_0 (2)
71#define OPAMP2_RES1MUX_OUT_1 (2)
72#define OPAMP_RES1MUX_GND (3)
73#define OPAMP_RES1MUX_NC (4)
75#define OPAMP_RES2MUX_VCC (0)
76#define OPAMP_RES2MUX_OUT (1)
77#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