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

Go to the source code of this file.

Macros

#define OPAMP_CSR(opamp_base)   MMIO32((opamp_base) + 0x00)
 
#define OPAMP_CSR_LOCK   (0x1 << 31)
 
#define OPAMP_CSR_TSTREF   (0x1 << 29)
 
#define OPAMP_CSR_TRIMOFFSETN_MASK   (0x1f)
 
#define OPAMP_CSR_TRIMOFFSETN_SHIFT   (24)
 
#define OPAMP_CSR_TRIMOFFSETP_MASK   (0x1f)
 
#define OPAMP_CSR_TRIMOFFSETP_SHIFT   (19)
 
#define OPAMP_CSR_CALSEL_MASK   (0x3)
 
#define OPAMP_CSR_CALSEL_SHIFT   (12)
 
#define OPAMP_CSR_CALSEL_3P3_PERCENT   (0x0)
 
#define OPAMP_CSR_CALSEL_10_PERCENT   (0x1)
 
#define OPAMP_CSR_CALSEL_50_PERCENT   (0x2)
 
#define OPAMP_CSR_CALSEL_90_PERCENT   (0x3)
 
#define OPAMP_CSR_CALON   (0x1 << 11)
 
#define OPAMP_CSR_VM_SEL_MASK   (0x3)
 
#define OPAMP_CSR_VM_SEL_SHIFT   (5)
 
#define OPAMP_CSR_VP_SEL_MASK   (0x3)
 
#define OPAMP_CSR_VP_SEL_SHIFT   (2)
 
#define OPAMP_CSR_FORCE_VP   (0x1 << 1)
 
#define OPAMP_CSR_EN   (0x1 << 0)
 

Functions

void opamp_enable (uint32_t base)
 
void opamp_disable (uint32_t base)
 
void opamp_lock (uint32_t base)
 
void opamp_set_calsel (uint32_t base, uint32_t calsel)
 
void opamp_tstref_enable (uint32_t base)
 
void opamp_tstref_disable (uint32_t base)
 
void opamp_force_vp_enable (uint32_t base)
 
void opamp_force_vp_disable (uint32_t base)
 
void opamp_cal_enable (uint32_t base)
 
void opamp_cal_disable (uint32_t base)
 
void opamp_trimoffsetn_set (uint32_t base, uint32_t trim)
 
void opamp_trimoffsetp_set (uint32_t base, uint32_t trim)
 
void opamp_user_trim_enable (uint32_t base)
 
void opamp_user_trim_disable (uint32_t base)
 
void opamp_pga_gain_select (uint32_t base, uint32_t gain)
 
void opamp_vp_select (uint32_t base, uint32_t vp)
 
void opamp_vm_select (uint32_t base, uint32_t vm)