Bouffalo SDK  1.0
Bouffalolab Software Development Kit
RTC
Collaboration diagram for RTC:

Macros

#define BFLB_RTC_SEC2TIME(s)   (s * 32768)
 
#define BFLB_RTC_TIME2SEC(time)   (time / 32768)
 

Functions

void bflb_rtc_disable (struct bflb_device_s *dev)
 clear and disable rtc. More...
 
void bflb_rtc_set_time (struct bflb_device_s *dev, uint64_t time)
 Set rtc alarming time. More...
 
uint64_t bflb_rtc_get_time (struct bflb_device_s *dev)
 Get rtc current time. More...
 

Detailed Description

Macro Definition Documentation

◆ BFLB_RTC_SEC2TIME

#define BFLB_RTC_SEC2TIME (   s)    (s * 32768)

Definition at line 14 of file bflb_rtc.h.

◆ BFLB_RTC_TIME2SEC

#define BFLB_RTC_TIME2SEC (   time)    (time / 32768)

Definition at line 15 of file bflb_rtc.h.

Function Documentation

◆ bflb_rtc_disable()

void bflb_rtc_disable ( struct bflb_device_s dev)

clear and disable rtc.

Parameters
[in]devdevice handle

◆ bflb_rtc_get_time()

uint64_t bflb_rtc_get_time ( struct bflb_device_s dev)

Get rtc current time.

Parameters
[in]devdevice handle
Returns
current rtc running time

◆ bflb_rtc_set_time()

void bflb_rtc_set_time ( struct bflb_device_s dev,
uint64_t  time 
)

Set rtc alarming time.

Parameters
[in]devdevice handle
[in]timealarming time, unit is (1/32768 s)