![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|
System clock driver for Allwinner (sunxi) platforms. More...
#include <io.h>#include <stdarg.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <types.h>#include <log.h>
Functions | |
| void | __attribute__ ((weak)) |
| Initialize system clocks. | |
Variables | |
| uint32_t | current_hosc_freq |
| Current high-speed oscillator frequency. | |
System clock driver for Allwinner (sunxi) platforms.
This file provides weak implementations of clock-related functions that can be overridden by platform-specific code.
| void __attribute__ | ( | (weak) | ) |
Initialize system clocks.
Set CPU PLL frequency.
Get peripheral 1x clock rate.
Initialize USB clocks.
Deinitialize USB clocks.
Dump clock information.
Reset system clocks.
Get high-speed oscillator type.
Pre-initialize system clocks.
This weak function initializes all system clocks. Platform-specific implementations should override this function.
This weak function performs preliminary clock initialization before the main clock initialization. Platform-specific implementations should override this function.
This weak function returns the type/frequency of the high-speed oscillator (HOSC). The default implementation returns 24 MHz.
This weak function resets system clocks to their default state. Platform-specific implementations should override this function.
This weak function dumps information about the current clock configuration for debugging purposes. Platform-specific implementations should override this function.
This weak function deinitializes clocks for USB controllers. Platform-specific implementations should override this function.
This weak function initializes clocks for USB controllers. Platform-specific implementations should override this function.
This weak function returns the frequency of the peripheral 1x clock. The default implementation returns 0.
This weak function configures the CPU PLL to the specified frequency. Platform-specific implementations should override this function.
| freq | Target frequency in Hz |
|
extern |
Current high-speed oscillator frequency.
This external variable holds the current frequency of the high-speed oscillator (HOSC) in MHz.
Current high-speed oscillator frequency.