rtcst

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

Documentation

Overview

Package rtcst implements tickless system timer using real time clock/counter. RTC system timer uses up to 20 bytes from first backup registers to preserve its state. 8 bytes are used to implement rtos.Nanosec. If SetTime function is used to set current calendar time, a further 12 bytes are used to preserve RTC start time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ISR

func ISR()

ISR should be set as irq.RTCAlarm interrupt handler.

func SetTime

func SetTime(t time.Time, ns int64)

SetTime works like time.Set but also updates RTC.

func Setup

func Setup(freqHz uint)

Stetup setups RTC as system timer using LSE as clock source. FreqHz should be set to LSE frequency.

func Status

func Status() (ok, set bool)

Status returns status of RTC. Ok informs whether RTC is configured and works properly, set informs whether callendar time was set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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