syscfg

package
v0.0.0-...-3d984ba Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package syscfg provides interface to SysTem Configuration.

Peripheral: SYSCFG_Periph SysTem Configuration. 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.

Import:

stm32/o/l1xx_md/mmap

Index

Constants

View Source
const (
	MEM_MODEn  = 0
	BOOT_MODEn = 8
)
View Source
const (
	EXTI0n = 0
	EXTI1n = 4
	EXTI2n = 8
	EXTI3n = 12
)
View Source
const (
	USB_PUn = 0
)

Variables

Functions

This section is empty.

Types

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_PH EXTICR = 0x05 << 0  //  PH[0] pin.
	EXTI0_PF EXTICR = 0x06 << 0  //  PF[0] pin.
	EXTI0_PG EXTICR = 0x07 << 0  //  PG[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_PH EXTICR = 0x05 << 4  //  PH[1] pin.
	EXTI1_PF EXTICR = 0x06 << 4  //  PF[1] pin.
	EXTI1_PG EXTICR = 0x07 << 4  //  PG[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_PH EXTICR = 0x05 << 8  //  PH[2] pin.
	EXTI2_PF EXTICR = 0x06 << 8  //  PF[2] pin.
	EXTI2_PG EXTICR = 0x07 << 8  //  PG[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 = 0x03 << 12 //  PF[3] pin.
	EXTI3_PG EXTICR = 0x04 << 12 //  PG[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 = 0x03 << 0 //+ SYSCFG_Memory Remap Config.
	MEM_MODE_0  MEMRMP = 0x01 << 0 //  Bit 0.
	MEM_MODE_1  MEMRMP = 0x02 << 0 //  Bit 1.
	BOOT_MODE   MEMRMP = 0x03 << 8 //+ Boot mode Config.
	BOOT_MODE_0 MEMRMP = 0x01 << 8 //  Bit 0.
	BOOT_MODE_1 MEMRMP = 0x02 << 8 //  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 (
	USB_PU PMC = 0x01 << 0 //+ SYSCFG PMC.
)

func (PMC) Field

func (b PMC) Field(mask PMC) int

func (PMC) J

func (mask PMC) J(v int) PMC

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 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
}

func (*SYSCFG_Periph) BOOT_MODE

func (p *SYSCFG_Periph) BOOT_MODE() RMMEMRMP

func (*SYSCFG_Periph) BaseAddr

func (p *SYSCFG_Periph) BaseAddr() uintptr

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) MEM_MODE

func (p *SYSCFG_Periph) MEM_MODE() RMMEMRMP

func (*SYSCFG_Periph) USB_PU

func (p *SYSCFG_Periph) USB_PU() RMPMC

Jump to

Keyboard shortcuts

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