SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
sys-rtc.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef __SYS_RTC_H__
4#define __SYS_RTC_H__
5
6#include <io.h>
7#include <stdarg.h>
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <types.h>
12
13#include "log.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif// __cplusplus
18
19#define EFEX_FLAG (0x5AA5A55A)
20#define RTC_FEL_INDEX 2
21#define RTC_DRAM_PARA_ADDR 3
22#define RTC_BOOT_INDEX 6
23
31
39
44void rtc_set_fel_flag(void);
45
50void rtc_set_start_time_ms(void);
51
63void rtc_set_dram_para(uint32_t dram_para_addr);
64
71
76void rtc_clear_fel_flag(void);
77
85
91int rtc_get_bootmode_flag(void);
92
93#ifdef __cplusplus
94}
95#endif// __cplusplus
96
97#endif// __SYS_RTC_H__
ul val
Definition memtester.c:33
u32_t uint32_t
Definition stdint.h:13
u8_t uint8_t
Definition stdint.h:7
uint32_t rtc_read_data(int index)
Read data from the RTC register at the specified index.
Definition sys-rtc.c:46
void rtc_set_fel_flag(void)
Set the FEL (Fastboot External Loader) flag in the RTC register.
Definition sys-rtc.c:56
void rtc_set_start_time_ms(void)
Set the start time in milliseconds in the RTC register.
Definition sys-rtc.c:69
void rtc_clear_fel_flag(void)
Clear the FEL (Fastboot External Loader) flag in the RTC register.
Definition sys-rtc.c:109
int rtc_get_bootmode_flag(void)
Get the bootmode flag from the RTC register.
Definition sys-rtc.c:139
int rtc_set_bootmode_flag(uint8_t flag)
Set the bootmode flag in the RTC register.
Definition sys-rtc.c:123
uint32_t rtc_probe_fel_flag(void)
Probe the FEL (Fastboot External Loader) flag in the RTC register.
Definition sys-rtc.c:100
void rtc_set_dram_para(uint32_t dram_para_addr)
Sets the parameters for Dynamic Random Access Memory (DRAM).
Definition sys-rtc.c:88
void rtc_write_data(int index, uint32_t val)
Write data to the RTC register at the specified index.
Definition sys-rtc.c:36
uint16_t index
Definition usb.h:3