te

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package provides Task and Event types that represent peripheral task and event registers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event represents a peripheral register that is used to records an occurence of some kind of event.

func (*Event) Clear

func (r *Event) Clear()

Clear clears r.

func (*Event) DisableIRQ

func (r *Event) DisableIRQ()

DisableIRQ disables generating of IRQ by event recorded by r.

func (*Event) DisablePPI

func (r *Event) DisablePPI()

DisablePPI disables recording of events and routing them to the PPI. Only some peripherals (eg. RTC) implement this method. Note that if this method is implemented it doesn't affect interrupt generation enabled by EnableIRQ which also enables events recording.

func (*Event) EnableIRQ

func (r *Event) EnableIRQ()

EnableIRQ enables generating of IRQ by event recorded by r.

func (*Event) EnablePPI

func (r *Event) EnablePPI()

EnablePPI enables recording of events and routing them to the PPI. Only some peripherals (eg. RTC) implement this method. Note that if this method is implemented then EnableIRQ method also enables recording of events but does not enable routing them to the PPI.

func (*Event) IRQ

func (r *Event) IRQ() rtos.IRQ

IRQ returns NVIC IRQ number associated to r.

func (*Event) IRQEnabled

func (r *Event) IRQEnabled() bool

IntEnabled reports whether the occurence of an event will generate IRQ.

func (*Event) IsSet

func (r *Event) IsSet() bool

IsSet reports whether r recorded occurrence of an event.

func (*Event) PPIEnabled

func (r *Event) PPIEnabled() bool

PPIEnabled reports whether the occurrence of an event will be recorded by r and will be routed to the PPI. Only some peripherals (eg. RTC) implement this method.

type EventMask

type EventMask uint32

EventMask is a bitmask that can be used to perform some operation (like enable/disable IRQ) on multiple events atomically.

const EvAll EventMask = 0xFFFFFFFF

type Regs

type Regs struct {
	// contains filtered or unexported fields
}

Regs should be the first field on any Periph struct. It takes 0x400 bytes of memory.

func (*Regs) DisableIRQ

func (r *Regs) DisableIRQ(mask EventMask)

DisableIRQ disables generating of IRQ by events specified by mask.

func (*Regs) DisablePPI

func (r *Regs) DisablePPI(mask EventMask)

DisablePPI disables recording of events specified by mask and routing them to the PPI. Only some peripherals (eg. RTC) implement this method. Note that if this method is implemented it doesn't affect interrupt generation enabled by EnableIRQ which also enables events recording.

func (*Regs) EnableIRQ

func (r *Regs) EnableIRQ(mask EventMask)

EnableIRQ enables generating of IRQ by events specified by mask.

func (*Regs) EnablePPI

func (r *Regs) EnablePPI(mask EventMask)

EnablePPI enables recording of events specified by mask and routing them to the PPI. Only some peripherals (eg. RTC) implement this method. Note that if this method is implemented then EnableIRQ method also enables recording of events but does not enable routing them to the PPI.

func (*Regs) Event

func (r *Regs) Event(n int) *Event

func (*Regs) IRQ

func (r *Regs) IRQ() rtos.IRQ

IRQ returns NVIC IRQ number associated to events.

func (*Regs) IRQEnabled

func (r *Regs) IRQEnabled() EventMask

IRQEnabled returns EventMask, wherein the bit set indicates that the corresponding event will generate IRQ.

func (*Regs) LoadSHORTS

func (r *Regs) LoadSHORTS() uint32

LoadSHORTS returns currents value of the SHORTS register.

func (*Regs) PPIEnabled

func (r *Regs) PPIEnabled() EventMask

PPIEnabled returns EventMask, wherein the bit set indicates that the corresponding event will be recorded and will be routed to the PPI. Only some peripherals (eg. RTC) implements this method.

func (*Regs) StoreSHORTS

func (r *Regs) StoreSHORTS(s uint32)

StoreSHORTS stores s to the SHORTS register.

func (*Regs) Task

func (r *Regs) Task(n int) *Task

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task represents a peripheral register that is used to trigger events.

func (*Task) Trigger

func (r *Task) Trigger()

Trigger starts action corresponding to task t.

Jump to

Keyboard shortcuts

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