VSF Documented
|
#include "hal/vsf_hal_cfg.h"
#include "./device.h"
#include "./driver.h"
#include "pico/platform.h"
#include "hardware/platform_defs.h"
#include "hardware/address_mapped.h"
#include "hardware/regs/resets.h"
#include "hardware/structs/xosc.h"
#include "hardware/structs/clocks.h"
#include "hardware/structs/pll.h"
#include "hardware/structs/resets.h"
#include "hal/driver/common/swi/arm/vsf_swi_template.inc"
Macros | |
#define | KHZ 1000 |
#define | MHZ 1000000 |
#define | PLL_COMMON_REFDIV 1 |
\tag::pll_settings[] | |
#define | PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 |
#define | STARTUP_DELAY (((XOSC_KHZ + 128) / 256) * PICO_XOSC_STARTUP_DELAY_MULTIPLIER) |
Functions | |
void | xosc_init (void) |
\end::reset_funcs[] | |
void | pll_init (pll_hw_t *pll, uint refdiv, uint vco_freq, uint post_div1, uint post_div2) |
\tag::pll_init_calculations[] | |
bool | clock_configure (enum clock_index clk_index, uint32_t src, uint32_t auxsrc, uint32_t src_freq, uint32_t freq) |
\tagclock_configure[] | |
uint32_t | clock_get_hz (enum clock_index clk_index) |
\endclock_configure[] | |
bool | vsf_driver_init (void) |
\endclock_get_hz[] | |
#define KHZ 1000 |
#define MHZ 1000000 |
#define PLL_COMMON_REFDIV 1 |
\tag::pll_settings[]
\end::pll_settings[]
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 |
#define STARTUP_DELAY (((XOSC_KHZ + 128) / 256) * PICO_XOSC_STARTUP_DELAY_MULTIPLIER) |
void xosc_init | ( | void | ) |
\end::reset_funcs[]
\tag::pll_init_calculations[]
\end::pll_init_calculations[]
\tag::pll_init_finish[]
\end::pll_init_finish[]
bool clock_configure | ( | enum clock_index | clk_index, |
uint32_t | src, | ||
uint32_t | auxsrc, | ||
uint32_t | src_freq, | ||
uint32_t | freq | ||
) |
\tagclock_configure[]
uint32_t clock_get_hz | ( | enum clock_index | clk_index | ) |
\endclock_configure[]
\tagclock_get_hz[]
bool vsf_driver_init | ( | void | ) |
\endclock_get_hz[]
common hal drivers
none |
true | initialization succeeded. |
false | initialization failed |
\tagpll_init[]
\endpll_init[]
\tag::configure_clk_sys[]
\end::configure_clk_sys[]