Documentation
¶
Overview ¶
Package provides Task and Event types that represent peripheral task and event registers.
Index ¶
- type Event
- type EventMask
- type Regs
- func (r *Regs) DisableIRQ(mask EventMask)
- func (r *Regs) DisablePPI(mask EventMask)
- func (r *Regs) EnableIRQ(mask EventMask)
- func (r *Regs) EnablePPI(mask EventMask)
- func (r *Regs) Event(n int) *Event
- func (r *Regs) IRQ() rtos.IRQ
- func (r *Regs) IRQEnabled() EventMask
- func (r *Regs) LoadSHORTS() uint32
- func (r *Regs) PPIEnabled() EventMask
- func (r *Regs) StoreSHORTS(s uint32)
- func (r *Regs) Task(n int) *Task
- type Task
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) 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) IRQEnabled ¶
IntEnabled reports whether the occurence of an event will generate IRQ.
func (*Event) PPIEnabled ¶
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 ¶
DisableIRQ disables generating of IRQ by events specified by mask.
func (*Regs) DisablePPI ¶
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) EnablePPI ¶
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) IRQEnabled ¶
IRQEnabled returns EventMask, wherein the bit set indicates that the corresponding event will generate IRQ.
func (*Regs) LoadSHORTS ¶
LoadSHORTS returns currents value of the SHORTS register.
func (*Regs) PPIEnabled ¶
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 ¶
StoreSHORTS stores s to the SHORTS register.