![]() |
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>#include <timer.h>
Functions | |
| void | set_timer_count () |
| Set timer count. | |
| uint64_t | get_arch_counter (void) |
| Get the architecture-specific counter value. | |
| uint32_t | time_ms (void) |
| Get the current time in milliseconds. | |
| uint64_t | time_us (void) |
| Get the current time in microseconds. | |
| void | udelay (uint32_t us) |
| Delay execution for a specified number of microseconds. | |
| void | mdelay (uint32_t ms) |
| Delay execution for a specified number of milliseconds. | |
| void | sdelay (uint32_t loops) |
| Delay execution for a specified number of loops (treated as microseconds). | |
| uint32_t | get_init_timestamp () |
| Get the initialization timestamp. | |
Variables | |
| static uint32_t | init_timestamp = 0 |
| uint64_t get_arch_counter | ( | void | ) |
Get the architecture-specific counter value.
This function retrieves the current value of the architecture-specific timer counter. The returned value is a 64-bit integer representing the timer's current count.
| uint32_t get_init_timestamp | ( | ) |
Get the initialization timestamp.
This function retrieves the initialization timestamp set during the system timer setup.
| void mdelay | ( | uint32_t | ms | ) |
Delay execution for a specified number of milliseconds.
This function converts milliseconds to microseconds and calls the udelay function to implement the delay.
| ms | Number of milliseconds to delay. |
| void sdelay | ( | uint32_t | loops | ) |
Delay execution for a specified number of loops (treated as microseconds).
This function creates a delay based on the number of microsecond loops specified, by calling the udelay function directly.
| loops | Number of microsecond loops to delay. |
| void set_timer_count | ( | ) |
Set timer count.
This function is used to set the count value of the timer.
| uint32_t time_ms | ( | void | ) |
Get the current time in milliseconds.
This function calculates the current time based on the architecture counter and returns it in milliseconds.
| uint64_t time_us | ( | void | ) |
Get the current time in microseconds.
This function calculates the current time based on the architecture counter and returns it in microseconds.
| void udelay | ( | uint32_t | us | ) |
Delay execution for a specified number of microseconds.
This function creates a delay for the specified number of microseconds using a busy-wait loop.
| us | Number of microseconds to delay. |
|
static |