libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
OPAMP Defines

libopencm3 Defined Constants and Types for the STM32F3xx Operational Amplifier module More...

Collaboration diagram for OPAMP Defines:

Macros

#define OPAMP1   (OPAMP_BASE + 0x38)
 
#define OPAMP2   (OPAMP_BASE + 0x3C)
 
#define OPAMP3   (OPAMP_BASE + 0x40)
 
#define OPAMP4   (OPAMP_BASE + 0x44)
 
#define OPAMP1_CSR   OPAMP_CSR(OPAMP1)
 
#define OPAMP2_CSR   OPAMP_CSR(OPAMP2)
 
#define OPAMP3_CSR   OPAMP_CSR(OPAMP3)
 
#define OPAMP4_CSR   OPAMP_CSR(OPAMP4)
 
#define OPAMP1_CSR_VPS_SEL_PA7   (0x0)
 
#define OPAMP1_CSR_VPS_SEL_PA5   (0x1)
 
#define OPAMP1_CSR_VPS_SEL_PA3   (0x2)
 
#define OPAMP1_CSR_VPS_SEL_PA1   (0x3)
 
#define OPAMP2_CSR_VPS_SEL_PD14   (0x0)
 
#define OPAMP2_CSR_VPS_SEL_PB14   (0x1)
 
#define OPAMP2_CSR_VPS_SEL_PB0   (0x2)
 
#define OPAMP2_CSR_VPS_SEL_PA7   (0x3)
 
#define OPAMP3_CSR_VPS_SEL_PB13   (0x0)
 
#define OPAMP3_CSR_VPS_SEL_PA5   (0x1)
 
#define OPAMP3_CSR_VPS_SEL_PA1   (0x2)
 
#define OPAMP3_CSR_VPS_SEL_PB0   (0x3)
 
#define OPAMP4_CSR_VPS_SEL_PD11   (0x0)
 
#define OPAMP4_CSR_VPS_SEL_PB11   (0x1)
 
#define OPAMP4_CSR_VPS_SEL_PA4   (0x2)
 
#define OPAMP4_CSR_VPS_SEL_PB13   (0x3)
 
#define OPAMP1_CSR_VMS_SEL_PC5   (0x0)
 
#define OPAMP1_CSR_VMS_SEL_PA3   (0x1)
 
#define OPAMP2_CSR_VMS_SEL_PC5   (0x0)
 
#define OPAMP2_CSR_VMS_SEL_PA5   (0x1)
 
#define OPAMP3_CSR_VMS_SEL_PB10   (0x0)
 
#define OPAMP3_CSR_VMS_SEL_PB2   (0x1)
 
#define OPAMP4_CSR_VMS_SEL_PB10   (0x0)
 
#define OPAMP4_CSR_VMS_SEL_PD8   (0x1)
 
#define OPAMP1_CSR_VM_SEL_PC5   (0x0)
 
#define OPAMP1_CSR_VM_SEL_PA3   (0x1)
 
#define OPAMP2_CSR_VM_SEL_PC5   (0x0)
 
#define OPAMP2_CSR_VM_SEL_PA5   (0x1)
 
#define OPAMP3_CSR_VM_SEL_PB10   (0x0)
 
#define OPAMP3_CSR_VM_SEL_PB2   (0x1)
 
#define OPAMP4_CSR_VM_SEL_PB10   (0x0)
 
#define OPAMP4_CSR_VM_SEL_PD8   (0x1)
 
#define OPAMP1_CSR_VP_SEL_PA7   (0x0)
 
#define OPAMP1_CSR_VP_SEL_PA5   (0x1)
 
#define OPAMP1_CSR_VP_SEL_PA3   (0x2)
 
#define OPAMP1_CSR_VP_SEL_PA1   (0x3)
 
#define OPAMP2_CSR_VP_SEL_PD14   (0x0)
 
#define OPAMP2_CSR_VP_SEL_PB14   (0x1)
 
#define OPAMP2_CSR_VP_SEL_PB0   (0x2)
 
#define OPAMP2_CSR_VP_SEL_PA7   (0x3)
 
#define OPAMP3_CSR_VP_SEL_PB13   (0x0)
 
#define OPAMP3_CSR_VP_SEL_PA5   (0x1)
 
#define OPAMP3_CSR_VP_SEL_PA1   (0x2)
 
#define OPAMP3_CSR_VP_SEL_PB0   (0x3)
 
#define OPAMP4_CSR_VP_SEL_PD11   (0x0)
 
#define OPAMP4_CSR_VP_SEL_PB11   (0x1)
 
#define OPAMP4_CSR_VP_SEL_PA4   (0x2)
 
#define OPAMP4_CSR_VP_SEL_PB13   (0x3)
 
#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)
 
#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

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)
 
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)
 

Detailed Description

libopencm3 Defined Constants and Types for the STM32F3xx Operational Amplifier module

Version
1.0.0
Date
22 May 2020

LGPL License Terms libopencm3 License

Date
10 Dec 2020

LGPL License Terms libopencm3 License

Macro Definition Documentation

◆ OPAMP1

#define OPAMP1   (OPAMP_BASE + 0x38)

Definition at line 37 of file f3/opamp.h.

◆ OPAMP1_CSR

#define OPAMP1_CSR   OPAMP_CSR(OPAMP1)

Definition at line 45 of file f3/opamp.h.

◆ OPAMP1_CSR_VM_SEL_PA3

#define OPAMP1_CSR_VM_SEL_PA3   (0x1)

Definition at line 79 of file f3/opamp.h.

◆ OPAMP1_CSR_VM_SEL_PC5

#define OPAMP1_CSR_VM_SEL_PC5   (0x0)

Definition at line 78 of file f3/opamp.h.

◆ OPAMP1_CSR_VMS_SEL_PA3

#define OPAMP1_CSR_VMS_SEL_PA3   (0x1)

Definition at line 70 of file f3/opamp.h.

◆ OPAMP1_CSR_VMS_SEL_PC5

#define OPAMP1_CSR_VMS_SEL_PC5   (0x0)

Definition at line 69 of file f3/opamp.h.

◆ OPAMP1_CSR_VP_SEL_PA1

#define OPAMP1_CSR_VP_SEL_PA1   (0x3)

Definition at line 90 of file f3/opamp.h.

◆ OPAMP1_CSR_VP_SEL_PA3

#define OPAMP1_CSR_VP_SEL_PA3   (0x2)

Definition at line 89 of file f3/opamp.h.

◆ OPAMP1_CSR_VP_SEL_PA5

#define OPAMP1_CSR_VP_SEL_PA5   (0x1)

Definition at line 88 of file f3/opamp.h.

◆ OPAMP1_CSR_VP_SEL_PA7

#define OPAMP1_CSR_VP_SEL_PA7   (0x0)

Definition at line 87 of file f3/opamp.h.

◆ OPAMP1_CSR_VPS_SEL_PA1

#define OPAMP1_CSR_VPS_SEL_PA1   (0x3)

Definition at line 55 of file f3/opamp.h.

◆ OPAMP1_CSR_VPS_SEL_PA3

#define OPAMP1_CSR_VPS_SEL_PA3   (0x2)

Definition at line 54 of file f3/opamp.h.

◆ OPAMP1_CSR_VPS_SEL_PA5

#define OPAMP1_CSR_VPS_SEL_PA5   (0x1)

Definition at line 53 of file f3/opamp.h.

◆ OPAMP1_CSR_VPS_SEL_PA7

#define OPAMP1_CSR_VPS_SEL_PA7   (0x0)

Definition at line 52 of file f3/opamp.h.

◆ OPAMP2

#define OPAMP2   (OPAMP_BASE + 0x3C)

Definition at line 38 of file f3/opamp.h.

◆ OPAMP2_CSR

#define OPAMP2_CSR   OPAMP_CSR(OPAMP2)

Definition at line 46 of file f3/opamp.h.

◆ OPAMP2_CSR_VM_SEL_PA5

#define OPAMP2_CSR_VM_SEL_PA5   (0x1)

Definition at line 81 of file f3/opamp.h.

◆ OPAMP2_CSR_VM_SEL_PC5

#define OPAMP2_CSR_VM_SEL_PC5   (0x0)

Definition at line 80 of file f3/opamp.h.

◆ OPAMP2_CSR_VMS_SEL_PA5

#define OPAMP2_CSR_VMS_SEL_PA5   (0x1)

Definition at line 72 of file f3/opamp.h.

◆ OPAMP2_CSR_VMS_SEL_PC5

#define OPAMP2_CSR_VMS_SEL_PC5   (0x0)

Definition at line 71 of file f3/opamp.h.

◆ OPAMP2_CSR_VP_SEL_PA7

#define OPAMP2_CSR_VP_SEL_PA7   (0x3)

Definition at line 94 of file f3/opamp.h.

◆ OPAMP2_CSR_VP_SEL_PB0

#define OPAMP2_CSR_VP_SEL_PB0   (0x2)

Definition at line 93 of file f3/opamp.h.

◆ OPAMP2_CSR_VP_SEL_PB14

#define OPAMP2_CSR_VP_SEL_PB14   (0x1)

Definition at line 92 of file f3/opamp.h.

◆ OPAMP2_CSR_VP_SEL_PD14

#define OPAMP2_CSR_VP_SEL_PD14   (0x0)

Definition at line 91 of file f3/opamp.h.

◆ OPAMP2_CSR_VPS_SEL_PA7

#define OPAMP2_CSR_VPS_SEL_PA7   (0x3)

Definition at line 59 of file f3/opamp.h.

◆ OPAMP2_CSR_VPS_SEL_PB0

#define OPAMP2_CSR_VPS_SEL_PB0   (0x2)

Definition at line 58 of file f3/opamp.h.

◆ OPAMP2_CSR_VPS_SEL_PB14

#define OPAMP2_CSR_VPS_SEL_PB14   (0x1)

Definition at line 57 of file f3/opamp.h.

◆ OPAMP2_CSR_VPS_SEL_PD14

#define OPAMP2_CSR_VPS_SEL_PD14   (0x0)

Definition at line 56 of file f3/opamp.h.

◆ OPAMP3

#define OPAMP3   (OPAMP_BASE + 0x40)

Definition at line 39 of file f3/opamp.h.

◆ OPAMP3_CSR

#define OPAMP3_CSR   OPAMP_CSR(OPAMP3)

Definition at line 47 of file f3/opamp.h.

◆ OPAMP3_CSR_VM_SEL_PB10

#define OPAMP3_CSR_VM_SEL_PB10   (0x0)

Definition at line 82 of file f3/opamp.h.

◆ OPAMP3_CSR_VM_SEL_PB2

#define OPAMP3_CSR_VM_SEL_PB2   (0x1)

Definition at line 83 of file f3/opamp.h.

◆ OPAMP3_CSR_VMS_SEL_PB10

#define OPAMP3_CSR_VMS_SEL_PB10   (0x0)

Definition at line 73 of file f3/opamp.h.

◆ OPAMP3_CSR_VMS_SEL_PB2

#define OPAMP3_CSR_VMS_SEL_PB2   (0x1)

Definition at line 74 of file f3/opamp.h.

◆ OPAMP3_CSR_VP_SEL_PA1

#define OPAMP3_CSR_VP_SEL_PA1   (0x2)

Definition at line 97 of file f3/opamp.h.

◆ OPAMP3_CSR_VP_SEL_PA5

#define OPAMP3_CSR_VP_SEL_PA5   (0x1)

Definition at line 96 of file f3/opamp.h.

◆ OPAMP3_CSR_VP_SEL_PB0

#define OPAMP3_CSR_VP_SEL_PB0   (0x3)

Definition at line 98 of file f3/opamp.h.

◆ OPAMP3_CSR_VP_SEL_PB13

#define OPAMP3_CSR_VP_SEL_PB13   (0x0)

Definition at line 95 of file f3/opamp.h.

◆ OPAMP3_CSR_VPS_SEL_PA1

#define OPAMP3_CSR_VPS_SEL_PA1   (0x2)

Definition at line 62 of file f3/opamp.h.

◆ OPAMP3_CSR_VPS_SEL_PA5

#define OPAMP3_CSR_VPS_SEL_PA5   (0x1)

Definition at line 61 of file f3/opamp.h.

◆ OPAMP3_CSR_VPS_SEL_PB0

#define OPAMP3_CSR_VPS_SEL_PB0   (0x3)

Definition at line 63 of file f3/opamp.h.

◆ OPAMP3_CSR_VPS_SEL_PB13

#define OPAMP3_CSR_VPS_SEL_PB13   (0x0)

Definition at line 60 of file f3/opamp.h.

◆ OPAMP4

#define OPAMP4   (OPAMP_BASE + 0x44)

Definition at line 40 of file f3/opamp.h.

◆ OPAMP4_CSR

#define OPAMP4_CSR   OPAMP_CSR(OPAMP4)

Definition at line 48 of file f3/opamp.h.

◆ OPAMP4_CSR_VM_SEL_PB10

#define OPAMP4_CSR_VM_SEL_PB10   (0x0)

Definition at line 84 of file f3/opamp.h.

◆ OPAMP4_CSR_VM_SEL_PD8

#define OPAMP4_CSR_VM_SEL_PD8   (0x1)

Definition at line 85 of file f3/opamp.h.

◆ OPAMP4_CSR_VMS_SEL_PB10

#define OPAMP4_CSR_VMS_SEL_PB10   (0x0)

Definition at line 75 of file f3/opamp.h.

◆ OPAMP4_CSR_VMS_SEL_PD8

#define OPAMP4_CSR_VMS_SEL_PD8   (0x1)

Definition at line 76 of file f3/opamp.h.

◆ OPAMP4_CSR_VP_SEL_PA4

#define OPAMP4_CSR_VP_SEL_PA4   (0x2)

Definition at line 101 of file f3/opamp.h.

◆ OPAMP4_CSR_VP_SEL_PB11

#define OPAMP4_CSR_VP_SEL_PB11   (0x1)

Definition at line 100 of file f3/opamp.h.

◆ OPAMP4_CSR_VP_SEL_PB13

#define OPAMP4_CSR_VP_SEL_PB13   (0x3)

Definition at line 102 of file f3/opamp.h.

◆ OPAMP4_CSR_VP_SEL_PD11

#define OPAMP4_CSR_VP_SEL_PD11   (0x0)

Definition at line 99 of file f3/opamp.h.

◆ OPAMP4_CSR_VPS_SEL_PA4

#define OPAMP4_CSR_VPS_SEL_PA4   (0x2)

Definition at line 66 of file f3/opamp.h.

◆ OPAMP4_CSR_VPS_SEL_PB11

#define OPAMP4_CSR_VPS_SEL_PB11   (0x1)

Definition at line 65 of file f3/opamp.h.

◆ OPAMP4_CSR_VPS_SEL_PB13

#define OPAMP4_CSR_VPS_SEL_PB13   (0x3)

Definition at line 67 of file f3/opamp.h.

◆ OPAMP4_CSR_VPS_SEL_PD11

#define OPAMP4_CSR_VPS_SEL_PD11   (0x0)

Definition at line 64 of file f3/opamp.h.

◆ OPAMP_CSR

#define OPAMP_CSR (   opamp_base)    MMIO32((opamp_base) + 0x00)

Definition at line 34 of file opamp_common_all.h.

◆ OPAMP_CSR_CALON

#define OPAMP_CSR_CALON   (0x1 << 11)

Definition at line 55 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_10_PERCENT

#define OPAMP_CSR_CALSEL_10_PERCENT   (0x1)

Definition at line 51 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_3P3_PERCENT

#define OPAMP_CSR_CALSEL_3P3_PERCENT   (0x0)

Definition at line 50 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_50_PERCENT

#define OPAMP_CSR_CALSEL_50_PERCENT   (0x2)

Definition at line 52 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_90_PERCENT

#define OPAMP_CSR_CALSEL_90_PERCENT   (0x3)

Definition at line 53 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_MASK

#define OPAMP_CSR_CALSEL_MASK   (0x3)

Definition at line 48 of file opamp_common_all.h.

◆ OPAMP_CSR_CALSEL_SHIFT

#define OPAMP_CSR_CALSEL_SHIFT   (12)

Definition at line 49 of file opamp_common_all.h.

◆ OPAMP_CSR_EN

#define OPAMP_CSR_EN   (0x1 << 0)

Definition at line 64 of file opamp_common_all.h.

◆ OPAMP_CSR_FORCE_VP

#define OPAMP_CSR_FORCE_VP   (0x1 << 1)

Definition at line 63 of file opamp_common_all.h.

◆ OPAMP_CSR_LOCK

#define OPAMP_CSR_LOCK   (0x1 << 31)

Definition at line 38 of file opamp_common_all.h.

◆ OPAMP_CSR_OUTCAL_MASK

#define OPAMP_CSR_OUTCAL_MASK   (0x1)

Definition at line 35 of file opamp_common_v1.h.

◆ OPAMP_CSR_OUTCAL_NON_HI_INV

#define OPAMP_CSR_OUTCAL_NON_HI_INV   (0x1)

Definition at line 38 of file opamp_common_v1.h.

◆ OPAMP_CSR_OUTCAL_NON_LO_INV

#define OPAMP_CSR_OUTCAL_NON_LO_INV   (0x0)

Definition at line 37 of file opamp_common_v1.h.

◆ OPAMP_CSR_OUTCAL_SHIFT

#define OPAMP_CSR_OUTCAL_SHIFT   (30)

Definition at line 36 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_16

#define OPAMP_CSR_PGA_GAIN_16   (0x3)

Definition at line 47 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_16_MINUS_VM0

#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM0   (0xb)

Definition at line 51 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_16_MINUS_VM1

#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM1   (0xf)

Definition at line 55 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_2

#define OPAMP_CSR_PGA_GAIN_2   (0x0)

Definition at line 44 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_2_MINUS_VM0

#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM0   (0x8)

Definition at line 48 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_2_MINUS_VM1

#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM1   (0xc)

Definition at line 52 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_4

#define OPAMP_CSR_PGA_GAIN_4   (0x1)

Definition at line 45 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_4_MINUS_VM0

#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM0   (0x9)

Definition at line 49 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_4_MINUS_VM1

#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM1   (0xd)

Definition at line 53 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_8

#define OPAMP_CSR_PGA_GAIN_8   (0x2)

Definition at line 46 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_8_MINUS_VM0

#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM0   (0xa)

Definition at line 50 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_8_MINUS_VM1

#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM1   (0xe)

Definition at line 54 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_MASK

#define OPAMP_CSR_PGA_GAIN_MASK   (0xf)

Definition at line 42 of file opamp_common_v1.h.

◆ OPAMP_CSR_PGA_GAIN_SHIFT

#define OPAMP_CSR_PGA_GAIN_SHIFT   (14)

Definition at line 43 of file opamp_common_v1.h.

◆ OPAMP_CSR_TCM_EN

#define OPAMP_CSR_TCM_EN   (0x1 << 7)

Definition at line 63 of file opamp_common_v1.h.

◆ OPAMP_CSR_TRIMOFFSETN_MASK

#define OPAMP_CSR_TRIMOFFSETN_MASK   (0x1f)

Definition at line 42 of file opamp_common_all.h.

◆ OPAMP_CSR_TRIMOFFSETN_SHIFT

#define OPAMP_CSR_TRIMOFFSETN_SHIFT   (24)

Definition at line 43 of file opamp_common_all.h.

◆ OPAMP_CSR_TRIMOFFSETP_MASK

#define OPAMP_CSR_TRIMOFFSETP_MASK   (0x1f)

Definition at line 45 of file opamp_common_all.h.

◆ OPAMP_CSR_TRIMOFFSETP_SHIFT

#define OPAMP_CSR_TRIMOFFSETP_SHIFT   (19)

Definition at line 46 of file opamp_common_all.h.

◆ OPAMP_CSR_TSTREF

#define OPAMP_CSR_TSTREF   (0x1 << 29)

Definition at line 40 of file opamp_common_all.h.

◆ OPAMP_CSR_USER_TRIM

#define OPAMP_CSR_USER_TRIM   (0x1 << 18)

Definition at line 40 of file opamp_common_v1.h.

◆ OPAMP_CSR_VM_SEL_FOLLOWER_MODE

#define OPAMP_CSR_VM_SEL_FOLLOWER_MODE   (0x3)

Definition at line 66 of file opamp_common_v1.h.

◆ OPAMP_CSR_VM_SEL_MASK

#define OPAMP_CSR_VM_SEL_MASK   (0x3)

Definition at line 57 of file opamp_common_all.h.

◆ OPAMP_CSR_VM_SEL_PGA_MODE

#define OPAMP_CSR_VM_SEL_PGA_MODE   (0x2)

Definition at line 65 of file opamp_common_v1.h.

◆ OPAMP_CSR_VM_SEL_SHIFT

#define OPAMP_CSR_VM_SEL_SHIFT   (5)

Definition at line 58 of file opamp_common_all.h.

◆ OPAMP_CSR_VMS_SEL_MASK

#define OPAMP_CSR_VMS_SEL_MASK   (0x1)

Definition at line 60 of file opamp_common_v1.h.

◆ OPAMP_CSR_VMS_SEL_SHIFT

#define OPAMP_CSR_VMS_SEL_SHIFT   (8)

Definition at line 61 of file opamp_common_v1.h.

◆ OPAMP_CSR_VP_SEL_MASK

#define OPAMP_CSR_VP_SEL_MASK   (0x3)

Definition at line 60 of file opamp_common_all.h.

◆ OPAMP_CSR_VP_SEL_SHIFT

#define OPAMP_CSR_VP_SEL_SHIFT   (2)

Definition at line 61 of file opamp_common_all.h.

◆ OPAMP_CSR_VPS_SEL_MASK

#define OPAMP_CSR_VPS_SEL_MASK   (0x3)

Definition at line 57 of file opamp_common_v1.h.

◆ OPAMP_CSR_VPS_SEL_SHIFT

#define OPAMP_CSR_VPS_SEL_SHIFT   (9)

Definition at line 58 of file opamp_common_v1.h.

Function Documentation

◆ opamp_cal_disable()

void opamp_cal_disable ( uint32_t  base)

Definition at line 62 of file opamp_common_all.c.

References OPAMP_CSR.

◆ opamp_cal_enable()

void opamp_cal_enable ( uint32_t  base)

Definition at line 57 of file opamp_common_all.c.

References OPAMP_CSR, and OPAMP_CSR_CALON.

◆ opamp_disable()

void opamp_disable ( uint32_t  base)

Definition at line 31 of file opamp_common_all.c.

References OPAMP_CSR.

◆ opamp_enable()

void opamp_enable ( uint32_t  base)

Definition at line 26 of file opamp_common_all.c.

References OPAMP_CSR, and OPAMP_CSR_EN.

◆ opamp_force_vp_disable()

void opamp_force_vp_disable ( uint32_t  base)

Definition at line 52 of file opamp_common_all.c.

References OPAMP_CSR.

◆ opamp_force_vp_enable()

void opamp_force_vp_enable ( uint32_t  base)

Definition at line 47 of file opamp_common_all.c.

References OPAMP_CSR, and OPAMP_CSR_FORCE_VP.

◆ opamp_lock()

void opamp_lock ( uint32_t  base)

Definition at line 36 of file opamp_common_all.c.

References OPAMP_CSR, and OPAMP_CSR_LOCK.

◆ opamp_pga_gain_select()

void opamp_pga_gain_select ( uint32_t  base,
uint32_t  gain 
)

Definition at line 91 of file opamp_common_all.c.

References OPAMP_CSR, OPAMP_CSR_PGA_GAIN_MASK, and OPAMP_CSR_PGA_GAIN_SHIFT.

◆ opamp_read_outcal()

bool opamp_read_outcal ( uint32_t  base)

Definition at line 26 of file opamp_common_v1.c.

References OPAMP_CSR, OPAMP_CSR_OUTCAL_MASK, and OPAMP_CSR_OUTCAL_SHIFT.

◆ opamp_set_calsel()

void opamp_set_calsel ( uint32_t  base,
uint32_t  calsel 
)

Definition at line 41 of file opamp_common_all.c.

References OPAMP_CSR, OPAMP_CSR_CALSEL_MASK, and OPAMP_CSR_CALSEL_SHIFT.

◆ opamp_tcm_disable()

void opamp_tcm_disable ( uint32_t  base)

Definition at line 37 of file opamp_common_v1.c.

References OPAMP_CSR.

◆ opamp_tcm_enable()

void opamp_tcm_enable ( uint32_t  base)

Definition at line 32 of file opamp_common_v1.c.

References OPAMP_CSR, and OPAMP_CSR_TCM_EN.

◆ opamp_trimoffsetn_set()

void opamp_trimoffsetn_set ( uint32_t  base,
uint32_t  trim 
)

◆ opamp_trimoffsetp_set()

void opamp_trimoffsetp_set ( uint32_t  base,
uint32_t  trim 
)

◆ opamp_tstref_disable()

void opamp_tstref_disable ( uint32_t  base)

◆ opamp_tstref_enable()

void opamp_tstref_enable ( uint32_t  base)

◆ opamp_user_trim_disable()

void opamp_user_trim_disable ( uint32_t  base)

Definition at line 86 of file opamp_common_all.c.

References OPAMP_CSR.

◆ opamp_user_trim_enable()

void opamp_user_trim_enable ( uint32_t  base)

Definition at line 81 of file opamp_common_all.c.

References OPAMP_CSR, and OPAMP_CSR_USER_TRIM.

◆ opamp_vm_select()

void opamp_vm_select ( uint32_t  base,
uint32_t  vm 
)

Definition at line 105 of file opamp_common_all.c.

References OPAMP_CSR, OPAMP_CSR_VM_SEL_MASK, and OPAMP_CSR_VM_SEL_SHIFT.

◆ opamp_vms_select()

void opamp_vms_select ( uint32_t  base,
uint32_t  vms 
)

Definition at line 49 of file opamp_common_v1.c.

References OPAMP_CSR, OPAMP_CSR_VMS_SEL_MASK, and OPAMP_CSR_VMS_SEL_SHIFT.

◆ opamp_vp_select()

void opamp_vp_select ( uint32_t  base,
uint32_t  vp 
)

Definition at line 98 of file opamp_common_all.c.

References OPAMP_CSR, OPAMP_CSR_VP_SEL_MASK, and OPAMP_CSR_VP_SEL_SHIFT.

◆ opamp_vps_select()

void opamp_vps_select ( uint32_t  base,
uint32_t  vps 
)

Definition at line 42 of file opamp_common_v1.c.

References OPAMP_CSR, OPAMP_CSR_VPS_SEL_MASK, and OPAMP_CSR_VPS_SEL_SHIFT.