![]() |
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.
Functions | |
| 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. | |
| 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.
This function reads a high-resolution timer counter and ensures that the values are read consistently.
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.
This function reads a high-resolution timer counter and ensures that the values are read consistently.
| uint32_t get_init_timestamp | ( | ) |
Get the initialization timestamp.
This function retrieves the initialization timestamp set during the system timer setup.
This function returns the timestamp that was set during initialization.
This function retrieves the initialization timestamp set during the system timer setup.
This function returns the timestamp that was set during initialization.
| 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. |
Delay execution for a specified number of loops (treated as microseconds).
This function directly calls udelay with the specified number of loops, which is treated as microseconds.
| loops | Number of microsecond loops to delay. |
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. |
Delay execution for a specified number of loops (treated as microseconds).
This function directly calls udelay with the specified number of loops, which is treated as microseconds.
| loops | Number of microsecond loops to delay. |
| 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.
This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz) scaled to milliseconds.
This function calculates the current time based on the architecture counter and returns it in milliseconds.
This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz) scaled to 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.
This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz).
This function calculates the current time based on the architecture counter and returns it in microseconds.
This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz).
| 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. |
This function uses a busy-wait loop to create a delay for the specified number of microseconds.
| us | Number of microseconds to delay. |
This function creates a delay for the specified number of microseconds using a busy-wait loop.
| us | Number of microseconds to delay. |
This function uses a busy-wait loop to create a delay for the specified number of microseconds.
| us | Number of microseconds to delay. |