Documentation ¶
Overview ¶
Package comp provides interface to Comparator.
Peripheral: COMP_Periph Comparator. Instances:
COMP mmap.COMP_BASE
Registers:
0x00 32 CSR Comparator control and status register.
Import:
stm32/o/l1xx_md/mmap
Index ¶
- Constants
- Variables
- type COMP_Periph
- func (p *COMP_Periph) BaseAddr() uintptr
- func (p *COMP_Periph) CAIE() RMCSR
- func (p *COMP_Periph) CAIF() RMCSR
- func (p *COMP_Periph) CMP1EN() RMCSR
- func (p *COMP_Periph) CMP1OUT() RMCSR
- func (p *COMP_Periph) CMP2OUT() RMCSR
- func (p *COMP_Periph) FCH3() RMCSR
- func (p *COMP_Periph) FCH8() RMCSR
- func (p *COMP_Periph) INSEL() RMCSR
- func (p *COMP_Periph) OUTSEL() RMCSR
- func (p *COMP_Periph) RCH13() RMCSR
- func (p *COMP_Periph) SPEED() RMCSR
- func (p *COMP_Periph) SW1() RMCSR
- func (p *COMP_Periph) TSUSP() RMCSR
- func (p *COMP_Periph) V10KPD() RMCSR
- func (p *COMP_Periph) V10KPU() RMCSR
- func (p *COMP_Periph) V400KPD() RMCSR
- func (p *COMP_Periph) V400KPU() RMCSR
- func (p *COMP_Periph) VREFOUTEN() RMCSR
- func (p *COMP_Periph) WNDWE() RMCSR
- type CSR
- 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 ( V10KPUn = 0 V400KPUn = 1 V10KPDn = 2 V400KPDn = 3 CMP1ENn = 4 SW1n = 5 CMP1OUTn = 7 SPEEDn = 12 CMP2OUTn = 13 VREFOUTENn = 16 WNDWEn = 17 INSELn = 18 OUTSELn = 21 FCH3n = 26 FCH8n = 27 RCH13n = 28 CAIEn = 29 CAIFn = 30 TSUSPn = 31 )
Variables ¶
View Source
var COMP = (*COMP_Periph)(unsafe.Pointer(uintptr(mmap.COMP_BASE)))
Functions ¶
This section is empty.
Types ¶
type COMP_Periph ¶
type COMP_Periph struct {
CSR RCSR
}
func (*COMP_Periph) BaseAddr ¶
func (p *COMP_Periph) BaseAddr() uintptr
func (*COMP_Periph) CAIE ¶
func (p *COMP_Periph) CAIE() RMCSR
func (*COMP_Periph) CAIF ¶
func (p *COMP_Periph) CAIF() RMCSR
func (*COMP_Periph) CMP1EN ¶
func (p *COMP_Periph) CMP1EN() RMCSR
func (*COMP_Periph) CMP1OUT ¶
func (p *COMP_Periph) CMP1OUT() RMCSR
func (*COMP_Periph) CMP2OUT ¶
func (p *COMP_Periph) CMP2OUT() RMCSR
func (*COMP_Periph) FCH3 ¶
func (p *COMP_Periph) FCH3() RMCSR
func (*COMP_Periph) FCH8 ¶
func (p *COMP_Periph) FCH8() RMCSR
func (*COMP_Periph) INSEL ¶
func (p *COMP_Periph) INSEL() RMCSR
func (*COMP_Periph) OUTSEL ¶
func (p *COMP_Periph) OUTSEL() RMCSR
func (*COMP_Periph) RCH13 ¶
func (p *COMP_Periph) RCH13() RMCSR
func (*COMP_Periph) SPEED ¶
func (p *COMP_Periph) SPEED() RMCSR
func (*COMP_Periph) SW1 ¶
func (p *COMP_Periph) SW1() RMCSR
func (*COMP_Periph) TSUSP ¶
func (p *COMP_Periph) TSUSP() RMCSR
func (*COMP_Periph) V10KPD ¶
func (p *COMP_Periph) V10KPD() RMCSR
func (*COMP_Periph) V10KPU ¶
func (p *COMP_Periph) V10KPU() RMCSR
func (*COMP_Periph) V400KPD ¶
func (p *COMP_Periph) V400KPD() RMCSR
func (*COMP_Periph) V400KPU ¶
func (p *COMP_Periph) V400KPU() RMCSR
func (*COMP_Periph) VREFOUTEN ¶
func (p *COMP_Periph) VREFOUTEN() RMCSR
func (*COMP_Periph) WNDWE ¶
func (p *COMP_Periph) WNDWE() RMCSR
type CSR ¶
type CSR uint32
const ( V10KPU CSR = 0x01 << 0 //+ 10K pull-up resistor. V400KPU CSR = 0x01 << 1 //+ 400K pull-up resistor. V10KPD CSR = 0x01 << 2 //+ 10K pull-down resistor. V400KPD CSR = 0x01 << 3 //+ 400K pull-down resistor. CMP1EN CSR = 0x01 << 4 //+ Comparator 1 enable. SW1 CSR = 0x01 << 5 //+ SW1 analog switch enable. CMP1OUT CSR = 0x01 << 7 //+ Comparator 1 output. SPEED CSR = 0x01 << 12 //+ Comparator 2 speed. CMP2OUT CSR = 0x01 << 13 //+ Comparator 2 ouput. VREFOUTEN CSR = 0x01 << 16 //+ Comparator Vref Enable. WNDWE CSR = 0x01 << 17 //+ Window mode enable. INSEL CSR = 0x07 << 18 //+ INSEL[2:0] Inversion input Selection. INSEL_0 CSR = 0x01 << 18 // Bit 0. INSEL_1 CSR = 0x02 << 18 // Bit 1. INSEL_2 CSR = 0x04 << 18 // Bit 2. OUTSEL CSR = 0x07 << 21 //+ OUTSEL[2:0] comparator 2 output redirection. OUTSEL_0 CSR = 0x01 << 21 // Bit 0. OUTSEL_1 CSR = 0x02 << 21 // Bit 1. OUTSEL_2 CSR = 0x04 << 21 // Bit 2. FCH3 CSR = 0x01 << 26 //+ Bit 26. FCH8 CSR = 0x01 << 27 //+ Bit 27. RCH13 CSR = 0x01 << 28 //+ Bit 28. CAIE CSR = 0x01 << 29 //+ Bit 29. CAIF CSR = 0x01 << 30 //+ Bit 30. TSUSP CSR = 0x01 << 31 //+ Bit 31. )
type RCSR ¶
func (*RCSR) AtomicClearBits ¶
func (*RCSR) AtomicSetBits ¶
func (*RCSR) AtomicStoreBits ¶
Click to show internal directories.
Click to hide internal directories.