RTC work
This commit is contained in:
parent
623f3e8335
commit
3e94e11212
2 changed files with 43 additions and 29 deletions
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MS_TO_NS(ms) ((uint64_t)(ms) * 1000ULL * 1000ULL)
|
||||
#define NS_TO_MS(ms) ((uint64_t)(ms) / (1000ULL * 1000ULL))
|
||||
|
||||
struct rtc_class_ops {
|
||||
uint64_t (*read_time)(void);
|
||||
void (*set_time)(uint64_t);
|
||||
|
|
@ -16,8 +19,10 @@ void rtc_time_set(uint64_t ns);
|
|||
|
||||
void rtc_alarm_set(uint64_t ns);
|
||||
uint64_t rtc_alarm_read(void);
|
||||
void rtc_alarm_enable(void);
|
||||
void rtc_alarm_disable(void);
|
||||
uint32_t rtc_alarm_status(void);
|
||||
void rtc_alarm_clear(void);
|
||||
|
||||
void rtc_irq_clear(void);
|
||||
uint32_t rtc_irq_enabled(void);
|
||||
|
||||
#endif // RTC_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue