Documentation ¶
Overview ¶
Package opamp provides interface to Operational Amplifier (OPAMP).
Peripheral: OPAMP_Periph Operational Amplifier (OPAMP). Instances:
OPAMP1 mmap.OPAMP1_BASE OPAMP mmap.OPAMP_BASE OPAMP2 mmap.OPAMP2_BASE OPAMP3 mmap.OPAMP3_BASE OPAMP4 mmap.OPAMP4_BASE
Registers:
0x00 32 CSR Control and status register.
Import:
stm32/o/f303xe/mmap
Index ¶
- Constants
- Variables
- type CSR
- type OPAMP_Periph
- func (p *OPAMP_Periph) BaseAddr() uintptr
- func (p *OPAMP_Periph) CALON() RMCSR
- func (p *OPAMP_Periph) CALSEL() RMCSR
- func (p *OPAMP_Periph) FORCEVP() RMCSR
- func (p *OPAMP_Periph) LOCK() RMCSR
- func (p *OPAMP_Periph) OPAMPxEN() RMCSR
- func (p *OPAMP_Periph) OUTCAL() RMCSR
- func (p *OPAMP_Periph) PGGAIN() RMCSR
- func (p *OPAMP_Periph) TCMEN() RMCSR
- func (p *OPAMP_Periph) TRIMOFFSETN() RMCSR
- func (p *OPAMP_Periph) TRIMOFFSETP() RMCSR
- func (p *OPAMP_Periph) TSTREF() RMCSR
- func (p *OPAMP_Periph) USERTRIM() RMCSR
- func (p *OPAMP_Periph) VMSEL() RMCSR
- func (p *OPAMP_Periph) VMSSEL() RMCSR
- func (p *OPAMP_Periph) VPSEL() RMCSR
- func (p *OPAMP_Periph) VPSSEL() RMCSR
- type RCSR
- func (r *RCSR) AtomicClearBits(mask CSR)
- func (r *RCSR) AtomicSetBits(mask CSR)
- func (r *RCSR) AtomicStoreBits(mask, b CSR)
- func (r *RCSR) Bits(mask CSR) CSR
- func (r *RCSR) ClearBits(mask CSR)
- func (r *RCSR) Load() CSR
- func (r *RCSR) SetBits(mask CSR)
- func (r *RCSR) Store(b CSR)
- func (r *RCSR) StoreBits(mask, b CSR)
- type RMCSR
Constants ¶
View Source
const ( OPAMPxENn = 0 FORCEVPn = 1 VPSELn = 2 VMSELn = 5 TCMENn = 7 VMSSELn = 8 VPSSELn = 9 CALONn = 11 CALSELn = 12 PGGAINn = 14 USERTRIMn = 18 TRIMOFFSETPn = 19 TRIMOFFSETNn = 24 TSTREFn = 29 OUTCALn = 30 LOCKn = 31 )
Variables ¶
View Source
var OPAMP = (*OPAMP_Periph)(unsafe.Pointer(uintptr(mmap.OPAMP_BASE)))
View Source
var OPAMP1 = (*OPAMP_Periph)(unsafe.Pointer(uintptr(mmap.OPAMP1_BASE)))
View Source
var OPAMP2 = (*OPAMP_Periph)(unsafe.Pointer(uintptr(mmap.OPAMP2_BASE)))
View Source
var OPAMP3 = (*OPAMP_Periph)(unsafe.Pointer(uintptr(mmap.OPAMP3_BASE)))
View Source
var OPAMP4 = (*OPAMP_Periph)(unsafe.Pointer(uintptr(mmap.OPAMP4_BASE)))
Functions ¶
This section is empty.
Types ¶
type CSR ¶
type CSR uint32
const ( OPAMPxEN CSR = 0x01 << 0 //+ OPAMP enable. FORCEVP CSR = 0x01 << 1 //+ Connect the internal references to the plus input of the OPAMPX. VPSEL CSR = 0x03 << 2 //+ Non inverting input selection. VMSEL CSR = 0x03 << 5 //+ Inverting input selection. TCMEN CSR = 0x01 << 7 //+ Timer-Controlled Mux mode enable. VMSSEL CSR = 0x01 << 8 //+ Inverting input secondary selection. VPSSEL CSR = 0x03 << 9 //+ Non inverting input secondary selection. CALON CSR = 0x01 << 11 //+ Calibration mode enable. CALSEL CSR = 0x03 << 12 //+ Calibration selection. PGGAIN CSR = 0x0F << 14 //+ Gain in PGA mode. USERTRIM CSR = 0x01 << 18 //+ User trimming enable. TRIMOFFSETP CSR = 0x1F << 19 //+ Offset trimming value (PMOS). TRIMOFFSETN CSR = 0x1F << 24 //+ Offset trimming value (NMOS). TSTREF CSR = 0x01 << 29 //+ It enables the switch to put out the internal reference. OUTCAL CSR = 0x01 << 30 //+ OPAMP ouput status flag. LOCK CSR = 0x01 << 31 //+ OPAMP lock. )
type OPAMP_Periph ¶
type OPAMP_Periph struct {
CSR RCSR
}
func (*OPAMP_Periph) BaseAddr ¶
func (p *OPAMP_Periph) BaseAddr() uintptr
func (*OPAMP_Periph) CALON ¶
func (p *OPAMP_Periph) CALON() RMCSR
func (*OPAMP_Periph) CALSEL ¶
func (p *OPAMP_Periph) CALSEL() RMCSR
func (*OPAMP_Periph) FORCEVP ¶
func (p *OPAMP_Periph) FORCEVP() RMCSR
func (*OPAMP_Periph) LOCK ¶
func (p *OPAMP_Periph) LOCK() RMCSR
func (*OPAMP_Periph) OPAMPxEN ¶
func (p *OPAMP_Periph) OPAMPxEN() RMCSR
func (*OPAMP_Periph) OUTCAL ¶
func (p *OPAMP_Periph) OUTCAL() RMCSR
func (*OPAMP_Periph) PGGAIN ¶
func (p *OPAMP_Periph) PGGAIN() RMCSR
func (*OPAMP_Periph) TCMEN ¶
func (p *OPAMP_Periph) TCMEN() RMCSR
func (*OPAMP_Periph) TRIMOFFSETN ¶
func (p *OPAMP_Periph) TRIMOFFSETN() RMCSR
func (*OPAMP_Periph) TRIMOFFSETP ¶
func (p *OPAMP_Periph) TRIMOFFSETP() RMCSR
func (*OPAMP_Periph) TSTREF ¶
func (p *OPAMP_Periph) TSTREF() RMCSR
func (*OPAMP_Periph) USERTRIM ¶
func (p *OPAMP_Periph) USERTRIM() RMCSR
func (*OPAMP_Periph) VMSEL ¶
func (p *OPAMP_Periph) VMSEL() RMCSR
func (*OPAMP_Periph) VMSSEL ¶
func (p *OPAMP_Periph) VMSSEL() RMCSR
func (*OPAMP_Periph) VPSEL ¶
func (p *OPAMP_Periph) VPSEL() RMCSR
func (*OPAMP_Periph) VPSSEL ¶
func (p *OPAMP_Periph) VPSSEL() RMCSR
type RCSR ¶
func (*RCSR) AtomicClearBits ¶
func (*RCSR) AtomicSetBits ¶
func (*RCSR) AtomicStoreBits ¶
Click to show internal directories.
Click to hide internal directories.