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
PCF8523.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 SRC_RTC_PCF8523_H_
7#define SRC_RTC_PCF8523_H_
8
19
20#include "rtc/rtc.h"
27
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/* ========================================================================== */
42/* SUB-GROUP : REGISTER DEFINITIONS */
43/* ========================================================================== */
44
55 #define MUX_ADDR 0x71<<1
59 #define RTC_PCF8523_ADDR 0x68<<1
60 // End of PCF8523_Macros group
62
63/* ========================================================================== */
64/* SUB-GROUP : Driver Definition */
65/* ========================================================================== */
66
88 extern const rtc_api_t PCF8523_DRIVER; // End of PCF8523_DRV group
90
91
92/* ========================================================================== */
93/* SUB-GROUP: FUNCTIONS */
94/* ========================================================================== */
95
127 rtc_status_t PCF8523_setTimeSystem(rtc_instance_t *rtc, u8 use_12hour_mode) ;
128 // End of PCF8523_Funcs group
130#ifdef __cplusplus
131}
132#endif // C_plusplus
133 // End of MAIN PCF8523 Group
135 // End of MAIN Supported_RTC Group
137#endif // PCF8523_H_
const rtc_api_t PCF8523_DRIVER
PCF8523 Driver Instance. Point your generic RTC pointer to this structure to use the PCF8523 hardware...
Definition PCF8523.c:55
rtc_status_t PCF8523_getTime(rtc_instance_t *rtc)
Get time from PCF8523 RTC.
Definition PCF8523.c:63
rtc_status_t PCF8523_getCSR(rtc_instance_t *rtc)
Get control/status register from PCF8523 RTC.
Definition PCF8523.c:176
rtc_status_t PCF8523_setTimeSystem(rtc_instance_t *rtc, u8 use_12hour_mode)
Set time system (12-hour or 24-hour) on PCF8523 RTC.
Definition PCF8523.c:128
rtc_status_t PCF8523_setTime(rtc_instance_t *rtc)
Set time on PCF8523 RTC.
Definition PCF8523.c:97
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