![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|
#include <io.h>#include <stdarg.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <types.h>#include "log.h"

Go to the source code of this file.
Macros | |
| #define | EFEX_FLAG (0x5AA5A55A) |
| #define | RTC_FEL_INDEX 2 |
| #define | RTC_DRAM_PARA_ADDR 3 |
| #define | RTC_BOOT_INDEX 6 |
Functions | |
| void | rtc_write_data (int index, uint32_t val) |
| Write data to the RTC register at the specified index. | |
| uint32_t | rtc_read_data (int index) |
| Read data from the RTC register at the specified index. | |
| void | rtc_set_fel_flag (void) |
| Set the FEL (Fastboot External Loader) flag in the RTC register. | |
| void | rtc_set_start_time_ms (void) |
| Set the start time in milliseconds in the RTC register. | |
| void | rtc_set_dram_para (uint32_t dram_para_addr) |
| Sets the parameters for Dynamic Random Access Memory (DRAM). | |
| uint32_t | rtc_probe_fel_flag (void) |
| Probe the FEL (Fastboot External Loader) flag in the RTC register. | |
| void | rtc_clear_fel_flag (void) |
| Clear the FEL (Fastboot External Loader) flag in the RTC register. | |
| int | rtc_set_bootmode_flag (uint8_t flag) |
| Set the bootmode flag in the RTC register. | |
| int | rtc_get_bootmode_flag (void) |
| Get the bootmode flag from the RTC register. | |
| #define EFEX_FLAG (0x5AA5A55A) |
| #define RTC_BOOT_INDEX 6 |
| #define RTC_DRAM_PARA_ADDR 3 |
| #define RTC_FEL_INDEX 2 |
| void rtc_clear_fel_flag | ( | void | ) |
Clear the FEL (Fastboot External Loader) flag in the RTC register.
This function clears the FEL flag after it has been processed.
Clear the FEL (Fastboot External Loader) flag in the RTC register.
Clears the FEL flag in the RTC register after it has been processed. The function verifies the write operation was successful by reading back the value.
| int rtc_get_bootmode_flag | ( | void | ) |
Get the bootmode flag from the RTC register.
Get the bootmode flag from the RTC register.
Reads the boot mode flag from the RTC register. This is used to determine how the system should boot. The operation is designed to be compatible with how the kernel reads this value.
| uint32_t rtc_probe_fel_flag | ( | void | ) |
Probe the FEL (Fastboot External Loader) flag in the RTC register.
Probe the FEL (Fastboot External Loader) flag in the RTC register.
Reads the FEL flag from the RTC register and returns whether it is set.
| uint32_t rtc_read_data | ( | int | index | ) |
Read data from the RTC register at the specified index.
| index | The index of the RTC register to read data from. |
Read data from the RTC register at the specified index.
Reads a 32-bit value from the RTC register at the specified index.
| index | The index of the RTC register to read data from |
| int rtc_set_bootmode_flag | ( | uint8_t | flag | ) |
Set the bootmode flag in the RTC register.
| flag | The bootmode flag value to set. |
Set the bootmode flag in the RTC register.
Sets the boot mode flag in the RTC register, which determines how the system will boot. The function verifies the write operation was successful.
| flag | The boot mode flag value to set |
| void rtc_set_dram_para | ( | uint32_t | dram_para_addr | ) |
Sets the parameters for Dynamic Random Access Memory (DRAM).
This function is used to set the parameters for DRAM and ensures the success of parameter setting through a loop.
| dram_para_addr | Address for DRAM parameters to be set. |
| void rtc_set_fel_flag | ( | void | ) |
Set the FEL (Fastboot External Loader) flag in the RTC register.
This flag indicates that the system should enter Fastboot mode.
Set the FEL (Fastboot External Loader) flag in the RTC register.
Sets the FEL flag in the RTC register, which indicates that the system should enter Fastboot mode. The function verifies the write operation was successful by reading back the value.
| void rtc_set_start_time_ms | ( | void | ) |
Set the start time in milliseconds in the RTC register.
This function sets the start time for a specific operation.
Set the start time in milliseconds in the RTC register.
Stores the initialization timestamp (in milliseconds) in the RTC register. This value can be used for timing operations or to determine the system uptime. The function verifies the write operation was successful.
| void rtc_write_data | ( | int | index, |
| uint32_t | val | ||
| ) |
Write data to the RTC register at the specified index.
| index | The index of the RTC register to write data to. |
| val | The value to write to the RTC register. |
Write data to the RTC register at the specified index.
Writes a 32-bit value to the RTC register at the specified index.
| index | The index of the RTC register to write data to |
| val | The value to write to the RTC register |