Documentation ¶
Overview ¶
Package clock provides interface to manage nRF51 clocks source/generation.
Index ¶
- func DisableIRQ(mask te.EventMask)
- func EnableIRQ(mask te.EventMask)
- func IRQEnabled() te.EventMask
- func LoadCTIV() int
- func LoadHFCLKRUN() bool
- func LoadLFCLKRUN() bool
- func LoadTRACECONFIG() (TraceSpeed, TraceMux)
- func NVIRQ() nvic.IRQ
- func StoreCTIV(ctiv int)
- func StoreLFCLKSRC(src Source)
- func StoreTRACECONFIG(s TraceSpeed, m TraceMux)
- func StoreXTALFREQ(f XtalFreq)
- type Event
- type Source
- type Task
- type TraceMux
- type TraceSpeed
- type XtalFreq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableIRQ ¶
func IRQEnabled ¶
func LoadHFCLKRUN ¶
func LoadHFCLKRUN() bool
LoadHFCLKRUN returns true if HFCLKSTART task was triggered.
func LoadLFCLKRUN ¶
func LoadLFCLKRUN() bool
LoadLFCLKRUN returns true if LFCLKSTART task was triggered.
func LoadTRACECONFIG ¶
func LoadTRACECONFIG() (TraceSpeed, TraceMux)
LoadTRACECONFIG returns current speed of Trace Port clock and pin multiplexing of trace signals. nRF52.
func StoreCTIV ¶
func StoreCTIV(ctiv int)
StoreCTIV sets calibration timer interval as number of milliseconds (range: 250 ms to 31750 ms).
func StoreLFCLKSRC ¶
func StoreLFCLKSRC(src Source)
StoreLFCLKSRC sets clock source for LFCLK. It can only be modified when LFCLK is not running.
func StoreTRACECONFIG ¶
func StoreTRACECONFIG(s TraceSpeed, m TraceMux)
StoreTRACECONFIG sets speed of Trace Port clock and pin multiplexing of trace signals. nRF52.
func StoreXTALFREQ ¶
func StoreXTALFREQ(f XtalFreq)
StoreXTALFREQ selects frequency of external crystal for HFCLK. nRF51.
Types ¶
type Source ¶
type Source byte
func LoadHFCLKSTAT ¶
LoadHFCLKStat returns information about HFCLK status (running or not) and clock source.
func LoadLFCLKSRCCOPY ¶
func LoadLFCLKSRCCOPY() Source
LoadLFCLKSRCCOPY returns clock source for LFCLK from time when LFCLKSTART task has been triggered.
func LoadLFCLKSTAT ¶
LoadLFCLKSTAT returns information about LFCLK status (running or not) and clock source.
type Task ¶
type Task byte
const ( HFCLKSTART Task = 0 // Start high frequency crystal oscilator. HFCLKSTOP Task = 1 // Stop high frequency crystal oscilator. LFCLKSTART Task = 2 // Start low frequency source. LFCLKSTOP Task = 3 // Stop low frequency source. CAL Task = 4 // Start calibration of low freq. RC oscilator. CTSTART Task = 5 // Start calibration timer. CTSTOP Task = 6 // Stop calibration timer. )
type TraceSpeed ¶
type TraceSpeed byte
TraceSpeed represents speed of Trace Port clock.
const ( T32MHz TraceSpeed = 0 // 32 MHz Trace Port clock (TRACECLK = 16 MHz). T16MHz TraceSpeed = 1 // 16 MHz Trace Port clock (TRACECLK = 8 MHz). T8MHz TraceSpeed = 2 // 8 MHz Trace Port clock (TRACECLK = 4 MHz). T4MHz TraceSpeed = 3 // 4 MHz Trace Port clock (TRACECLK = 2 MHz). )