libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
opamp_common_v1.h File Reference
Include dependency graph for opamp_common_v1.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OPAMP_CSR_OUTCAL_MASK   (0x1)
 
#define OPAMP_CSR_OUTCAL_SHIFT   (30)
 
#define OPAMP_CSR_OUTCAL_NON_LO_INV   (0x0)
 
#define OPAMP_CSR_OUTCAL_NON_HI_INV   (0x1)
 
#define OPAMP_CSR_USER_TRIM   (0x1 << 18)
 
#define OPAMP_CSR_PGA_GAIN_MASK   (0xf)
 
#define OPAMP_CSR_PGA_GAIN_SHIFT   (14)
 
#define OPAMP_CSR_PGA_GAIN_2   (0x0)
 
#define OPAMP_CSR_PGA_GAIN_4   (0x1)
 
#define OPAMP_CSR_PGA_GAIN_8   (0x2)
 
#define OPAMP_CSR_PGA_GAIN_16   (0x3)
 
#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM0   (0x8)
 
#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM0   (0x9)
 
#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM0   (0xa)
 
#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM0   (0xb)
 
#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM1   (0xc)
 
#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM1   (0xd)
 
#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM1   (0xe)
 
#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM1   (0xf)
 
#define OPAMP_CSR_VPS_SEL_MASK   (0x3)
 
#define OPAMP_CSR_VPS_SEL_SHIFT   (9)
 
#define OPAMP_CSR_VMS_SEL_MASK   (0x1)
 
#define OPAMP_CSR_VMS_SEL_SHIFT   (8)
 
#define OPAMP_CSR_TCM_EN   (0x1 << 7)
 
#define OPAMP_CSR_VM_SEL_PGA_MODE   (0x2)
 
#define OPAMP_CSR_VM_SEL_FOLLOWER_MODE   (0x3)
 

Functions

bool opamp_read_outcal (uint32_t base)
 
void opamp_vps_select (uint32_t base, uint32_t vps)
 
void opamp_vms_select (uint32_t base, uint32_t vms)
 
void opamp_tcm_enable (uint32_t base)
 
void opamp_tcm_disable (uint32_t base)