RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches

Overview

Function definitions for DS3231 driver.

Note
This is the public API for the DS3231 RTC device.

Functions

rtc_status_t DS3231_applyConfig (rtc_instance_t *rtc)
 Apply I2C + RTC configuration.
rtc_status_t DS3231_enableErrorInterrupt (rtc_instance_t *rtc)
 Enable error interrupt for DS3231 RTC.
rtc_status_t DS3231_getTime (rtc_instance_t *rtc)
 Get time from DS3231 RTC.
rtc_status_t DS3231_setTime (rtc_instance_t *rtc)
 Set time on DS3231 RTC.
rtc_status_t DS3231_setTimeSystem (rtc_instance_t *rtc, u8 use_12hour_mode)
 Set time system (12-hour or 24-hour) on DS3231 RTC.

Function Documentation

◆ DS3231_applyConfig()

rtc_status_t DS3231_applyConfig ( rtc_instance_t * rtc)

#include <DS3231.h>

Apply I2C + RTC configuration.

Parameters
rtcPointer to RTC instance.
Returns
Status code of the operation.

Definition at line 64 of file DS3231.c.

◆ DS3231_enableErrorInterrupt()

rtc_status_t DS3231_enableErrorInterrupt ( rtc_instance_t * rtc)

#include <DS3231.h>

Enable error interrupt for DS3231 RTC.

Parameters
rtcPointer to RTC instance.
Returns
Status code of the operation.

Definition at line 70 of file DS3231.c.

◆ DS3231_getTime()

rtc_status_t DS3231_getTime ( rtc_instance_t * rtc)

#include <DS3231.h>

Get time from DS3231 RTC.

Parameters
rtcPointer to RTC instance.
Returns
Status code of the operation.

Definition at line 77 of file DS3231.c.

◆ DS3231_setTime()

rtc_status_t DS3231_setTime ( rtc_instance_t * rtc)

#include <DS3231.h>

Set time on DS3231 RTC.

Parameters
rtcPointer to RTC instance.
Returns
Status code of the operation.

Definition at line 164 of file DS3231.c.

◆ DS3231_setTimeSystem()

rtc_status_t DS3231_setTimeSystem ( rtc_instance_t * rtc,
u8 use_12hour_mode )

#include <DS3231.h>

Set time system (12-hour or 24-hour) on DS3231 RTC.

Parameters
rtcPointer to RTC instance.
use_12hour_modeFlag indicating whether to use 12-hour mode (1) or 24-hour mode (0).
Returns
Status code of the operation.

Definition at line 109 of file DS3231.c.