ppi

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

Documentation

Overview

Package ppi provides interface to Programmable Peripheral Interconnect (PPI).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableIRQ

func DisableIRQ(mask te.EventMask)

func EnableIRQ

func EnableIRQ(mask te.EventMask)

func IRQEnabled

func IRQEnabled() te.EventMask

func NVIRQ

func NVIRQ() nvic.IRQ

Types

type Chan

type Chan byte

Chan represents PPI channel. There are 31 channels numbered from 0 to 31. Channels from 20 to 31 are pre-programmed.

const (
	TIMER0_COMPARE0__RADIO_TXEN    Chan = 20
	TIMER0_COMPARE0__RADIO_RXEN    Chan = 21
	TIMER0_COMPARE1__RADIO_DISABLE Chan = 22
	RADIO_BCMATCH__AAR_START       Chan = 23
	RADIO_READY__CCM_KSGEN         Chan = 24
	RADIO_ADDRESS__CCM_CRYPT       Chan = 25
	RADIO_ADDRESS__TIMER0_CAPTURE1 Chan = 26
	RADIO_END__TIMER0_CAPTURE2     Chan = 27
	RTC0_COMPARE0__RADIO_TXEN      Chan = 28
	RTC0_COMPARE0__RADIO_RXEN      Chan = 29
	RTC0_COMPARE0__TIMER0_CLEAR    Chan = 30
	RTC0_COMPARE0__TIMER0_START    Chan = 31
)

Pre-programmed channels.

func (Chan) Disable

func (c Chan) Disable()

Enable atomically disables channel c.

func (Chan) EEP

func (c Chan) EEP() *te.Event

EEP returns the value of Event End Point register for channel c.

func (Chan) Enable

func (c Chan) Enable()

Enable atomically enables channel c.

func (Chan) Enabled

func (c Chan) Enabled() bool

Enabled reports whether channel c is enabled.

func (Chan) FTEP

func (c Chan) FTEP() *te.Task

FTEP returns the value of Fork Task End Point register for channel c. nRF52.

func (Chan) Mask

func (c Chan) Mask() Channels

func (Chan) SetEEP

func (c Chan) SetEEP(e *te.Event)

SetEEP sets the value of Event End Point register for channel c.

func (Chan) SetFTEP

func (c Chan) SetFTEP(t *te.Task)

SetFTEP sets the value of Fork Task End Point register for channel c. nRF52.

func (Chan) SetTEP

func (c Chan) SetTEP(t *te.Task)

SetTEP sets the value of Task End Point register for channel c.

func (Chan) TEP

func (c Chan) TEP() *te.Task

TEP returns the value of Task End Point register for channel c.

type Channels

type Channels uint32

func Enabled

func Enabled() Channels

Enabled returns a bitfield where each bit corresponds to one channel. Zero means channel is disabled, one means channel is enabled.

func (Channels) Disable

func (c Channels) Disable()

Disable atomically disables channels sepcified by c.

func (Channels) Enable

func (c Channels) Enable()

Enable atomically enables channels sepcified by c.

type Group

type Group int8

Group repersents PPI channel group. There are 4 channel groups (6 in nRF52) numbered from 0 to 3 (5 in nRF52).

func (Group) Channels

func (g Group) Channels() Channels

Channels returns channels that belongs to the group g.

func (Group) DIS

func (g Group) DIS() Task

DIS returns task that can be used to disable channel group g.

func (Group) EN

func (g Group) EN() Task

EN returns task that can be used to enable channel group g.

func (Group) SetChannels

func (g Group) SetChannels(c Channels)

SetChannels sets channels that belongs to the group g.

type Task

type Task byte

func (Task) Task

func (t Task) Task() *te.Task

Jump to

Keyboard shortcuts

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