RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
DS3231.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2026 Efinix Inc. All rights reserved.
3// Full license header bsp/efinix/EfxSapphireSocRV64/include/LICENSE.MD
5
6#ifndef DS3231_H_
7#define DS3231_H_
8
19
20#include "rtc/rtc.h"
30
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/* ========================================================================== */
45/* SUB-GROUP : REGISTER DEFINITIONS */
46/* ========================================================================== */
47
57 #define RTC_DS3231_ADDR 0x68<<1
58 // End of DS3231_Macros group
60
61
62/* ========================================================================== */
63/* SUB-GROUP : Driver Definition */
64/* ========================================================================== */
65
87 extern const rtc_api_t DS3231_DRIVER;
88 // End of DS3231_DRV group
90
91/* ========================================================================== */
92/* SUB-GROUP: FUNCTIONS */
93/* ========================================================================== */
94
132 rtc_status_t DS3231_setTimeSystem(rtc_instance_t *rtc, u8 use_12hour_mode) ; // End of DS3231_Funcs group
134
135#ifdef __cplusplus
136}
137#endif // C_plusplus
138 // End of MAIN DS3231 Group
140 // End of MAIN Supported_RTC Group
142#endif // DS3231_H_
const rtc_api_t DS3231_DRIVER
DS3231 Driver Instance. Point your generic RTC pointer to this structure to use the DS3231 hardware.
rtc_status_t DS3231_getTime(rtc_instance_t *rtc)
Get time from DS3231 RTC.
Definition DS3231.c:77
rtc_status_t DS3231_applyConfig(rtc_instance_t *rtc)
Apply I2C + RTC configuration.
Definition DS3231.c:64
rtc_status_t DS3231_setTimeSystem(rtc_instance_t *rtc, u8 use_12hour_mode)
Set time system (12-hour or 24-hour) on DS3231 RTC.
Definition DS3231.c:109
rtc_status_t DS3231_enableErrorInterrupt(rtc_instance_t *rtc)
Enable error interrupt for DS3231 RTC.
Definition DS3231.c:70
rtc_status_t DS3231_setTime(rtc_instance_t *rtc)
Set time on DS3231 RTC.
Definition DS3231.c:164
rtc_status_t
RTC Status List.
Definition rtc.h:94
struct rtc_instance rtc_instance_t
Forward declaration of RTC instance.
Definition rtc.h:115
RTC driver API definitions.
RTC API structure.
Definition rtc.h:137
uint8_t u8
Definition type.h:30