sai

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 sai provides interface to Serial Audio Interface.

Peripheral: SAI_Periph Serial Audio Interface. Instances:

SAI1  mmap.SAI1_BASE
SAI2  mmap.SAI2_BASE

Registers:

0x00 32  GCR Global configuration register.

Import:

stm32/o/f746xx/mmap

Peripheral: SAI_Block_Periph Serial Audio Interface. Instances:

SAI1_Block_A  mmap.SAI1_Block_A_BASE
SAI1_Block_B  mmap.SAI1_Block_B_BASE
SAI2_Block_A  mmap.SAI2_Block_A_BASE
SAI2_Block_B  mmap.SAI2_Block_B_BASE

Registers:

0x00 32  CR1   SAI block x configuration register 1.
0x04 32  CR2   SAI block x configuration register 2.
0x08 32  FRCR  SAI block x frame configuration register.
0x0C 32  SLOTR SAI block x slot register.
0x10 32  IMR   SAI block x interrupt mask register.
0x14 32  SR    SAI block x status register.
0x18 32  CLRFR SAI block x clear flag register.
0x1C 32  DR    SAI block x data register.

Import:

stm32/o/f746xx/mmap

Index

Constants

View Source
const (
	SYNCINn  = 0
	SYNCOUTn = 4
)

Variables

Functions

This section is empty.

Types

type CLRFR

type CLRFR uint32

func (CLRFR) Field

func (b CLRFR) Field(mask CLRFR) int

func (CLRFR) J

func (mask CLRFR) J(v int) CLRFR

type CR1

type CR1 uint32

func (CR1) Field

func (b CR1) Field(mask CR1) int

func (CR1) J

func (mask CR1) J(v int) CR1

type CR2

type CR2 uint32

func (CR2) Field

func (b CR2) Field(mask CR2) int

func (CR2) J

func (mask CR2) J(v int) CR2

type DR

type DR uint32

func (DR) Field

func (b DR) Field(mask DR) int

func (DR) J

func (mask DR) J(v int) DR

type FRCR

type FRCR uint32

func (FRCR) Field

func (b FRCR) Field(mask FRCR) int

func (FRCR) J

func (mask FRCR) J(v int) FRCR

type GCR

type GCR uint32
const (
	SYNCIN    GCR = 0x03 << 0 //+ SYNCIN[1:0] bits (Synchronization Inputs).
	SYNCIN_0  GCR = 0x01 << 0 //  Bit 0.
	SYNCIN_1  GCR = 0x02 << 0 //  Bit 1.
	SYNCOUT   GCR = 0x03 << 4 //+ SYNCOUT[1:0] bits (Synchronization Outputs).
	SYNCOUT_0 GCR = 0x01 << 4 //  Bit 0.
	SYNCOUT_1 GCR = 0x02 << 4 //  Bit 1.
)

func (GCR) Field

func (b GCR) Field(mask GCR) int

func (GCR) J

func (mask GCR) J(v int) GCR

type IMR

type IMR uint32

func (IMR) Field

func (b IMR) Field(mask IMR) int

func (IMR) J

func (mask IMR) J(v int) IMR

type RCLRFR

type RCLRFR struct{ mmio.U32 }

func (*RCLRFR) AtomicClearBits

func (r *RCLRFR) AtomicClearBits(mask CLRFR)

func (*RCLRFR) AtomicSetBits

func (r *RCLRFR) AtomicSetBits(mask CLRFR)

func (*RCLRFR) AtomicStoreBits

func (r *RCLRFR) AtomicStoreBits(mask, b CLRFR)

func (*RCLRFR) Bits

func (r *RCLRFR) Bits(mask CLRFR) CLRFR

func (*RCLRFR) ClearBits

func (r *RCLRFR) ClearBits(mask CLRFR)

func (*RCLRFR) Load

func (r *RCLRFR) Load() CLRFR

func (*RCLRFR) SetBits

func (r *RCLRFR) SetBits(mask CLRFR)

func (*RCLRFR) Store

func (r *RCLRFR) Store(b CLRFR)

func (*RCLRFR) StoreBits

func (r *RCLRFR) StoreBits(mask, b CLRFR)

type RCR1

type RCR1 struct{ mmio.U32 }

func (*RCR1) AtomicClearBits

func (r *RCR1) AtomicClearBits(mask CR1)

func (*RCR1) AtomicSetBits

func (r *RCR1) AtomicSetBits(mask CR1)

func (*RCR1) AtomicStoreBits

func (r *RCR1) AtomicStoreBits(mask, b CR1)

func (*RCR1) Bits

func (r *RCR1) Bits(mask CR1) CR1

func (*RCR1) ClearBits

func (r *RCR1) ClearBits(mask CR1)

func (*RCR1) Load

func (r *RCR1) Load() CR1

func (*RCR1) SetBits

func (r *RCR1) SetBits(mask CR1)

func (*RCR1) Store

func (r *RCR1) Store(b CR1)

func (*RCR1) StoreBits

func (r *RCR1) StoreBits(mask, b CR1)

type RCR2

type RCR2 struct{ mmio.U32 }

func (*RCR2) AtomicClearBits

func (r *RCR2) AtomicClearBits(mask CR2)

func (*RCR2) AtomicSetBits

func (r *RCR2) AtomicSetBits(mask CR2)

func (*RCR2) AtomicStoreBits

func (r *RCR2) AtomicStoreBits(mask, b CR2)

func (*RCR2) Bits

func (r *RCR2) Bits(mask CR2) CR2

func (*RCR2) ClearBits

func (r *RCR2) ClearBits(mask CR2)

func (*RCR2) Load

func (r *RCR2) Load() CR2

func (*RCR2) SetBits

func (r *RCR2) SetBits(mask CR2)

func (*RCR2) Store

func (r *RCR2) Store(b CR2)

func (*RCR2) StoreBits

func (r *RCR2) StoreBits(mask, b CR2)

type RDR

type RDR struct{ mmio.U32 }

func (*RDR) AtomicClearBits

func (r *RDR) AtomicClearBits(mask DR)

func (*RDR) AtomicSetBits

func (r *RDR) AtomicSetBits(mask DR)

func (*RDR) AtomicStoreBits

func (r *RDR) AtomicStoreBits(mask, b DR)

func (*RDR) Bits

func (r *RDR) Bits(mask DR) DR

func (*RDR) ClearBits

func (r *RDR) ClearBits(mask DR)

func (*RDR) Load

func (r *RDR) Load() DR

func (*RDR) SetBits

func (r *RDR) SetBits(mask DR)

func (*RDR) Store

func (r *RDR) Store(b DR)

func (*RDR) StoreBits

func (r *RDR) StoreBits(mask, b DR)

type RFRCR

type RFRCR struct{ mmio.U32 }

func (*RFRCR) AtomicClearBits

func (r *RFRCR) AtomicClearBits(mask FRCR)

func (*RFRCR) AtomicSetBits

func (r *RFRCR) AtomicSetBits(mask FRCR)

func (*RFRCR) AtomicStoreBits

func (r *RFRCR) AtomicStoreBits(mask, b FRCR)

func (*RFRCR) Bits

func (r *RFRCR) Bits(mask FRCR) FRCR

func (*RFRCR) ClearBits

func (r *RFRCR) ClearBits(mask FRCR)

func (*RFRCR) Load

func (r *RFRCR) Load() FRCR

func (*RFRCR) SetBits

func (r *RFRCR) SetBits(mask FRCR)

func (*RFRCR) Store

func (r *RFRCR) Store(b FRCR)

func (*RFRCR) StoreBits

func (r *RFRCR) StoreBits(mask, b FRCR)

type RGCR

type RGCR struct{ mmio.U32 }

func (*RGCR) AtomicClearBits

func (r *RGCR) AtomicClearBits(mask GCR)

func (*RGCR) AtomicSetBits

func (r *RGCR) AtomicSetBits(mask GCR)

func (*RGCR) AtomicStoreBits

func (r *RGCR) AtomicStoreBits(mask, b GCR)

func (*RGCR) Bits

func (r *RGCR) Bits(mask GCR) GCR

func (*RGCR) ClearBits

func (r *RGCR) ClearBits(mask GCR)

func (*RGCR) Load

func (r *RGCR) Load() GCR

func (*RGCR) SetBits

func (r *RGCR) SetBits(mask GCR)

func (*RGCR) Store

func (r *RGCR) Store(b GCR)

func (*RGCR) StoreBits

func (r *RGCR) StoreBits(mask, b GCR)

type RIMR

type RIMR struct{ mmio.U32 }

func (*RIMR) AtomicClearBits

func (r *RIMR) AtomicClearBits(mask IMR)

func (*RIMR) AtomicSetBits

func (r *RIMR) AtomicSetBits(mask IMR)

func (*RIMR) AtomicStoreBits

func (r *RIMR) AtomicStoreBits(mask, b IMR)

func (*RIMR) Bits

func (r *RIMR) Bits(mask IMR) IMR

func (*RIMR) ClearBits

func (r *RIMR) ClearBits(mask IMR)

func (*RIMR) Load

func (r *RIMR) Load() IMR

func (*RIMR) SetBits

func (r *RIMR) SetBits(mask IMR)

func (*RIMR) Store

func (r *RIMR) Store(b IMR)

func (*RIMR) StoreBits

func (r *RIMR) StoreBits(mask, b IMR)

type RMCLRFR

type RMCLRFR struct{ mmio.UM32 }

func (RMCLRFR) Load

func (rm RMCLRFR) Load() CLRFR

func (RMCLRFR) Store

func (rm RMCLRFR) Store(b CLRFR)

type RMCR1

type RMCR1 struct{ mmio.UM32 }

func (RMCR1) Load

func (rm RMCR1) Load() CR1

func (RMCR1) Store

func (rm RMCR1) Store(b CR1)

type RMCR2

type RMCR2 struct{ mmio.UM32 }

func (RMCR2) Load

func (rm RMCR2) Load() CR2

func (RMCR2) Store

func (rm RMCR2) Store(b CR2)

type RMDR

type RMDR struct{ mmio.UM32 }

func (RMDR) Load

func (rm RMDR) Load() DR

func (RMDR) Store

func (rm RMDR) Store(b DR)

type RMFRCR

type RMFRCR struct{ mmio.UM32 }

func (RMFRCR) Load

func (rm RMFRCR) Load() FRCR

func (RMFRCR) Store

func (rm RMFRCR) Store(b FRCR)

type RMGCR

type RMGCR struct{ mmio.UM32 }

func (RMGCR) Load

func (rm RMGCR) Load() GCR

func (RMGCR) Store

func (rm RMGCR) Store(b GCR)

type RMIMR

type RMIMR struct{ mmio.UM32 }

func (RMIMR) Load

func (rm RMIMR) Load() IMR

func (RMIMR) Store

func (rm RMIMR) Store(b IMR)

type RMSLOTR

type RMSLOTR struct{ mmio.UM32 }

func (RMSLOTR) Load

func (rm RMSLOTR) Load() SLOTR

func (RMSLOTR) Store

func (rm RMSLOTR) Store(b SLOTR)

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 RSLOTR

type RSLOTR struct{ mmio.U32 }

func (*RSLOTR) AtomicClearBits

func (r *RSLOTR) AtomicClearBits(mask SLOTR)

func (*RSLOTR) AtomicSetBits

func (r *RSLOTR) AtomicSetBits(mask SLOTR)

func (*RSLOTR) AtomicStoreBits

func (r *RSLOTR) AtomicStoreBits(mask, b SLOTR)

func (*RSLOTR) Bits

func (r *RSLOTR) Bits(mask SLOTR) SLOTR

func (*RSLOTR) ClearBits

func (r *RSLOTR) ClearBits(mask SLOTR)

func (*RSLOTR) Load

func (r *RSLOTR) Load() SLOTR

func (*RSLOTR) SetBits

func (r *RSLOTR) SetBits(mask SLOTR)

func (*RSLOTR) Store

func (r *RSLOTR) Store(b SLOTR)

func (*RSLOTR) StoreBits

func (r *RSLOTR) StoreBits(mask, b SLOTR)

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 SAI_Block_Periph

type SAI_Block_Periph struct {
	CR1   RCR1
	CR2   RCR2
	FRCR  RFRCR
	SLOTR RSLOTR
	IMR   RIMR
	SR    RSR
	CLRFR RCLRFR
	DR    RDR
}

func (*SAI_Block_Periph) BaseAddr

func (p *SAI_Block_Periph) BaseAddr() uintptr

type SAI_Periph

type SAI_Periph struct {
	GCR RGCR
}

func (*SAI_Periph) BaseAddr

func (p *SAI_Periph) BaseAddr() uintptr

func (*SAI_Periph) SYNCIN

func (p *SAI_Periph) SYNCIN() RMGCR

func (*SAI_Periph) SYNCOUT

func (p *SAI_Periph) SYNCOUT() RMGCR

type SLOTR

type SLOTR uint32

func (SLOTR) Field

func (b SLOTR) Field(mask SLOTR) int

func (SLOTR) J

func (mask SLOTR) J(v int) SLOTR

type SR

type SR uint32

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