25#if defined(LIBOPENCM3_OPAMP_H)
27#ifndef LIBOPENCM3_OPAMP_COMMON_V1_H
28#define LIBOPENCM3_OPAMP_COMMON_V1_H
35#define OPAMP_CSR_OUTCAL_MASK (0x1)
36#define OPAMP_CSR_OUTCAL_SHIFT (30)
37#define OPAMP_CSR_OUTCAL_NON_LO_INV (0x0)
38#define OPAMP_CSR_OUTCAL_NON_HI_INV (0x1)
40#define OPAMP_CSR_USER_TRIM (0x1 << 18)
42#define OPAMP_CSR_PGA_GAIN_MASK (0xf)
43#define OPAMP_CSR_PGA_GAIN_SHIFT (14)
44#define OPAMP_CSR_PGA_GAIN_2 (0x0)
45#define OPAMP_CSR_PGA_GAIN_4 (0x1)
46#define OPAMP_CSR_PGA_GAIN_8 (0x2)
47#define OPAMP_CSR_PGA_GAIN_16 (0x3)
48#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM0 (0x8)
49#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM0 (0x9)
50#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM0 (0xa)
51#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM0 (0xb)
52#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM1 (0xc)
53#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM1 (0xd)
54#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM1 (0xe)
55#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM1 (0xf)
57#define OPAMP_CSR_VPS_SEL_MASK (0x3)
58#define OPAMP_CSR_VPS_SEL_SHIFT (9)
60#define OPAMP_CSR_VMS_SEL_MASK (0x1)
61#define OPAMP_CSR_VMS_SEL_SHIFT (8)
63#define OPAMP_CSR_TCM_EN (0x1 << 7)
65#define OPAMP_CSR_VM_SEL_PGA_MODE (0x2)
66#define OPAMP_CSR_VM_SEL_FOLLOWER_MODE (0x3)
84#warning "opamp_common_v1.h should not be included directly, only via opamp.h"
bool opamp_read_outcal(uint32_t base)
void opamp_vms_select(uint32_t base, uint32_t vms)
void opamp_vps_select(uint32_t base, uint32_t vps)
void opamp_tcm_enable(uint32_t base)
void opamp_tcm_disable(uint32_t base)