Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
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
120 rtc_status_t DS3231_setTimeSystem(rtc_instance_t *rtc, u8 use_12hour_mode) ; // End of DS3231_Funcs group
122
123#ifdef __cplusplus
124}
125#endif // C_plusplus
126 // End of MAIN DS3231 Group
128 // End of MAIN Supported_RTC Group
130#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:62
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:94
rtc_status_t DS3231_setTime(rtc_instance_t *rtc)
Set time on DS3231 RTC.
Definition DS3231.c:149
rtc_status_t
RTC Status List.
Definition rtc.h:60
struct rtc_instance rtc_instance_t
Forward declaration of RTC instance.
Definition rtc.h:110
RTC driver API definitions.
RTC API structure.
Definition rtc.h:132
uint8_t u8
Definition type.h:26