![]() |
Core2 for AWS IoT EduKit BSP 1.5.1
|
Functions for the BM8563 Real-Time Clock (RTC). More...
#include "esp_log.h"Go to the source code of this file.
Data Structures | |
| struct | rtc_date_t |
| The member defintions of the BM8563 RTC date. More... | |
Functions | |
| void | BM8563_Init () |
| Initializes the BM8563 real-time clock over i2c. More... | |
| void | BM8563_SetTime (rtc_date_t *data) |
| Sets the date and time on the BM8563. More... | |
| void | BM8563_GetTime (rtc_date_t *data) |
| Retrieves the date and time on the BM8563. More... | |
| void | BM8563_SetAlarmIRQ (int8_t minute, int8_t hour, int8_t day, int8_t week) |
| Sets the date and time "alarm" IRQ with the BM8563. More... | |
| int16_t | BM8563_SetTimerIRQ (int16_t value) |
| Sets the "timer" IRQ on the BM8563. More... | |
| int16_t | BM8563_GetTimerTime () |
| Retrieve the time left in the set timer. More... | |
| uint8_t | BM8563_GetIRQ () |
| Retrieve the IRQ status from timer/alarm. More... | |
| void | BM8563_ClearIRQ () |
| Clear the IRQ status from timer/alarm. More... | |
Functions for the BM8563 Real-Time Clock (RTC).
| void BM8563_Init | ( | ) |
Initializes the BM8563 real-time clock over i2c.
| void BM8563_SetTime | ( | rtc_date_t * | data | ) |
Sets the date and time on the BM8563.
Example:
Set the date and time to September 30, 2020 13:40:10.
| [in] | data | Desired date and time. |
| void BM8563_GetTime | ( | rtc_date_t * | data | ) |
Retrieves the date and time on the BM8563.
Example:
Get the current date and time and print it out.
| [out] | data | The current date and time. |
| void BM8563_SetAlarmIRQ | ( | int8_t | minute, |
| int8_t | hour, | ||
| int8_t | day, | ||
| int8_t | week | ||
| ) |
Sets the date and time "alarm" IRQ with the BM8563.
| [in] | minute | The minute to trigger the IRQ. |
| [in] | hour | The hour to trigger the IRQ. |
| [in] | day | The day to trigger the IRQ. |
| [in] | week | The week to trigger the IRQ. |
| int16_t BM8563_SetTimerIRQ | ( | int16_t | value | ) |
Sets the "timer" IRQ on the BM8563.
| [in] | value | Desired countdown time to trigger the IRQ. The maximum countdown time is 255 * 60 seconds. |
| int16_t BM8563_GetTimerTime | ( | ) |
Retrieve the time left in the set timer.
| uint8_t BM8563_GetIRQ | ( | ) |
Retrieve the IRQ status from timer/alarm.
| void BM8563_ClearIRQ | ( | ) |
Clear the IRQ status from timer/alarm.