Documentation
¶
Index ¶
Constants ¶
View Source
const NumChan = numChan
NumChan is the number of implemented GPIOTE channels (4 in case of nRF51, 8 in case of nRF52).
Variables ¶
This section is empty.
Functions ¶
func DisableIRQ ¶
func IRQEnabled ¶
Types ¶
type Chan ¶
type Chan int8
Chan represents GPIOTE channel.
func Alloc ¶ added in v0.4.0
func Alloc() Chan
Alloc returns an unused GPIOTE channel. It returns negative number if there is no free channel.
func (Chan) Free ¶ added in v0.1.3
func (c Chan) Free()
Free disables channel and returns it to the pool of unused channels.
type Config ¶
type Config uint32
const ( ModeNC Config = 0 // Disconnect pin from GPIOTE module. ModeEvent Config = 1 // Pin generates IN event. ModeTask Config = 3 // Pin controlled by OUT, SET, CLR task. PolarityNone Config = 0 << 16 // No task on pin, no event from pin. PolarityLoToHi Config = 1 << 16 // OUT sets pin, IN when rising edge. PolarityHiToLo Config = 2 << 16 // OUT clears pin, IN when falling edge. PolarityToggle Config = 3 << 16 // OUT toggles pin, IN when any change. OutInitLow Config = 0 // Low initial output value. OutInitHigh Config = 1 << 20 // High initial output value. )
Click to show internal directories.
Click to hide internal directories.