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
- Variables
- type AES_Periph
- func (p *AES_Periph) BaseAddr() uintptr
- func (p *AES_Periph) CCF() RMSR
- func (p *AES_Periph) CCFC() RMCR
- func (p *AES_Periph) CCIE() RMCR
- func (p *AES_Periph) CHMOD() RMCR
- func (p *AES_Periph) DATATYPE() RMCR
- func (p *AES_Periph) DMAINEN() RMCR
- func (p *AES_Periph) DMAOUTEN() RMCR
- func (p *AES_Periph) EN() RMCR
- func (p *AES_Periph) ERRC() RMCR
- func (p *AES_Periph) ERRIE() RMCR
- func (p *AES_Periph) MODE() RMCR
- func (p *AES_Periph) RDERR() RMSR
- func (p *AES_Periph) WRERR() RMSR
- type CR
- type DINR
- type DOUTR
- type IVR0
- type IVR1
- type IVR2
- type IVR3
- type KEYR0
- type KEYR1
- type KEYR2
- type KEYR3
- type RCR
- type RDINR
- func (r *RDINR) AtomicClearBits(mask DINR)
- func (r *RDINR) AtomicSetBits(mask DINR)
- func (r *RDINR) AtomicStoreBits(mask, b DINR)
- func (r *RDINR) Bits(mask DINR) DINR
- func (r *RDINR) ClearBits(mask DINR)
- func (r *RDINR) Load() DINR
- func (r *RDINR) SetBits(mask DINR)
- func (r *RDINR) Store(b DINR)
- func (r *RDINR) StoreBits(mask, b DINR)
- type RDOUTR
- func (r *RDOUTR) AtomicClearBits(mask DOUTR)
- func (r *RDOUTR) AtomicSetBits(mask DOUTR)
- func (r *RDOUTR) AtomicStoreBits(mask, b DOUTR)
- func (r *RDOUTR) Bits(mask DOUTR) DOUTR
- func (r *RDOUTR) ClearBits(mask DOUTR)
- func (r *RDOUTR) Load() DOUTR
- func (r *RDOUTR) SetBits(mask DOUTR)
- func (r *RDOUTR) Store(b DOUTR)
- func (r *RDOUTR) StoreBits(mask, b DOUTR)
- type RIVR0
- func (r *RIVR0) AtomicClearBits(mask IVR0)
- func (r *RIVR0) AtomicSetBits(mask IVR0)
- func (r *RIVR0) AtomicStoreBits(mask, b IVR0)
- func (r *RIVR0) Bits(mask IVR0) IVR0
- func (r *RIVR0) ClearBits(mask IVR0)
- func (r *RIVR0) Load() IVR0
- func (r *RIVR0) SetBits(mask IVR0)
- func (r *RIVR0) Store(b IVR0)
- func (r *RIVR0) StoreBits(mask, b IVR0)
- type RIVR1
- func (r *RIVR1) AtomicClearBits(mask IVR1)
- func (r *RIVR1) AtomicSetBits(mask IVR1)
- func (r *RIVR1) AtomicStoreBits(mask, b IVR1)
- func (r *RIVR1) Bits(mask IVR1) IVR1
- func (r *RIVR1) ClearBits(mask IVR1)
- func (r *RIVR1) Load() IVR1
- func (r *RIVR1) SetBits(mask IVR1)
- func (r *RIVR1) Store(b IVR1)
- func (r *RIVR1) StoreBits(mask, b IVR1)
- type RIVR2
- func (r *RIVR2) AtomicClearBits(mask IVR2)
- func (r *RIVR2) AtomicSetBits(mask IVR2)
- func (r *RIVR2) AtomicStoreBits(mask, b IVR2)
- func (r *RIVR2) Bits(mask IVR2) IVR2
- func (r *RIVR2) ClearBits(mask IVR2)
- func (r *RIVR2) Load() IVR2
- func (r *RIVR2) SetBits(mask IVR2)
- func (r *RIVR2) Store(b IVR2)
- func (r *RIVR2) StoreBits(mask, b IVR2)
- type RIVR3
- func (r *RIVR3) AtomicClearBits(mask IVR3)
- func (r *RIVR3) AtomicSetBits(mask IVR3)
- func (r *RIVR3) AtomicStoreBits(mask, b IVR3)
- func (r *RIVR3) Bits(mask IVR3) IVR3
- func (r *RIVR3) ClearBits(mask IVR3)
- func (r *RIVR3) Load() IVR3
- func (r *RIVR3) SetBits(mask IVR3)
- func (r *RIVR3) Store(b IVR3)
- func (r *RIVR3) StoreBits(mask, b IVR3)
- type RKEYR0
- func (r *RKEYR0) AtomicClearBits(mask KEYR0)
- func (r *RKEYR0) AtomicSetBits(mask KEYR0)
- func (r *RKEYR0) AtomicStoreBits(mask, b KEYR0)
- func (r *RKEYR0) Bits(mask KEYR0) KEYR0
- func (r *RKEYR0) ClearBits(mask KEYR0)
- func (r *RKEYR0) Load() KEYR0
- func (r *RKEYR0) SetBits(mask KEYR0)
- func (r *RKEYR0) Store(b KEYR0)
- func (r *RKEYR0) StoreBits(mask, b KEYR0)
- type RKEYR1
- func (r *RKEYR1) AtomicClearBits(mask KEYR1)
- func (r *RKEYR1) AtomicSetBits(mask KEYR1)
- func (r *RKEYR1) AtomicStoreBits(mask, b KEYR1)
- func (r *RKEYR1) Bits(mask KEYR1) KEYR1
- func (r *RKEYR1) ClearBits(mask KEYR1)
- func (r *RKEYR1) Load() KEYR1
- func (r *RKEYR1) SetBits(mask KEYR1)
- func (r *RKEYR1) Store(b KEYR1)
- func (r *RKEYR1) StoreBits(mask, b KEYR1)
- type RKEYR2
- func (r *RKEYR2) AtomicClearBits(mask KEYR2)
- func (r *RKEYR2) AtomicSetBits(mask KEYR2)
- func (r *RKEYR2) AtomicStoreBits(mask, b KEYR2)
- func (r *RKEYR2) Bits(mask KEYR2) KEYR2
- func (r *RKEYR2) ClearBits(mask KEYR2)
- func (r *RKEYR2) Load() KEYR2
- func (r *RKEYR2) SetBits(mask KEYR2)
- func (r *RKEYR2) Store(b KEYR2)
- func (r *RKEYR2) StoreBits(mask, b KEYR2)
- type RKEYR3
- func (r *RKEYR3) AtomicClearBits(mask KEYR3)
- func (r *RKEYR3) AtomicSetBits(mask KEYR3)
- func (r *RKEYR3) AtomicStoreBits(mask, b KEYR3)
- func (r *RKEYR3) Bits(mask KEYR3) KEYR3
- func (r *RKEYR3) ClearBits(mask KEYR3)
- func (r *RKEYR3) Load() KEYR3
- func (r *RKEYR3) SetBits(mask KEYR3)
- func (r *RKEYR3) Store(b KEYR3)
- func (r *RKEYR3) StoreBits(mask, b KEYR3)
- type RMCR
- type RMDINR
- type RMDOUTR
- type RMIVR0
- type RMIVR1
- type RMIVR2
- type RMIVR3
- type RMKEYR0
- type RMKEYR1
- type RMKEYR2
- type RMKEYR3
- type RMSR
- type RSR
- type SR
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 ¶
View Source
var AES = (*AES_Periph)(unsafe.Pointer(uintptr(mmap.AES_BASE)))
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. )
type RDINR ¶
func (*RDINR) AtomicClearBits ¶
func (*RDINR) AtomicSetBits ¶
func (*RDINR) AtomicStoreBits ¶
type RDOUTR ¶
func (*RDOUTR) AtomicClearBits ¶
func (*RDOUTR) AtomicSetBits ¶
func (*RDOUTR) AtomicStoreBits ¶
type RIVR0 ¶
func (*RIVR0) AtomicClearBits ¶
func (*RIVR0) AtomicSetBits ¶
func (*RIVR0) AtomicStoreBits ¶
type RIVR1 ¶
func (*RIVR1) AtomicClearBits ¶
func (*RIVR1) AtomicSetBits ¶
func (*RIVR1) AtomicStoreBits ¶
type RIVR2 ¶
func (*RIVR2) AtomicClearBits ¶
func (*RIVR2) AtomicSetBits ¶
func (*RIVR2) AtomicStoreBits ¶
type RIVR3 ¶
func (*RIVR3) AtomicClearBits ¶
func (*RIVR3) AtomicSetBits ¶
func (*RIVR3) AtomicStoreBits ¶
type RKEYR0 ¶
func (*RKEYR0) AtomicClearBits ¶
func (*RKEYR0) AtomicSetBits ¶
func (*RKEYR0) AtomicStoreBits ¶
type RKEYR1 ¶
func (*RKEYR1) AtomicClearBits ¶
func (*RKEYR1) AtomicSetBits ¶
func (*RKEYR1) AtomicStoreBits ¶
type RKEYR2 ¶
func (*RKEYR2) AtomicClearBits ¶
func (*RKEYR2) AtomicSetBits ¶
func (*RKEYR2) AtomicStoreBits ¶
type RKEYR3 ¶
func (*RKEYR3) AtomicClearBits ¶
func (*RKEYR3) AtomicSetBits ¶
func (*RKEYR3) AtomicStoreBits ¶
Click to show internal directories.
Click to hide internal directories.