systick

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: 3 Imported by: 0

Documentation

Overview

Package systick gives an access to System Timer registers.

Detailed description of all registers covered by this package can be found in "Cortex-M[0-4] Devices Generic User Guide", chapter 4 "Cortex-M[0-4] Peripherals".

Peripheral: SYSTICK_Periph Cortex-M 24-bit system timer. Instances:

SYSTICK  0xE000E010

Registers:

0x00 32  CSR   Control and Status Register (any read clears COUNTFLAG)
0x04 32  RVR   Reload Value Register.
0x08 32  CVR   Current Value Register.
0x0C 32  CALIB Calibration Value Register.

Index

Constants

This section is empty.

Variables

View Source
var SYSTICK = (*SYSTICK_Periph)(unsafe.Pointer(uintptr(0xE000E010)))

Functions

This section is empty.

Types

type CALIB

type CALIB uint32
const (
	TENMS CALIB = 1<<24 - 1 //+
	SKEW  CALIB = 1 << 30   //+
	NOREF CALIB = 1 << 31   //+
)

func (CALIB) Field

func (b CALIB) Field(mask CALIB) int

func (CALIB) J

func (mask CALIB) J(v int) CALIB

type CSR

type CSR uint32
const (
	ENABLE    CSR = 1 << 0  //+ Enable counter.
	TICKINT   CSR = 1 << 1  //+ Generate exceptions.
	CLKSOURCE CSR = 1 << 2  //+ Clock source: 0:external, 1:CPU.
	COUNTFLAG CSR = 1 << 16 //+ 1:Timer counted to 0 since last read of CSR
)

func (CSR) Field

func (b CSR) Field(mask CSR) int

func (CSR) J

func (mask CSR) J(v int) CSR

type CVR

type CVR uint32
const (
	CURRENT CVR = 1<<24 - 1 //+ Read: couter value. Write: clears to zero.
)

func (CVR) Field

func (b CVR) Field(mask CVR) int

func (CVR) J

func (mask CVR) J(v int) CVR

type RCALIB

type RCALIB struct{ mmio.U32 }

func (*RCALIB) AtomicClearBits

func (r *RCALIB) AtomicClearBits(mask CALIB)

func (*RCALIB) AtomicSetBits

func (r *RCALIB) AtomicSetBits(mask CALIB)

func (*RCALIB) AtomicStoreBits

func (r *RCALIB) AtomicStoreBits(mask, b CALIB)

func (*RCALIB) Bits

func (r *RCALIB) Bits(mask CALIB) CALIB

func (*RCALIB) ClearBits

func (r *RCALIB) ClearBits(mask CALIB)

func (*RCALIB) Load

func (r *RCALIB) Load() CALIB

func (*RCALIB) SetBits

func (r *RCALIB) SetBits(mask CALIB)

func (*RCALIB) Store

func (r *RCALIB) Store(b CALIB)

func (*RCALIB) StoreBits

func (r *RCALIB) StoreBits(mask, b CALIB)

type RCSR

type RCSR struct{ mmio.U32 }

func (*RCSR) AtomicClearBits

func (r *RCSR) AtomicClearBits(mask CSR)

func (*RCSR) AtomicSetBits

func (r *RCSR) AtomicSetBits(mask CSR)

func (*RCSR) AtomicStoreBits

func (r *RCSR) AtomicStoreBits(mask, b CSR)

func (*RCSR) Bits

func (r *RCSR) Bits(mask CSR) CSR

func (*RCSR) ClearBits

func (r *RCSR) ClearBits(mask CSR)

func (*RCSR) Load

func (r *RCSR) Load() CSR

func (*RCSR) SetBits

func (r *RCSR) SetBits(mask CSR)

func (*RCSR) Store

func (r *RCSR) Store(b CSR)

func (*RCSR) StoreBits

func (r *RCSR) StoreBits(mask, b CSR)

type RCVR

type RCVR struct{ mmio.U32 }

func (*RCVR) AtomicClearBits

func (r *RCVR) AtomicClearBits(mask CVR)

func (*RCVR) AtomicSetBits

func (r *RCVR) AtomicSetBits(mask CVR)

func (*RCVR) AtomicStoreBits

func (r *RCVR) AtomicStoreBits(mask, b CVR)

func (*RCVR) Bits

func (r *RCVR) Bits(mask CVR) CVR

func (*RCVR) ClearBits

func (r *RCVR) ClearBits(mask CVR)

func (*RCVR) Load

func (r *RCVR) Load() CVR

func (*RCVR) SetBits

func (r *RCVR) SetBits(mask CVR)

func (*RCVR) Store

func (r *RCVR) Store(b CVR)

func (*RCVR) StoreBits

func (r *RCVR) StoreBits(mask, b CVR)

type RMCALIB

type RMCALIB struct{ mmio.UM32 }

func (RMCALIB) Load

func (rm RMCALIB) Load() CALIB

func (RMCALIB) Store

func (rm RMCALIB) Store(b CALIB)

type RMCSR

type RMCSR struct{ mmio.UM32 }

func (RMCSR) Load

func (rm RMCSR) Load() CSR

func (RMCSR) Store

func (rm RMCSR) Store(b CSR)

type RMCVR

type RMCVR struct{ mmio.UM32 }

func (RMCVR) Load

func (rm RMCVR) Load() CVR

func (RMCVR) Store

func (rm RMCVR) Store(b CVR)

type RMRVR

type RMRVR struct{ mmio.UM32 }

func (RMRVR) Load

func (rm RMRVR) Load() RVR

func (RMRVR) Store

func (rm RMRVR) Store(b RVR)

type RRVR

type RRVR struct{ mmio.U32 }

func (*RRVR) AtomicClearBits

func (r *RRVR) AtomicClearBits(mask RVR)

func (*RRVR) AtomicSetBits

func (r *RRVR) AtomicSetBits(mask RVR)

func (*RRVR) AtomicStoreBits

func (r *RRVR) AtomicStoreBits(mask, b RVR)

func (*RRVR) Bits

func (r *RRVR) Bits(mask RVR) RVR

func (*RRVR) ClearBits

func (r *RRVR) ClearBits(mask RVR)

func (*RRVR) Load

func (r *RRVR) Load() RVR

func (*RRVR) SetBits

func (r *RRVR) SetBits(mask RVR)

func (*RRVR) Store

func (r *RRVR) Store(b RVR)

func (*RRVR) StoreBits

func (r *RRVR) StoreBits(mask, b RVR)

type RVR

type RVR uint32
const (
	RELOAD RVR = 1<<24 - 1 //+ Loaded into CVR when the counter reaches 0.
)

func (RVR) Field

func (b RVR) Field(mask RVR) int

func (RVR) J

func (mask RVR) J(v int) RVR

type SYSTICK_Periph

type SYSTICK_Periph struct {
	CSR   RCSR
	RVR   RRVR
	CVR   RCVR
	CALIB RCALIB
}

func (*SYSTICK_Periph) BaseAddr

func (p *SYSTICK_Periph) BaseAddr() uintptr

func (*SYSTICK_Periph) CLKSOURCE

func (p *SYSTICK_Periph) CLKSOURCE() RMCSR

func (*SYSTICK_Periph) COUNTFLAG

func (p *SYSTICK_Periph) COUNTFLAG() RMCSR

func (*SYSTICK_Periph) CURRENT

func (p *SYSTICK_Periph) CURRENT() RMCVR

func (*SYSTICK_Periph) ENABLE

func (p *SYSTICK_Periph) ENABLE() RMCSR

func (*SYSTICK_Periph) NOREF

func (p *SYSTICK_Periph) NOREF() RMCALIB

func (*SYSTICK_Periph) RELOAD

func (p *SYSTICK_Periph) RELOAD() RMRVR

func (*SYSTICK_Periph) SKEW

func (p *SYSTICK_Periph) SKEW() RMCALIB

func (*SYSTICK_Periph) TENMS

func (p *SYSTICK_Periph) TENMS() RMCALIB

func (*SYSTICK_Periph) TICKINT

func (p *SYSTICK_Periph) TICKINT() RMCSR

Jump to

Keyboard shortcuts

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