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

Overview

Function definitions for DS3231 driver.

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

Functions

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_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 62 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 149 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 94 of file DS3231.c.