syscfg

package
v0.0.0-...-168ccc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package syscfg provides interface to System configuration controller.

Peripheral: SYSCFG_Periph System configuration controller. Instances:

SYSCFG  mmap.SYSCFG_BASE

Registers:

0x00 32  MEMRMP    Memory remap register.
0x04 32  PMC       Peripheral mode configuration register.
0x08 32  EXTICR[4] External interrupt configuration registers.
0x20 32  CMPCR     Compensation cell control register.

Import:

stm32/o/f40_41xxx/mmap

Index

Constants

View Source
const (
	MEM_MODEn = 0
	FB_MODEn  = 8
	SWP_FMCn  = 10
)
View Source
const (
	ADCxDC2n      = 16
	MII_RMII_SELn = 23
)
View Source
const (
	EXTI0n = 0
	EXTI1n = 4
	EXTI2n = 8
	EXTI3n = 12
)
View Source
const (
	CMP_PDn = 0
	READYn  = 8
)

Variables

Functions

This section is empty.

Types

type CMPCR

type CMPCR uint32
const (
	CMP_PD CMPCR = 0x01 << 0 //+ Compensation cell ready flag.
	READY  CMPCR = 0x01 << 8 //+ Compensation cell power-down.
)

func (CMPCR) Field

func (b CMPCR) Field(mask CMPCR) int

func (CMPCR) J

func (mask CMPCR) J(v int) CMPCR

type EXTICR

type EXTICR uint32
const (
	EXTI0    EXTICR = 0x0F << 0  //+ EXTI 0 configuration.
	EXTI1    EXTICR = 0x0F << 4  //+ EXTI 1 configuration.
	EXTI2    EXTICR = 0x0F << 8  //+ EXTI 2 configuration.
	EXTI3    EXTICR = 0x0F << 12 //+ EXTI 3 configuration.
	EXTI0_PA EXTICR = 0x00 << 12 //  PA[0] pin.
	EXTI0_PB EXTICR = 0x01 << 0  //  PB[0] pin.
	EXTI0_PC EXTICR = 0x02 << 0  //  PC[0] pin.
	EXTI0_PD EXTICR = 0x03 << 0  //  PD[0] pin.
	EXTI0_PE EXTICR = 0x04 << 0  //  PE[0] pin.
	EXTI0_PF EXTICR = 0x05 << 0  //  PF[0] pin.
	EXTI0_PG EXTICR = 0x06 << 0  //  PG[0] pin.
	EXTI0_PH EXTICR = 0x07 << 0  //  PH[0] pin.
	EXTI0_PI EXTICR = 0x08 << 0  //  PI[0] pin.
	EXTI0_PJ EXTICR = 0x09 << 0  //  PJ[0] pin.
	EXTI0_PK EXTICR = 0x0A << 0  //  PK[0] pin.
	EXTI1_PA EXTICR = 0x00 << 12 //  PA[1] pin.
	EXTI1_PB EXTICR = 0x01 << 4  //  PB[1] pin.
	EXTI1_PC EXTICR = 0x02 << 4  //  PC[1] pin.
	EXTI1_PD EXTICR = 0x03 << 4  //  PD[1] pin.
	EXTI1_PE EXTICR = 0x04 << 4  //  PE[1] pin.
	EXTI1_PF EXTICR = 0x05 << 4  //  PF[1] pin.
	EXTI1_PG EXTICR = 0x06 << 4  //  PG[1] pin.
	EXTI1_PH EXTICR = 0x07 << 4  //  PH[1] pin.
	EXTI1_PI EXTICR = 0x08 << 4  //  PI[1] pin.
	EXTI1_PJ EXTICR = 0x09 << 4  //  PJ[1] pin.
	EXTI1_PK EXTICR = 0x0A << 4  //  PK[1] pin.
	EXTI2_PA EXTICR = 0x00 << 12 //  PA[2] pin.
	EXTI2_PB EXTICR = 0x01 << 8  //  PB[2] pin.
	EXTI2_PC EXTICR = 0x02 << 8  //  PC[2] pin.
	EXTI2_PD EXTICR = 0x03 << 8  //  PD[2] pin.
	EXTI2_PE EXTICR = 0x04 << 8  //  PE[2] pin.
	EXTI2_PF EXTICR = 0x05 << 8  //  PF[2] pin.
	EXTI2_PG EXTICR = 0x06 << 8  //  PG[2] pin.
	EXTI2_PH EXTICR = 0x07 << 8  //  PH[2] pin.
	EXTI2_PI EXTICR = 0x08 << 8  //  PI[2] pin.
	EXTI2_PJ EXTICR = 0x09 << 8  //  PJ[2] pin.
	EXTI2_PK EXTICR = 0x0A << 8  //  PK[2] pin.
	EXTI3_PA EXTICR = 0x00 << 12 //  PA[3] pin.
	EXTI3_PB EXTICR = 0x01 << 12 //  PB[3] pin.
	EXTI3_PC EXTICR = 0x02 << 12 //  PC[3] pin.
	EXTI3_PD EXTICR = 0x03 << 12 //  PD[3] pin.
	EXTI3_PE EXTICR = 0x04 << 12 //  PE[3] pin.
	EXTI3_PF EXTICR = 0x05 << 12 //  PF[3] pin.
	EXTI3_PG EXTICR = 0x06 << 12 //  PG[3] pin.
	EXTI3_PH EXTICR = 0x07 << 12 //  PH[3] pin.
	EXTI3_PI EXTICR = 0x08 << 12 //  PI[3] pin.
	EXTI3_PJ EXTICR = 0x09 << 12 //  PJ[3] pin.
	EXTI3_PK EXTICR = 0x0A << 12 //  PK[3] pin.
)

func (EXTICR) Field

func (b EXTICR) Field(mask EXTICR) int

func (EXTICR) J

func (mask EXTICR) J(v int) EXTICR

type MEMRMP

type MEMRMP uint32
const (
	MEM_MODE   MEMRMP = 0x07 << 0  //+ SYSCFG_Memory Remap Config.
	MEM_MODE_0 MEMRMP = 0x01 << 0  //  Bit 0.
	MEM_MODE_1 MEMRMP = 0x02 << 0  //  Bit 1.
	MEM_MODE_2 MEMRMP = 0x04 << 0  //  Bit 2.
	FB_MODE    MEMRMP = 0x01 << 8  //+ User Flash Bank mode.
	SWP_FMC    MEMRMP = 0x03 << 10 //+ FMC memory mapping swap.
	SWP_FMC_0  MEMRMP = 0x01 << 10 //  Bit 0.
	SWP_FMC_1  MEMRMP = 0x02 << 10 //  Bit 1.
)

func (MEMRMP) Field

func (b MEMRMP) Field(mask MEMRMP) int

func (MEMRMP) J

func (mask MEMRMP) J(v int) MEMRMP

type PMC

type PMC uint32
const (
	ADCxDC2      PMC = 0x07 << 16 //+ Refer to AN4073 on how to use this bit.
	ADC1DC2      PMC = 0x01 << 16 //  Refer to AN4073 on how to use this bit.
	ADC2DC2      PMC = 0x02 << 16 //  Refer to AN4073 on how to use this bit.
	ADC3DC2      PMC = 0x04 << 16 //  Refer to AN4073 on how to use this bit.
	MII_RMII_SEL PMC = 0x01 << 23 //+ Ethernet PHY interface selection.
)

func (PMC) Field

func (b PMC) Field(mask PMC) int

func (PMC) J

func (mask PMC) J(v int) PMC

type RCMPCR

type RCMPCR struct{ mmio.U32 }

func (*RCMPCR) AtomicClearBits

func (r *RCMPCR) AtomicClearBits(mask CMPCR)

func (*RCMPCR) AtomicSetBits

func (r *RCMPCR) AtomicSetBits(mask CMPCR)

func (*RCMPCR) AtomicStoreBits

func (r *RCMPCR) AtomicStoreBits(mask, b CMPCR)

func (*RCMPCR) Bits

func (r *RCMPCR) Bits(mask CMPCR) CMPCR

func (*RCMPCR) ClearBits

func (r *RCMPCR) ClearBits(mask CMPCR)

func (*RCMPCR) Load

func (r *RCMPCR) Load() CMPCR

func (*RCMPCR) SetBits

func (r *RCMPCR) SetBits(mask CMPCR)

func (*RCMPCR) Store

func (r *RCMPCR) Store(b CMPCR)

func (*RCMPCR) StoreBits

func (r *RCMPCR) StoreBits(mask, b CMPCR)

type REXTICR

type REXTICR struct{ mmio.U32 }

func (*REXTICR) AtomicClearBits

func (r *REXTICR) AtomicClearBits(mask EXTICR)

func (*REXTICR) AtomicSetBits

func (r *REXTICR) AtomicSetBits(mask EXTICR)

func (*REXTICR) AtomicStoreBits

func (r *REXTICR) AtomicStoreBits(mask, b EXTICR)

func (*REXTICR) Bits

func (r *REXTICR) Bits(mask EXTICR) EXTICR

func (*REXTICR) ClearBits

func (r *REXTICR) ClearBits(mask EXTICR)

func (*REXTICR) Load

func (r *REXTICR) Load() EXTICR

func (*REXTICR) SetBits

func (r *REXTICR) SetBits(mask EXTICR)

func (*REXTICR) Store

func (r *REXTICR) Store(b EXTICR)

func (*REXTICR) StoreBits

func (r *REXTICR) StoreBits(mask, b EXTICR)

type RMCMPCR

type RMCMPCR struct{ mmio.UM32 }

func (RMCMPCR) Load

func (rm RMCMPCR) Load() CMPCR

func (RMCMPCR) Store

func (rm RMCMPCR) Store(b CMPCR)

type RMEMRMP

type RMEMRMP struct{ mmio.U32 }

func (*RMEMRMP) AtomicClearBits

func (r *RMEMRMP) AtomicClearBits(mask MEMRMP)

func (*RMEMRMP) AtomicSetBits

func (r *RMEMRMP) AtomicSetBits(mask MEMRMP)

func (*RMEMRMP) AtomicStoreBits

func (r *RMEMRMP) AtomicStoreBits(mask, b MEMRMP)

func (*RMEMRMP) Bits

func (r *RMEMRMP) Bits(mask MEMRMP) MEMRMP

func (*RMEMRMP) ClearBits

func (r *RMEMRMP) ClearBits(mask MEMRMP)

func (*RMEMRMP) Load

func (r *RMEMRMP) Load() MEMRMP

func (*RMEMRMP) SetBits

func (r *RMEMRMP) SetBits(mask MEMRMP)

func (*RMEMRMP) Store

func (r *RMEMRMP) Store(b MEMRMP)

func (*RMEMRMP) StoreBits

func (r *RMEMRMP) StoreBits(mask, b MEMRMP)

type RMEXTICR

type RMEXTICR struct{ mmio.UM32 }

func (RMEXTICR) Load

func (rm RMEXTICR) Load() EXTICR

func (RMEXTICR) Store

func (rm RMEXTICR) Store(b EXTICR)

type RMMEMRMP

type RMMEMRMP struct{ mmio.UM32 }

func (RMMEMRMP) Load

func (rm RMMEMRMP) Load() MEMRMP

func (RMMEMRMP) Store

func (rm RMMEMRMP) Store(b MEMRMP)

type RMPMC

type RMPMC struct{ mmio.UM32 }

func (RMPMC) Load

func (rm RMPMC) Load() PMC

func (RMPMC) Store

func (rm RMPMC) Store(b PMC)

type RPMC

type RPMC struct{ mmio.U32 }

func (*RPMC) AtomicClearBits

func (r *RPMC) AtomicClearBits(mask PMC)

func (*RPMC) AtomicSetBits

func (r *RPMC) AtomicSetBits(mask PMC)

func (*RPMC) AtomicStoreBits

func (r *RPMC) AtomicStoreBits(mask, b PMC)

func (*RPMC) Bits

func (r *RPMC) Bits(mask PMC) PMC

func (*RPMC) ClearBits

func (r *RPMC) ClearBits(mask PMC)

func (*RPMC) Load

func (r *RPMC) Load() PMC

func (*RPMC) SetBits

func (r *RPMC) SetBits(mask PMC)

func (*RPMC) Store

func (r *RPMC) Store(b PMC)

func (*RPMC) StoreBits

func (r *RPMC) StoreBits(mask, b PMC)

type SYSCFG_Periph

type SYSCFG_Periph struct {
	MEMRMP RMEMRMP
	PMC    RPMC
	EXTICR [4]REXTICR

	CMPCR RCMPCR
	// contains filtered or unexported fields
}

func (*SYSCFG_Periph) ADCxDC2

func (p *SYSCFG_Periph) ADCxDC2() RMPMC

func (*SYSCFG_Periph) BaseAddr

func (p *SYSCFG_Periph) BaseAddr() uintptr

func (*SYSCFG_Periph) CMP_PD

func (p *SYSCFG_Periph) CMP_PD() RMCMPCR

func (*SYSCFG_Periph) EXTI0

func (p *SYSCFG_Periph) EXTI0(n int) RMEXTICR

func (*SYSCFG_Periph) EXTI1

func (p *SYSCFG_Periph) EXTI1(n int) RMEXTICR

func (*SYSCFG_Periph) EXTI2

func (p *SYSCFG_Periph) EXTI2(n int) RMEXTICR

func (*SYSCFG_Periph) EXTI3

func (p *SYSCFG_Periph) EXTI3(n int) RMEXTICR

func (*SYSCFG_Periph) FB_MODE

func (p *SYSCFG_Periph) FB_MODE() RMMEMRMP

func (*SYSCFG_Periph) MEM_MODE

func (p *SYSCFG_Periph) MEM_MODE() RMMEMRMP

func (*SYSCFG_Periph) MII_RMII_SEL

func (p *SYSCFG_Periph) MII_RMII_SEL() RMPMC

func (*SYSCFG_Periph) READY

func (p *SYSCFG_Periph) READY() RMCMPCR

func (*SYSCFG_Periph) SWP_FMC

func (p *SYSCFG_Periph) SWP_FMC() RMMEMRMP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL