Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

BF51x/otRTC.h File Reference

Real Time Clock Library for BF51x. More...

#include "otdefs.h"

Enumerations

enum  RtcInterrupts {
  Rtc_Stopwatch = 1, Rtc_Alarm = 2, Rtc_Seconds = 4, Rtc_Minutes = 8,
  Rtc_Hours = 16, Rtc_24_Hours = 32, Rtc_Day_Alarm = 64
}

Functions

U32 RtcGetTime (U8 *h, U8 *m, U8 *s)
 Get current time.
void RtcSetTime (U8 h, U8 m, U8 s)
 Set current time.
U32 RtcGetDate (int *year, int *month, int *day)
 Get current date.
void RtcSetDate (int year, int month, int day)
 Set date.
void RtcSetAlarm (U8 h, U8 m, U8 s)
 Set a time at which an interrupt will be triggered. Only hours, minutes, seconds are used.
void RtcSetDayAlarm (int year, int month, int day, U8 h, U8 m, U8 s)
 Set a time at which an interrupt will be triggered.
void RtcOn ()
void RtcSetInterruptService (void(*pCallback)(void))
void RtcInterruptEnable (U16 intSource, bool ena)
void RtcSetCountDown (U16 val)
 Set a value for the stopwatch.
U16 RtcGetCountDown ()


Detailed Description

Version:
1.0.0
Author:
Manuele Turini
footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0