aes

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 aes provides interface to AES hardware accelerator.

Peripheral: AES_Periph AES hardware accelerator. Instances:

AES  mmap.AES_BASE

Registers:

0x00 32  CR    Control register.
0x04 32  SR    Status register.
0x08 32  DINR  Data input register.
0x0C 32  DOUTR Data output register.
0x10 32  KEYR0 Key register 0.
0x14 32  KEYR1 Key register 1.
0x18 32  KEYR2 Key register 2.
0x1C 32  KEYR3 Key register 3.
0x20 32  IVR0  Initialization vector register 0.
0x24 32  IVR1  Initialization vector register 1.
0x28 32  IVR2  Initialization vector register 2.
0x2C 32  IVR3  Initialization vector register 3.

Import:

stm32/o/l1xx_md/mmap

Index

Constants

View Source
const (
	ENn       = 0
	DATATYPEn = 1
	MODEn     = 3
	CHMODn    = 5
	CCFCn     = 7
	ERRCn     = 8
	CCIEn     = 9
	ERRIEn    = 10
	DMAINENn  = 11
	DMAOUTENn = 12
)
View Source
const (
	CCFn   = 0
	RDERRn = 1
	WRERRn = 2
)

Variables

Functions

This section is empty.

Types

type AES_Periph

type AES_Periph struct {
	CR    RCR
	SR    RSR
	DINR  RDINR
	DOUTR RDOUTR
	KEYR0 RKEYR0
	KEYR1 RKEYR1
	KEYR2 RKEYR2
	KEYR3 RKEYR3
	IVR0  RIVR0
	IVR1  RIVR1
	IVR2  RIVR2
	IVR3  RIVR3
}

func (*AES_Periph) BaseAddr

func (p *AES_Periph) BaseAddr() uintptr

func (*AES_Periph) CCF

func (p *AES_Periph) CCF() RMSR

func (*AES_Periph) CCFC

func (p *AES_Periph) CCFC() RMCR

func (*AES_Periph) CCIE

func (p *AES_Periph) CCIE() RMCR

func (*AES_Periph) CHMOD

func (p *AES_Periph) CHMOD() RMCR

func (*AES_Periph) DATATYPE

func (p *AES_Periph) DATATYPE() RMCR

func (*AES_Periph) DMAINEN

func (p *AES_Periph) DMAINEN() RMCR

func (*AES_Periph) DMAOUTEN

func (p *AES_Periph) DMAOUTEN() RMCR

func (*AES_Periph) EN

func (p *AES_Periph) EN() RMCR

func (*AES_Periph) ERRC

func (p *AES_Periph) ERRC() RMCR

func (*AES_Periph) ERRIE

func (p *AES_Periph) ERRIE() RMCR

func (*AES_Periph) MODE

func (p *AES_Periph) MODE() RMCR

func (*AES_Periph) RDERR

func (p *AES_Periph) RDERR() RMSR

func (*AES_Periph) WRERR

func (p *AES_Periph) WRERR() RMSR

type CR

type CR uint32
const (
	EN         CR = 0x01 << 0  //+ AES Enable.
	DATATYPE   CR = 0x03 << 1  //+ Data type selection.
	DATATYPE_0 CR = 0x01 << 1  //  Bit 0.
	DATATYPE_1 CR = 0x02 << 1  //  Bit 1.
	MODE       CR = 0x03 << 3  //+ AES Mode Of Operation.
	MODE_0     CR = 0x01 << 3  //  Bit 0.
	MODE_1     CR = 0x02 << 3  //  Bit 1.
	CHMOD      CR = 0x03 << 5  //+ AES Chaining Mode.
	CHMOD_0    CR = 0x01 << 5  //  Bit 0.
	CHMOD_1    CR = 0x02 << 5  //  Bit 1.
	CCFC       CR = 0x01 << 7  //+ Computation Complete Flag Clear.
	ERRC       CR = 0x01 << 8  //+ Error Clear.
	CCIE       CR = 0x01 << 9  //+ Computation Complete Interrupt Enable.
	ERRIE      CR = 0x01 << 10 //+ Error Interrupt Enable.
	DMAINEN    CR = 0x01 << 11 //+ DMA ENable managing the data input phase.
	DMAOUTEN   CR = 0x01 << 12 //+ DMA Enable managing the data output phase.
)

func (CR) Field

func (b CR) Field(mask CR) int

func (CR) J

func (mask CR) J(v int) CR

type DINR

type DINR uint32

func (DINR) Field

func (b DINR) Field(mask DINR) int

func (DINR) J

func (mask DINR) J(v int) DINR

type DOUTR

type DOUTR uint32

func (DOUTR) Field

func (b DOUTR) Field(mask DOUTR) int

func (DOUTR) J

func (mask DOUTR) J(v int) DOUTR

type IVR0

type IVR0 uint32

func (IVR0) Field

func (b IVR0) Field(mask IVR0) int

func (IVR0) J

func (mask IVR0) J(v int) IVR0

type IVR1

type IVR1 uint32

func (IVR1) Field

func (b IVR1) Field(mask IVR1) int

func (IVR1) J

func (mask IVR1) J(v int) IVR1

type IVR2

type IVR2 uint32

func (IVR2) Field

func (b IVR2) Field(mask IVR2) int

func (IVR2) J

func (mask IVR2) J(v int) IVR2

type IVR3

type IVR3 uint32

func (IVR3) Field

func (b IVR3) Field(mask IVR3) int

func (IVR3) J

func (mask IVR3) J(v int) IVR3

type KEYR0

type KEYR0 uint32

func (KEYR0) Field

func (b KEYR0) Field(mask KEYR0) int

func (KEYR0) J

func (mask KEYR0) J(v int) KEYR0

type KEYR1

type KEYR1 uint32

func (KEYR1) Field

func (b KEYR1) Field(mask KEYR1) int

func (KEYR1) J

func (mask KEYR1) J(v int) KEYR1

type KEYR2

type KEYR2 uint32

func (KEYR2) Field

func (b KEYR2) Field(mask KEYR2) int

func (KEYR2) J

func (mask KEYR2) J(v int) KEYR2

type KEYR3

type KEYR3 uint32

func (KEYR3) Field

func (b KEYR3) Field(mask KEYR3) int

func (KEYR3) J

func (mask KEYR3) J(v int) KEYR3

type RCR

type RCR struct{ mmio.U32 }

func (*RCR) AtomicClearBits

func (r *RCR) AtomicClearBits(mask CR)

func (*RCR) AtomicSetBits

func (r *RCR) AtomicSetBits(mask CR)

func (*RCR) AtomicStoreBits

func (r *RCR) AtomicStoreBits(mask, b CR)

func (*RCR) Bits

func (r *RCR) Bits(mask CR) CR

func (*RCR) ClearBits

func (r *RCR) ClearBits(mask CR)

func (*RCR) Load

func (r *RCR) Load() CR

func (*RCR) SetBits

func (r *RCR) SetBits(mask CR)

func (*RCR) Store

func (r *RCR) Store(b CR)

func (*RCR) StoreBits

func (r *RCR) StoreBits(mask, b CR)

type RDINR

type RDINR struct{ mmio.U32 }

func (*RDINR) AtomicClearBits

func (r *RDINR) AtomicClearBits(mask DINR)

func (*RDINR) AtomicSetBits

func (r *RDINR) AtomicSetBits(mask DINR)

func (*RDINR) AtomicStoreBits

func (r *RDINR) AtomicStoreBits(mask, b DINR)

func (*RDINR) Bits

func (r *RDINR) Bits(mask DINR) DINR

func (*RDINR) ClearBits

func (r *RDINR) ClearBits(mask DINR)

func (*RDINR) Load

func (r *RDINR) Load() DINR

func (*RDINR) SetBits

func (r *RDINR) SetBits(mask DINR)

func (*RDINR) Store

func (r *RDINR) Store(b DINR)

func (*RDINR) StoreBits

func (r *RDINR) StoreBits(mask, b DINR)

type RDOUTR

type RDOUTR struct{ mmio.U32 }

func (*RDOUTR) AtomicClearBits

func (r *RDOUTR) AtomicClearBits(mask DOUTR)

func (*RDOUTR) AtomicSetBits

func (r *RDOUTR) AtomicSetBits(mask DOUTR)

func (*RDOUTR) AtomicStoreBits

func (r *RDOUTR) AtomicStoreBits(mask, b DOUTR)

func (*RDOUTR) Bits

func (r *RDOUTR) Bits(mask DOUTR) DOUTR

func (*RDOUTR) ClearBits

func (r *RDOUTR) ClearBits(mask DOUTR)

func (*RDOUTR) Load

func (r *RDOUTR) Load() DOUTR

func (*RDOUTR) SetBits

func (r *RDOUTR) SetBits(mask DOUTR)

func (*RDOUTR) Store

func (r *RDOUTR) Store(b DOUTR)

func (*RDOUTR) StoreBits

func (r *RDOUTR) StoreBits(mask, b DOUTR)

type RIVR0

type RIVR0 struct{ mmio.U32 }

func (*RIVR0) AtomicClearBits

func (r *RIVR0) AtomicClearBits(mask IVR0)

func (*RIVR0) AtomicSetBits

func (r *RIVR0) AtomicSetBits(mask IVR0)

func (*RIVR0) AtomicStoreBits

func (r *RIVR0) AtomicStoreBits(mask, b IVR0)

func (*RIVR0) Bits

func (r *RIVR0) Bits(mask IVR0) IVR0

func (*RIVR0) ClearBits

func (r *RIVR0) ClearBits(mask IVR0)

func (*RIVR0) Load

func (r *RIVR0) Load() IVR0

func (*RIVR0) SetBits

func (r *RIVR0) SetBits(mask IVR0)

func (*RIVR0) Store

func (r *RIVR0) Store(b IVR0)

func (*RIVR0) StoreBits

func (r *RIVR0) StoreBits(mask, b IVR0)

type RIVR1

type RIVR1 struct{ mmio.U32 }

func (*RIVR1) AtomicClearBits

func (r *RIVR1) AtomicClearBits(mask IVR1)

func (*RIVR1) AtomicSetBits

func (r *RIVR1) AtomicSetBits(mask IVR1)

func (*RIVR1) AtomicStoreBits

func (r *RIVR1) AtomicStoreBits(mask, b IVR1)

func (*RIVR1) Bits

func (r *RIVR1) Bits(mask IVR1) IVR1

func (*RIVR1) ClearBits

func (r *RIVR1) ClearBits(mask IVR1)

func (*RIVR1) Load

func (r *RIVR1) Load() IVR1

func (*RIVR1) SetBits

func (r *RIVR1) SetBits(mask IVR1)

func (*RIVR1) Store

func (r *RIVR1) Store(b IVR1)

func (*RIVR1) StoreBits

func (r *RIVR1) StoreBits(mask, b IVR1)

type RIVR2

type RIVR2 struct{ mmio.U32 }

func (*RIVR2) AtomicClearBits

func (r *RIVR2) AtomicClearBits(mask IVR2)

func (*RIVR2) AtomicSetBits

func (r *RIVR2) AtomicSetBits(mask IVR2)

func (*RIVR2) AtomicStoreBits

func (r *RIVR2) AtomicStoreBits(mask, b IVR2)

func (*RIVR2) Bits

func (r *RIVR2) Bits(mask IVR2) IVR2

func (*RIVR2) ClearBits

func (r *RIVR2) ClearBits(mask IVR2)

func (*RIVR2) Load

func (r *RIVR2) Load() IVR2

func (*RIVR2) SetBits

func (r *RIVR2) SetBits(mask IVR2)

func (*RIVR2) Store

func (r *RIVR2) Store(b IVR2)

func (*RIVR2) StoreBits

func (r *RIVR2) StoreBits(mask, b IVR2)

type RIVR3

type RIVR3 struct{ mmio.U32 }

func (*RIVR3) AtomicClearBits

func (r *RIVR3) AtomicClearBits(mask IVR3)

func (*RIVR3) AtomicSetBits

func (r *RIVR3) AtomicSetBits(mask IVR3)

func (*RIVR3) AtomicStoreBits

func (r *RIVR3) AtomicStoreBits(mask, b IVR3)

func (*RIVR3) Bits

func (r *RIVR3) Bits(mask IVR3) IVR3

func (*RIVR3) ClearBits

func (r *RIVR3) ClearBits(mask IVR3)

func (*RIVR3) Load

func (r *RIVR3) Load() IVR3

func (*RIVR3) SetBits

func (r *RIVR3) SetBits(mask IVR3)

func (*RIVR3) Store

func (r *RIVR3) Store(b IVR3)

func (*RIVR3) StoreBits

func (r *RIVR3) StoreBits(mask, b IVR3)

type RKEYR0

type RKEYR0 struct{ mmio.U32 }

func (*RKEYR0) AtomicClearBits

func (r *RKEYR0) AtomicClearBits(mask KEYR0)

func (*RKEYR0) AtomicSetBits

func (r *RKEYR0) AtomicSetBits(mask KEYR0)

func (*RKEYR0) AtomicStoreBits

func (r *RKEYR0) AtomicStoreBits(mask, b KEYR0)

func (*RKEYR0) Bits

func (r *RKEYR0) Bits(mask KEYR0) KEYR0

func (*RKEYR0) ClearBits

func (r *RKEYR0) ClearBits(mask KEYR0)

func (*RKEYR0) Load

func (r *RKEYR0) Load() KEYR0

func (*RKEYR0) SetBits

func (r *RKEYR0) SetBits(mask KEYR0)

func (*RKEYR0) Store

func (r *RKEYR0) Store(b KEYR0)

func (*RKEYR0) StoreBits

func (r *RKEYR0) StoreBits(mask, b KEYR0)

type RKEYR1

type RKEYR1 struct{ mmio.U32 }

func (*RKEYR1) AtomicClearBits

func (r *RKEYR1) AtomicClearBits(mask KEYR1)

func (*RKEYR1) AtomicSetBits

func (r *RKEYR1) AtomicSetBits(mask KEYR1)

func (*RKEYR1) AtomicStoreBits

func (r *RKEYR1) AtomicStoreBits(mask, b KEYR1)

func (*RKEYR1) Bits

func (r *RKEYR1) Bits(mask KEYR1) KEYR1

func (*RKEYR1) ClearBits

func (r *RKEYR1) ClearBits(mask KEYR1)

func (*RKEYR1) Load

func (r *RKEYR1) Load() KEYR1

func (*RKEYR1) SetBits

func (r *RKEYR1) SetBits(mask KEYR1)

func (*RKEYR1) Store

func (r *RKEYR1) Store(b KEYR1)

func (*RKEYR1) StoreBits

func (r *RKEYR1) StoreBits(mask, b KEYR1)

type RKEYR2

type RKEYR2 struct{ mmio.U32 }

func (*RKEYR2) AtomicClearBits

func (r *RKEYR2) AtomicClearBits(mask KEYR2)

func (*RKEYR2) AtomicSetBits

func (r *RKEYR2) AtomicSetBits(mask KEYR2)

func (*RKEYR2) AtomicStoreBits

func (r *RKEYR2) AtomicStoreBits(mask, b KEYR2)

func (*RKEYR2) Bits

func (r *RKEYR2) Bits(mask KEYR2) KEYR2

func (*RKEYR2) ClearBits

func (r *RKEYR2) ClearBits(mask KEYR2)

func (*RKEYR2) Load

func (r *RKEYR2) Load() KEYR2

func (*RKEYR2) SetBits

func (r *RKEYR2) SetBits(mask KEYR2)

func (*RKEYR2) Store

func (r *RKEYR2) Store(b KEYR2)

func (*RKEYR2) StoreBits

func (r *RKEYR2) StoreBits(mask, b KEYR2)

type RKEYR3

type RKEYR3 struct{ mmio.U32 }

func (*RKEYR3) AtomicClearBits

func (r *RKEYR3) AtomicClearBits(mask KEYR3)

func (*RKEYR3) AtomicSetBits

func (r *RKEYR3) AtomicSetBits(mask KEYR3)

func (*RKEYR3) AtomicStoreBits

func (r *RKEYR3) AtomicStoreBits(mask, b KEYR3)

func (*RKEYR3) Bits

func (r *RKEYR3) Bits(mask KEYR3) KEYR3

func (*RKEYR3) ClearBits

func (r *RKEYR3) ClearBits(mask KEYR3)

func (*RKEYR3) Load

func (r *RKEYR3) Load() KEYR3

func (*RKEYR3) SetBits

func (r *RKEYR3) SetBits(mask KEYR3)

func (*RKEYR3) Store

func (r *RKEYR3) Store(b KEYR3)

func (*RKEYR3) StoreBits

func (r *RKEYR3) StoreBits(mask, b KEYR3)

type RMCR

type RMCR struct{ mmio.UM32 }

func (RMCR) Load

func (rm RMCR) Load() CR

func (RMCR) Store

func (rm RMCR) Store(b CR)

type RMDINR

type RMDINR struct{ mmio.UM32 }

func (RMDINR) Load

func (rm RMDINR) Load() DINR

func (RMDINR) Store

func (rm RMDINR) Store(b DINR)

type RMDOUTR

type RMDOUTR struct{ mmio.UM32 }

func (RMDOUTR) Load

func (rm RMDOUTR) Load() DOUTR

func (RMDOUTR) Store

func (rm RMDOUTR) Store(b DOUTR)

type RMIVR0

type RMIVR0 struct{ mmio.UM32 }

func (RMIVR0) Load

func (rm RMIVR0) Load() IVR0

func (RMIVR0) Store

func (rm RMIVR0) Store(b IVR0)

type RMIVR1

type RMIVR1 struct{ mmio.UM32 }

func (RMIVR1) Load

func (rm RMIVR1) Load() IVR1

func (RMIVR1) Store

func (rm RMIVR1) Store(b IVR1)

type RMIVR2

type RMIVR2 struct{ mmio.UM32 }

func (RMIVR2) Load

func (rm RMIVR2) Load() IVR2

func (RMIVR2) Store

func (rm RMIVR2) Store(b IVR2)

type RMIVR3

type RMIVR3 struct{ mmio.UM32 }

func (RMIVR3) Load

func (rm RMIVR3) Load() IVR3

func (RMIVR3) Store

func (rm RMIVR3) Store(b IVR3)

type RMKEYR0

type RMKEYR0 struct{ mmio.UM32 }

func (RMKEYR0) Load

func (rm RMKEYR0) Load() KEYR0

func (RMKEYR0) Store

func (rm RMKEYR0) Store(b KEYR0)

type RMKEYR1

type RMKEYR1 struct{ mmio.UM32 }

func (RMKEYR1) Load

func (rm RMKEYR1) Load() KEYR1

func (RMKEYR1) Store

func (rm RMKEYR1) Store(b KEYR1)

type RMKEYR2

type RMKEYR2 struct{ mmio.UM32 }

func (RMKEYR2) Load

func (rm RMKEYR2) Load() KEYR2

func (RMKEYR2) Store

func (rm RMKEYR2) Store(b KEYR2)

type RMKEYR3

type RMKEYR3 struct{ mmio.UM32 }

func (RMKEYR3) Load

func (rm RMKEYR3) Load() KEYR3

func (RMKEYR3) Store

func (rm RMKEYR3) Store(b KEYR3)

type RMSR

type RMSR struct{ mmio.UM32 }

func (RMSR) Load

func (rm RMSR) Load() SR

func (RMSR) Store

func (rm RMSR) Store(b SR)

type RSR

type RSR struct{ mmio.U32 }

func (*RSR) AtomicClearBits

func (r *RSR) AtomicClearBits(mask SR)

func (*RSR) AtomicSetBits

func (r *RSR) AtomicSetBits(mask SR)

func (*RSR) AtomicStoreBits

func (r *RSR) AtomicStoreBits(mask, b SR)

func (*RSR) Bits

func (r *RSR) Bits(mask SR) SR

func (*RSR) ClearBits

func (r *RSR) ClearBits(mask SR)

func (*RSR) Load

func (r *RSR) Load() SR

func (*RSR) SetBits

func (r *RSR) SetBits(mask SR)

func (*RSR) Store

func (r *RSR) Store(b SR)

func (*RSR) StoreBits

func (r *RSR) StoreBits(mask, b SR)

type SR

type SR uint32
const (
	CCF   SR = 0x01 << 0 //+ Computation Complete Flag.
	RDERR SR = 0x01 << 1 //+ Read Error Flag.
	WRERR SR = 0x01 << 2 //+ Write Error Flag.
)

func (SR) Field

func (b SR) Field(mask SR) int

func (SR) J

func (mask SR) J(v int) SR

Jump to

Keyboard shortcuts

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