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

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

Collaboration diagram for OPAMP Defines:

Macros

#define OPAMP1   (OPAMP_BASE + 0x00)
 
#define OPAMP2   (OPAMP_BASE + 0x04)
 
#define OPAMP3   (OPAMP_BASE + 0x08)
 
#define OPAMP4   (OPAMP_BASE + 0x0C)
 
#define OPAMP5   (OPAMP_BASE + 0x10)
 
#define OPAMP6   (OPAMP_BASE + 0x14)
 
#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 OPAMP5_CSR   OPAMP_CSR(OPAMP5)
 
#define OPAMP6_CSR   OPAMP_CSR(OPAMP6)
 
#define OPAMP1_TCMR   OPAMP_TCMR(OPAMP1)
 
#define OPAMP2_TCMR   OPAMP_TCMR(OPAMP2)
 
#define OPAMP3_TCMR   OPAMP_TCMR(OPAMP3)
 
#define OPAMP4_TCMR   OPAMP_TCMR(OPAMP4)
 
#define OPAMP5_TCMR   OPAMP_TCMR(OPAMP5)
 
#define OPAMP6_TCMR   OPAMP_TCMR(OPAMP6)
 
#define OPAMP1_CSR_VP_SEL_DAC3CH1   (0x3)
 
#define OPAMP2_CSR_VP_SEL_VINP3   (0x3)
 
#define OPAMP3_CSR_VP_SEL_DAC3CH2   (0x3)
 
#define OPAMP4_CSR_VP_SEL_DAC4CH1   (0x3)
 
#define OPAMP5_CSR_VP_SEL_DAC4CH2   (0x3)
 
#define OPAMP6_CSR_VP_SEL_DAC3CH1   (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_TCMR(opamp_base)   MMIO32((opamp_base) + 0x18)
 
#define OPAMP_CSR_CALOUT_MASK   (0x1)
 
#define OPAMP_CSR_CALOUT_SHIFT   (30)
 
#define OPAMP_CSR_CALOUT_UNSUCC   (0x0)
 
#define OPAMP_CSR_CALOUT_SUCC   (0x1)
 
#define OPAMP_CSR_PGA_GAIN_MASK   (0x1f)
 
#define OPAMP_CSR_PGA_GAIN_SHIFT   (14)
 
#define OPAMP_CSR_PGA_GAIN_2   (0x00)
 
#define OPAMP_CSR_PGA_GAIN_4   (0x01)
 
#define OPAMP_CSR_PGA_GAIN_8   (0x02)
 
#define OPAMP_CSR_PGA_GAIN_16   (0x03)
 
#define OPAMP_CSR_PGA_GAIN_32   (0x04)
 
#define OPAMP_CSR_PGA_GAIN_64   (0x05)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_1_GAIN_2_VM0   (0x08)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_3_GAIN_4_VM0   (0x09)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_7_GAIN_8_VM0   (0x0A)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_15_GAIN_16_VM0   (0x0B)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_31_GAIN_32_VM0   (0x0C)
 
#define OPAMP_CSR_PGA_INV_GAIN_MINUS_63_GAIN_64_VM0   (0x0D)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_2   (0x10)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_4   (0x11)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_8   (0x12)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_16   (0x13)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_32   (0x14)
 
#define OPAMP_CSR_PGA_FILT_VM0_GAIN_64   (0x15)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_1_GAIN_2_VM0   (0x18)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_3_GAIN_4_VM0   (0x19)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_7_GAIN_8_VM0   (0x1a)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_15_GAIN_16_VM0   (0x1B)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_31_GAIN_32_VM0   (0x1c)
 
#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_63_GAIN_64_VM0   (0x1d)
 
#define OPAMP_CSR_OPAINTOEN   (0x1 << 8)
 
#define OPAMP_CSR_OPAHSM   (0x1 << 7)
 
#define OPAMP_CSR_VM_SEL_VINM0_IN   (0x0)
 
#define OPAMP_CSR_VM_SEL_VINM1_IN   (0x1)
 
#define OPAMP_CSR_VM_SEL_PGA_MODE   (0x2)
 
#define OPAMP_CSR_VM_SEL_OUT_IN   (0x3)
 
#define OPAMP_CSR_USER_TRIM   (0x1 << 4)
 
#define OPAMP_CSR_VP_SEL_VINP0   (0x0)
 
#define OPAMP_CSR_VP_SEL_VINP1   (0x1)
 
#define OPAMP_CSR_VP_SEL_VINP2   (0x2)
 

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_calout (uint32_t base)
 
void opamp_high_speed_mode_enable (uint32_t base)
 
void opamp_high_speed_mode_disable (uint32_t base)
 
void opamp_output_set_internal (uint32_t base)
 
void opamp_output_set_external (uint32_t base)
 

Detailed Description

libopencm3 Defined Constants and Types for the STM32G4xx Operational Amplifier module

Version
1.0.0
Date
10 Dec 2020

LGPL License Terms libopencm3 License

Date
10 Dec 2020

LGPL License Terms libopencm3 License

Macro Definition Documentation

◆ OPAMP1

#define OPAMP1   (OPAMP_BASE + 0x00)

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

◆ OPAMP1_CSR

#define OPAMP1_CSR   OPAMP_CSR(OPAMP1)

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

◆ OPAMP1_CSR_VP_SEL_DAC3CH1

#define OPAMP1_CSR_VP_SEL_DAC3CH1   (0x3)

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

◆ OPAMP1_TCMR

#define OPAMP1_TCMR   OPAMP_TCMR(OPAMP1)

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

◆ OPAMP2

#define OPAMP2   (OPAMP_BASE + 0x04)

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

◆ OPAMP2_CSR

#define OPAMP2_CSR   OPAMP_CSR(OPAMP2)

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

◆ OPAMP2_CSR_VP_SEL_VINP3

#define OPAMP2_CSR_VP_SEL_VINP3   (0x3)

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

◆ OPAMP2_TCMR

#define OPAMP2_TCMR   OPAMP_TCMR(OPAMP2)

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

◆ OPAMP3

#define OPAMP3   (OPAMP_BASE + 0x08)

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

◆ OPAMP3_CSR

#define OPAMP3_CSR   OPAMP_CSR(OPAMP3)

Definition at line 49 of file g4/opamp.h.

◆ OPAMP3_CSR_VP_SEL_DAC3CH2

#define OPAMP3_CSR_VP_SEL_DAC3CH2   (0x3)

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

◆ OPAMP3_TCMR

#define OPAMP3_TCMR   OPAMP_TCMR(OPAMP3)

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

◆ OPAMP4

#define OPAMP4   (OPAMP_BASE + 0x0C)

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

◆ OPAMP4_CSR

#define OPAMP4_CSR   OPAMP_CSR(OPAMP4)

Definition at line 50 of file g4/opamp.h.

◆ OPAMP4_CSR_VP_SEL_DAC4CH1

#define OPAMP4_CSR_VP_SEL_DAC4CH1   (0x3)

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

◆ OPAMP4_TCMR

#define OPAMP4_TCMR   OPAMP_TCMR(OPAMP4)

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

◆ OPAMP5

#define OPAMP5   (OPAMP_BASE + 0x10)

Definition at line 41 of file g4/opamp.h.

◆ OPAMP5_CSR

#define OPAMP5_CSR   OPAMP_CSR(OPAMP5)

Definition at line 51 of file g4/opamp.h.

◆ OPAMP5_CSR_VP_SEL_DAC4CH2

#define OPAMP5_CSR_VP_SEL_DAC4CH2   (0x3)

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

◆ OPAMP5_TCMR

#define OPAMP5_TCMR   OPAMP_TCMR(OPAMP5)

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

◆ OPAMP6

#define OPAMP6   (OPAMP_BASE + 0x14)

Definition at line 42 of file g4/opamp.h.

◆ OPAMP6_CSR

#define OPAMP6_CSR   OPAMP_CSR(OPAMP6)

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

◆ OPAMP6_CSR_VP_SEL_DAC3CH1

#define OPAMP6_CSR_VP_SEL_DAC3CH1   (0x3)

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

◆ OPAMP6_TCMR

#define OPAMP6_TCMR   OPAMP_TCMR(OPAMP6)

Definition at line 59 of file g4/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_CALOUT_MASK

#define OPAMP_CSR_CALOUT_MASK   (0x1)

Definition at line 40 of file opamp_common_v2.h.

◆ OPAMP_CSR_CALOUT_SHIFT

#define OPAMP_CSR_CALOUT_SHIFT   (30)

Definition at line 41 of file opamp_common_v2.h.

◆ OPAMP_CSR_CALOUT_SUCC

#define OPAMP_CSR_CALOUT_SUCC   (0x1)

Definition at line 43 of file opamp_common_v2.h.

◆ OPAMP_CSR_CALOUT_UNSUCC

#define OPAMP_CSR_CALOUT_UNSUCC   (0x0)

Definition at line 42 of file opamp_common_v2.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_OPAHSM

#define OPAMP_CSR_OPAHSM   (0x1 << 7)

Definition at line 80 of file opamp_common_v2.h.

◆ OPAMP_CSR_OPAINTOEN

#define OPAMP_CSR_OPAINTOEN   (0x1 << 8)

Definition at line 78 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_16

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_16   (0x13)

Definition at line 66 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_2

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_2   (0x10)

Definition at line 63 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_32

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_32   (0x14)

Definition at line 67 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_4

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_4   (0x11)

Definition at line 64 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_64

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_64   (0x15)

Definition at line 68 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM0_GAIN_8

#define OPAMP_CSR_PGA_FILT_VM0_GAIN_8   (0x12)

Definition at line 65 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_15_GAIN_16_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_15_GAIN_16_VM0   (0x1B)

Definition at line 74 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_1_GAIN_2_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_1_GAIN_2_VM0   (0x18)

Definition at line 71 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_31_GAIN_32_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_31_GAIN_32_VM0   (0x1c)

Definition at line 75 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_3_GAIN_4_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_3_GAIN_4_VM0   (0x19)

Definition at line 72 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_63_GAIN_64_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_63_GAIN_64_VM0   (0x1d)

Definition at line 76 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_7_GAIN_8_VM0

#define OPAMP_CSR_PGA_FILT_VM1_INV_GAIN_MINUS_7_GAIN_8_VM0   (0x1a)

Definition at line 73 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_16

#define OPAMP_CSR_PGA_GAIN_16   (0x03)

Definition at line 52 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_2

#define OPAMP_CSR_PGA_GAIN_2   (0x00)

Definition at line 49 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_32

#define OPAMP_CSR_PGA_GAIN_32   (0x04)

Definition at line 53 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_4

#define OPAMP_CSR_PGA_GAIN_4   (0x01)

Definition at line 50 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_64

#define OPAMP_CSR_PGA_GAIN_64   (0x05)

Definition at line 54 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_8

#define OPAMP_CSR_PGA_GAIN_8   (0x02)

Definition at line 51 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_MASK

#define OPAMP_CSR_PGA_GAIN_MASK   (0x1f)

Definition at line 45 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_GAIN_SHIFT

#define OPAMP_CSR_PGA_GAIN_SHIFT   (14)

Definition at line 46 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_15_GAIN_16_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_15_GAIN_16_VM0   (0x0B)

Definition at line 59 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_1_GAIN_2_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_1_GAIN_2_VM0   (0x08)

Definition at line 56 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_31_GAIN_32_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_31_GAIN_32_VM0   (0x0C)

Definition at line 60 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_3_GAIN_4_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_3_GAIN_4_VM0   (0x09)

Definition at line 57 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_63_GAIN_64_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_63_GAIN_64_VM0   (0x0D)

Definition at line 61 of file opamp_common_v2.h.

◆ OPAMP_CSR_PGA_INV_GAIN_MINUS_7_GAIN_8_VM0

#define OPAMP_CSR_PGA_INV_GAIN_MINUS_7_GAIN_8_VM0   (0x0A)

Definition at line 58 of file opamp_common_v2.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 << 4)

Definition at line 87 of file opamp_common_v2.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_OUT_IN

#define OPAMP_CSR_VM_SEL_OUT_IN   (0x3)

Definition at line 85 of file opamp_common_v2.h.

◆ OPAMP_CSR_VM_SEL_PGA_MODE

#define OPAMP_CSR_VM_SEL_PGA_MODE   (0x2)

Definition at line 84 of file opamp_common_v2.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_VM_SEL_VINM0_IN

#define OPAMP_CSR_VM_SEL_VINM0_IN   (0x0)

Definition at line 82 of file opamp_common_v2.h.

◆ OPAMP_CSR_VM_SEL_VINM1_IN

#define OPAMP_CSR_VM_SEL_VINM1_IN   (0x1)

Definition at line 83 of file opamp_common_v2.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_VP_SEL_VINP0

#define OPAMP_CSR_VP_SEL_VINP0   (0x0)

Definition at line 89 of file opamp_common_v2.h.

◆ OPAMP_CSR_VP_SEL_VINP1

#define OPAMP_CSR_VP_SEL_VINP1   (0x1)

Definition at line 90 of file opamp_common_v2.h.

◆ OPAMP_CSR_VP_SEL_VINP2

#define OPAMP_CSR_VP_SEL_VINP2   (0x2)

Definition at line 91 of file opamp_common_v2.h.

◆ OPAMP_TCMR

#define OPAMP_TCMR (   opamp_base)    MMIO32((opamp_base) + 0x18)

Definition at line 36 of file opamp_common_v2.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_high_speed_mode_disable()

void opamp_high_speed_mode_disable ( uint32_t  base)

Definition at line 37 of file opamp_common_v2.c.

References OPAMP_CSR.

◆ opamp_high_speed_mode_enable()

void opamp_high_speed_mode_enable ( uint32_t  base)

Definition at line 32 of file opamp_common_v2.c.

References OPAMP_CSR, and OPAMP_CSR_OPAHSM.

◆ 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_output_set_external()

void opamp_output_set_external ( uint32_t  base)

Definition at line 47 of file opamp_common_v2.c.

References OPAMP_CSR.

◆ opamp_output_set_internal()

void opamp_output_set_internal ( uint32_t  base)

Definition at line 42 of file opamp_common_v2.c.

References OPAMP_CSR, and OPAMP_CSR_OPAINTOEN.

◆ 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_calout()

bool opamp_read_calout ( uint32_t  base)

Definition at line 26 of file opamp_common_v2.c.

References OPAMP_CSR, OPAMP_CSR_CALOUT_MASK, and OPAMP_CSR_CALOUT_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_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_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.