Documentation ¶
Overview ¶
Package dac provides interface to Digital to Analog Converter.
Peripheral: DAC_Periph Digital to Analog Converter. Instances:
DAC mmap.DAC_BASE
Registers:
0x00 32 CR 0x04 32 SWTRIGR 0x08 32 DHR12R1 0x0C 32 DHR12L1 0x10 32 DHR8R1 0x14 32 DHR12R2 0x18 32 DHR12L2 0x1C 32 DHR8R2 0x20 32 DHR12RD 0x24 32 DHR12LD 0x28 32 DHR8RD 0x2C 32 DOR1 0x30 32 DOR2
Import:
stm32/o/f10x_md/mmap
Index ¶
- Constants
- Variables
- type CR
- type DAC_Periph
- func (p *DAC_Periph) BOFF1() RMCR
- func (p *DAC_Periph) BOFF2() RMCR
- func (p *DAC_Periph) BaseAddr() uintptr
- func (p *DAC_Periph) DACC1DHR() RMDHR8RD
- func (p *DAC_Periph) DACC1DOR() RMDOR1
- func (p *DAC_Periph) DACC2DHR() RMDHR8RD
- func (p *DAC_Periph) DACC2DOR() RMDOR2
- func (p *DAC_Periph) DMAEN1() RMCR
- func (p *DAC_Periph) DMAEN2() RMCR
- func (p *DAC_Periph) EN1() RMCR
- func (p *DAC_Periph) EN2() RMCR
- func (p *DAC_Periph) MAMP1() RMCR
- func (p *DAC_Periph) MAMP2() RMCR
- func (p *DAC_Periph) SWTRIG1() RMSWTRIGR
- func (p *DAC_Periph) SWTRIG2() RMSWTRIGR
- func (p *DAC_Periph) TEN1() RMCR
- func (p *DAC_Periph) TEN2() RMCR
- func (p *DAC_Periph) TSEL1() RMCR
- func (p *DAC_Periph) TSEL2() RMCR
- func (p *DAC_Periph) WAVE1() RMCR
- func (p *DAC_Periph) WAVE2() RMCR
- type DHR12L1
- type DHR12L2
- type DHR12LD
- type DHR12R1
- type DHR12R2
- type DHR12RD
- type DHR8R1
- type DHR8R2
- type DHR8RD
- type DOR1
- type DOR2
- type RCR
- type RDHR12L1
- func (r *RDHR12L1) AtomicClearBits(mask DHR12L1)
- func (r *RDHR12L1) AtomicSetBits(mask DHR12L1)
- func (r *RDHR12L1) AtomicStoreBits(mask, b DHR12L1)
- func (r *RDHR12L1) Bits(mask DHR12L1) DHR12L1
- func (r *RDHR12L1) ClearBits(mask DHR12L1)
- func (r *RDHR12L1) Load() DHR12L1
- func (r *RDHR12L1) SetBits(mask DHR12L1)
- func (r *RDHR12L1) Store(b DHR12L1)
- func (r *RDHR12L1) StoreBits(mask, b DHR12L1)
- type RDHR12L2
- func (r *RDHR12L2) AtomicClearBits(mask DHR12L2)
- func (r *RDHR12L2) AtomicSetBits(mask DHR12L2)
- func (r *RDHR12L2) AtomicStoreBits(mask, b DHR12L2)
- func (r *RDHR12L2) Bits(mask DHR12L2) DHR12L2
- func (r *RDHR12L2) ClearBits(mask DHR12L2)
- func (r *RDHR12L2) Load() DHR12L2
- func (r *RDHR12L2) SetBits(mask DHR12L2)
- func (r *RDHR12L2) Store(b DHR12L2)
- func (r *RDHR12L2) StoreBits(mask, b DHR12L2)
- type RDHR12LD
- func (r *RDHR12LD) AtomicClearBits(mask DHR12LD)
- func (r *RDHR12LD) AtomicSetBits(mask DHR12LD)
- func (r *RDHR12LD) AtomicStoreBits(mask, b DHR12LD)
- func (r *RDHR12LD) Bits(mask DHR12LD) DHR12LD
- func (r *RDHR12LD) ClearBits(mask DHR12LD)
- func (r *RDHR12LD) Load() DHR12LD
- func (r *RDHR12LD) SetBits(mask DHR12LD)
- func (r *RDHR12LD) Store(b DHR12LD)
- func (r *RDHR12LD) StoreBits(mask, b DHR12LD)
- type RDHR12R1
- func (r *RDHR12R1) AtomicClearBits(mask DHR12R1)
- func (r *RDHR12R1) AtomicSetBits(mask DHR12R1)
- func (r *RDHR12R1) AtomicStoreBits(mask, b DHR12R1)
- func (r *RDHR12R1) Bits(mask DHR12R1) DHR12R1
- func (r *RDHR12R1) ClearBits(mask DHR12R1)
- func (r *RDHR12R1) Load() DHR12R1
- func (r *RDHR12R1) SetBits(mask DHR12R1)
- func (r *RDHR12R1) Store(b DHR12R1)
- func (r *RDHR12R1) StoreBits(mask, b DHR12R1)
- type RDHR12R2
- func (r *RDHR12R2) AtomicClearBits(mask DHR12R2)
- func (r *RDHR12R2) AtomicSetBits(mask DHR12R2)
- func (r *RDHR12R2) AtomicStoreBits(mask, b DHR12R2)
- func (r *RDHR12R2) Bits(mask DHR12R2) DHR12R2
- func (r *RDHR12R2) ClearBits(mask DHR12R2)
- func (r *RDHR12R2) Load() DHR12R2
- func (r *RDHR12R2) SetBits(mask DHR12R2)
- func (r *RDHR12R2) Store(b DHR12R2)
- func (r *RDHR12R2) StoreBits(mask, b DHR12R2)
- type RDHR12RD
- func (r *RDHR12RD) AtomicClearBits(mask DHR12RD)
- func (r *RDHR12RD) AtomicSetBits(mask DHR12RD)
- func (r *RDHR12RD) AtomicStoreBits(mask, b DHR12RD)
- func (r *RDHR12RD) Bits(mask DHR12RD) DHR12RD
- func (r *RDHR12RD) ClearBits(mask DHR12RD)
- func (r *RDHR12RD) Load() DHR12RD
- func (r *RDHR12RD) SetBits(mask DHR12RD)
- func (r *RDHR12RD) Store(b DHR12RD)
- func (r *RDHR12RD) StoreBits(mask, b DHR12RD)
- type RDHR8R1
- func (r *RDHR8R1) AtomicClearBits(mask DHR8R1)
- func (r *RDHR8R1) AtomicSetBits(mask DHR8R1)
- func (r *RDHR8R1) AtomicStoreBits(mask, b DHR8R1)
- func (r *RDHR8R1) Bits(mask DHR8R1) DHR8R1
- func (r *RDHR8R1) ClearBits(mask DHR8R1)
- func (r *RDHR8R1) Load() DHR8R1
- func (r *RDHR8R1) SetBits(mask DHR8R1)
- func (r *RDHR8R1) Store(b DHR8R1)
- func (r *RDHR8R1) StoreBits(mask, b DHR8R1)
- type RDHR8R2
- func (r *RDHR8R2) AtomicClearBits(mask DHR8R2)
- func (r *RDHR8R2) AtomicSetBits(mask DHR8R2)
- func (r *RDHR8R2) AtomicStoreBits(mask, b DHR8R2)
- func (r *RDHR8R2) Bits(mask DHR8R2) DHR8R2
- func (r *RDHR8R2) ClearBits(mask DHR8R2)
- func (r *RDHR8R2) Load() DHR8R2
- func (r *RDHR8R2) SetBits(mask DHR8R2)
- func (r *RDHR8R2) Store(b DHR8R2)
- func (r *RDHR8R2) StoreBits(mask, b DHR8R2)
- type RDHR8RD
- func (r *RDHR8RD) AtomicClearBits(mask DHR8RD)
- func (r *RDHR8RD) AtomicSetBits(mask DHR8RD)
- func (r *RDHR8RD) AtomicStoreBits(mask, b DHR8RD)
- func (r *RDHR8RD) Bits(mask DHR8RD) DHR8RD
- func (r *RDHR8RD) ClearBits(mask DHR8RD)
- func (r *RDHR8RD) Load() DHR8RD
- func (r *RDHR8RD) SetBits(mask DHR8RD)
- func (r *RDHR8RD) Store(b DHR8RD)
- func (r *RDHR8RD) StoreBits(mask, b DHR8RD)
- type RDOR1
- func (r *RDOR1) AtomicClearBits(mask DOR1)
- func (r *RDOR1) AtomicSetBits(mask DOR1)
- func (r *RDOR1) AtomicStoreBits(mask, b DOR1)
- func (r *RDOR1) Bits(mask DOR1) DOR1
- func (r *RDOR1) ClearBits(mask DOR1)
- func (r *RDOR1) Load() DOR1
- func (r *RDOR1) SetBits(mask DOR1)
- func (r *RDOR1) Store(b DOR1)
- func (r *RDOR1) StoreBits(mask, b DOR1)
- type RDOR2
- func (r *RDOR2) AtomicClearBits(mask DOR2)
- func (r *RDOR2) AtomicSetBits(mask DOR2)
- func (r *RDOR2) AtomicStoreBits(mask, b DOR2)
- func (r *RDOR2) Bits(mask DOR2) DOR2
- func (r *RDOR2) ClearBits(mask DOR2)
- func (r *RDOR2) Load() DOR2
- func (r *RDOR2) SetBits(mask DOR2)
- func (r *RDOR2) Store(b DOR2)
- func (r *RDOR2) StoreBits(mask, b DOR2)
- type RMCR
- type RMDHR12L1
- type RMDHR12L2
- type RMDHR12LD
- type RMDHR12R1
- type RMDHR12R2
- type RMDHR12RD
- type RMDHR8R1
- type RMDHR8R2
- type RMDHR8RD
- type RMDOR1
- type RMDOR2
- type RMSWTRIGR
- type RSWTRIGR
- func (r *RSWTRIGR) AtomicClearBits(mask SWTRIGR)
- func (r *RSWTRIGR) AtomicSetBits(mask SWTRIGR)
- func (r *RSWTRIGR) AtomicStoreBits(mask, b SWTRIGR)
- func (r *RSWTRIGR) Bits(mask SWTRIGR) SWTRIGR
- func (r *RSWTRIGR) ClearBits(mask SWTRIGR)
- func (r *RSWTRIGR) Load() SWTRIGR
- func (r *RSWTRIGR) SetBits(mask SWTRIGR)
- func (r *RSWTRIGR) Store(b SWTRIGR)
- func (r *RSWTRIGR) StoreBits(mask, b SWTRIGR)
- type SWTRIGR
Constants ¶
View Source
const ( EN1n = 0 BOFF1n = 1 TEN1n = 2 TSEL1n = 3 WAVE1n = 6 MAMP1n = 8 DMAEN1n = 12 EN2n = 16 BOFF2n = 17 TEN2n = 18 TSEL2n = 19 WAVE2n = 22 MAMP2n = 24 DMAEN2n = 28 )
View Source
const ( SWTRIG1n = 0 SWTRIG2n = 1 )
View Source
const ( DACC1DHRn = 0 DACC2DHRn = 16 )
View Source
const ( DACC1DHRn = 4 DACC2DHRn = 20 )
View Source
const ( DACC1DHRn = 0 DACC2DHRn = 8 )
View Source
const (
DACC1DHRn = 0
)
View Source
const (
DACC1DHRn = 4
)
View Source
const (
DACC1DHRn = 0
)
View Source
const (
DACC1DORn = 0
)
View Source
const (
DACC2DHRn = 0
)
View Source
const (
DACC2DHRn = 4
)
View Source
const (
DACC2DHRn = 0
)
View Source
const (
DACC2DORn = 0
)
Variables ¶
View Source
var DAC = (*DAC_Periph)(unsafe.Pointer(uintptr(mmap.DAC_BASE)))
Functions ¶
This section is empty.
Types ¶
type CR ¶
type CR uint32
const ( EN1 CR = 0x01 << 0 //+ DAC channel1 enable. BOFF1 CR = 0x01 << 1 //+ DAC channel1 output buffer disable. TEN1 CR = 0x01 << 2 //+ DAC channel1 Trigger enable. TSEL1 CR = 0x07 << 3 //+ TSEL1[2:0] (DAC channel1 Trigger selection). TSEL1_0 CR = 0x01 << 3 // Bit 0. TSEL1_1 CR = 0x02 << 3 // Bit 1. TSEL1_2 CR = 0x04 << 3 // Bit 2. WAVE1 CR = 0x03 << 6 //+ WAVE1[1:0] (DAC channel1 noise/triangle wave generation enable). WAVE1_0 CR = 0x01 << 6 // Bit 0. WAVE1_1 CR = 0x02 << 6 // Bit 1. MAMP1 CR = 0x0F << 8 //+ MAMP1[3:0] (DAC channel1 Mask/Amplitude selector). MAMP1_0 CR = 0x01 << 8 // Bit 0. MAMP1_1 CR = 0x02 << 8 // Bit 1. MAMP1_2 CR = 0x04 << 8 // Bit 2. MAMP1_3 CR = 0x08 << 8 // Bit 3. DMAEN1 CR = 0x01 << 12 //+ DAC channel1 DMA enable. EN2 CR = 0x01 << 16 //+ DAC channel2 enable. BOFF2 CR = 0x01 << 17 //+ DAC channel2 output buffer disable. TEN2 CR = 0x01 << 18 //+ DAC channel2 Trigger enable. TSEL2 CR = 0x07 << 19 //+ TSEL2[2:0] (DAC channel2 Trigger selection). TSEL2_0 CR = 0x01 << 19 // Bit 0. TSEL2_1 CR = 0x02 << 19 // Bit 1. TSEL2_2 CR = 0x04 << 19 // Bit 2. WAVE2 CR = 0x03 << 22 //+ WAVE2[1:0] (DAC channel2 noise/triangle wave generation enable). WAVE2_0 CR = 0x01 << 22 // Bit 0. WAVE2_1 CR = 0x02 << 22 // Bit 1. MAMP2 CR = 0x0F << 24 //+ MAMP2[3:0] (DAC channel2 Mask/Amplitude selector). MAMP2_0 CR = 0x01 << 24 // Bit 0. MAMP2_1 CR = 0x02 << 24 // Bit 1. MAMP2_2 CR = 0x04 << 24 // Bit 2. MAMP2_3 CR = 0x08 << 24 // Bit 3. DMAEN2 CR = 0x01 << 28 //+ DAC channel2 DMA enabled. )
type DAC_Periph ¶
type DAC_Periph struct { CR RCR SWTRIGR RSWTRIGR DHR12R1 RDHR12R1 DHR12L1 RDHR12L1 DHR8R1 RDHR8R1 DHR12R2 RDHR12R2 DHR12L2 RDHR12L2 DHR8R2 RDHR8R2 DHR12RD RDHR12RD DHR12LD RDHR12LD DHR8RD RDHR8RD DOR1 RDOR1 DOR2 RDOR2 }
func (*DAC_Periph) BOFF1 ¶
func (p *DAC_Periph) BOFF1() RMCR
func (*DAC_Periph) BOFF2 ¶
func (p *DAC_Periph) BOFF2() RMCR
func (*DAC_Periph) BaseAddr ¶
func (p *DAC_Periph) BaseAddr() uintptr
func (*DAC_Periph) DACC1DHR ¶
func (p *DAC_Periph) DACC1DHR() RMDHR8RD
func (*DAC_Periph) DACC1DOR ¶
func (p *DAC_Periph) DACC1DOR() RMDOR1
func (*DAC_Periph) DACC2DHR ¶
func (p *DAC_Periph) DACC2DHR() RMDHR8RD
func (*DAC_Periph) DACC2DOR ¶
func (p *DAC_Periph) DACC2DOR() RMDOR2
func (*DAC_Periph) DMAEN1 ¶
func (p *DAC_Periph) DMAEN1() RMCR
func (*DAC_Periph) DMAEN2 ¶
func (p *DAC_Periph) DMAEN2() RMCR
func (*DAC_Periph) EN1 ¶
func (p *DAC_Periph) EN1() RMCR
func (*DAC_Periph) EN2 ¶
func (p *DAC_Periph) EN2() RMCR
func (*DAC_Periph) MAMP1 ¶
func (p *DAC_Periph) MAMP1() RMCR
func (*DAC_Periph) MAMP2 ¶
func (p *DAC_Periph) MAMP2() RMCR
func (*DAC_Periph) SWTRIG1 ¶
func (p *DAC_Periph) SWTRIG1() RMSWTRIGR
func (*DAC_Periph) SWTRIG2 ¶
func (p *DAC_Periph) SWTRIG2() RMSWTRIGR
func (*DAC_Periph) TEN1 ¶
func (p *DAC_Periph) TEN1() RMCR
func (*DAC_Periph) TEN2 ¶
func (p *DAC_Periph) TEN2() RMCR
func (*DAC_Periph) TSEL1 ¶
func (p *DAC_Periph) TSEL1() RMCR
func (*DAC_Periph) TSEL2 ¶
func (p *DAC_Periph) TSEL2() RMCR
func (*DAC_Periph) WAVE1 ¶
func (p *DAC_Periph) WAVE1() RMCR
func (*DAC_Periph) WAVE2 ¶
func (p *DAC_Periph) WAVE2() RMCR
type DHR12L1 ¶
type DHR12L1 uint32
const (
DACC1DHR DHR12L1 = 0xFFF << 4 //+ DAC channel1 12-bit Left aligned data.
)
type DHR12L2 ¶
type DHR12L2 uint32
const (
DACC2DHR DHR12L2 = 0xFFF << 4 //+ DAC channel2 12-bit Left aligned data.
)
type DHR12R1 ¶
type DHR12R1 uint32
const (
DACC1DHR DHR12R1 = 0xFFF << 0 //+ DAC channel1 12-bit Right aligned data.
)
type DHR12R2 ¶
type DHR12R2 uint32
const (
DACC2DHR DHR12R2 = 0xFFF << 0 //+ DAC channel2 12-bit Right aligned data.
)
type DHR8R1 ¶
type DHR8R1 uint32
const (
DACC1DHR DHR8R1 = 0xFF << 0 //+ DAC channel1 8-bit Right aligned data.
)
type DHR8R2 ¶
type DHR8R2 uint32
const (
DACC2DHR DHR8R2 = 0xFF << 0 //+ DAC channel2 8-bit Right aligned data.
)
type RDHR12L1 ¶
func (*RDHR12L1) AtomicClearBits ¶
func (*RDHR12L1) AtomicSetBits ¶
func (*RDHR12L1) AtomicStoreBits ¶
type RDHR12L2 ¶
func (*RDHR12L2) AtomicClearBits ¶
func (*RDHR12L2) AtomicSetBits ¶
func (*RDHR12L2) AtomicStoreBits ¶
type RDHR12LD ¶
func (*RDHR12LD) AtomicClearBits ¶
func (*RDHR12LD) AtomicSetBits ¶
func (*RDHR12LD) AtomicStoreBits ¶
type RDHR12R1 ¶
func (*RDHR12R1) AtomicClearBits ¶
func (*RDHR12R1) AtomicSetBits ¶
func (*RDHR12R1) AtomicStoreBits ¶
type RDHR12R2 ¶
func (*RDHR12R2) AtomicClearBits ¶
func (*RDHR12R2) AtomicSetBits ¶
func (*RDHR12R2) AtomicStoreBits ¶
type RDHR12RD ¶
func (*RDHR12RD) AtomicClearBits ¶
func (*RDHR12RD) AtomicSetBits ¶
func (*RDHR12RD) AtomicStoreBits ¶
type RDHR8R1 ¶
func (*RDHR8R1) AtomicClearBits ¶
func (*RDHR8R1) AtomicSetBits ¶
func (*RDHR8R1) AtomicStoreBits ¶
type RDHR8R2 ¶
func (*RDHR8R2) AtomicClearBits ¶
func (*RDHR8R2) AtomicSetBits ¶
func (*RDHR8R2) AtomicStoreBits ¶
type RDHR8RD ¶
func (*RDHR8RD) AtomicClearBits ¶
func (*RDHR8RD) AtomicSetBits ¶
func (*RDHR8RD) AtomicStoreBits ¶
type RDOR1 ¶
func (*RDOR1) AtomicClearBits ¶
func (*RDOR1) AtomicSetBits ¶
func (*RDOR1) AtomicStoreBits ¶
type RDOR2 ¶
func (*RDOR2) AtomicClearBits ¶
func (*RDOR2) AtomicSetBits ¶
func (*RDOR2) AtomicStoreBits ¶
type RSWTRIGR ¶
func (*RSWTRIGR) AtomicClearBits ¶
func (*RSWTRIGR) AtomicSetBits ¶
func (*RSWTRIGR) AtomicStoreBits ¶
Click to show internal directories.
Click to hide internal directories.