@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
pll.h
Go to the documentation of this file.
/*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _HARDWARE_PLL_H
#define _HARDWARE_PLL_H
#include "pico.h"
#include "hardware/structs/pll.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef pll_hw_t *PLL;
#define pll_sys pll_sys_hw
#define pll_usb pll_usb_hw
#ifndef PICO_PLL_VCO_MIN_FREQ_HZ
#ifdef PICO_PLL_VCO_MIN_FREQ_MHZ
#define PICO_PLL_VCO_MIN_FREQ_HZ (PICO_PLL_VCO_MIN_FREQ_MHZ * MHZ)
#elif defined(PICO_PLL_VCO_MIN_FREQ_KHZ)
#define PICO_PLL_VCO_MIN_FREQ_HZ (PICO_PLL_VCO_MIN_FREQ_KHZ * KHZ)
#else
#define PICO_PLL_VCO_MIN_FREQ_HZ (750 * MHZ)
#endif
#endif
#ifndef PICO_PLL_VCO_MAX_FREQ_HZ
#ifdef PICO_PLL_VCO_MAX_FREQ_MHZ
#define PICO_PLL_VCO_MAX_FREQ_HZ (PICO_PLL_VCO_MAX_FREQ_MHZ * MHZ)
#elif defined(PICO_PLL_VCO_MAX_FREQ_KHZ)
#define PICO_PLL_VCO_MAX_FREQ_HZ (PICO_PLL_VCO_MAX_FREQ_KHZ * KHZ)
#else
#define PICO_PLL_VCO_MAX_FREQ_HZ (1600 * MHZ)
#endif
#endif
void pll_init(PLL pll, uint ref_div, uint vco_freq, uint post_div1, uint post_div2);
void pll_deinit(PLL pll);
#ifndef PLL_RESET_NUM
#define PLL_RESET_NUM(pll) ((pll_usb_hw == (pll)) ? RESET_PLL_USB : RESET_PLL_SYS)
#endif
#ifdef __cplusplus
}
#endif
#endif
pll_deinit
void pll_deinit(PLL pll)
Release/uninitialise specified PLL.
Definition pll.c:73
pll_init
void pll_init(PLL pll, uint ref_div, uint vco_freq, uint post_div1, uint post_div2)
Initialise specified PLL.
Definition pll.c:13
pico.h
pll_hw_t
Definition pll.h:27