libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
51/clock.h
Go to the documentation of this file.
1/** @defgroup clock_defines CLOCK Defines
2 *
3 * @brief <b>Defined Constants and Types for the NRF51xx Clock control</b>
4 *
5 * @ingroup NRF51xx_defines
6 *
7 * @version 1.0.0
8 *
9 * @date Nov 2021
10 *
11 *LGPL License Terms @ref lgpl_license
12 */
13/*
14 * This file is part of the libopencm3 project.
15 *
16 * Copyright (C) 2017-2018 Unicore MX project<dev(at)lists(dot)unicore-mx(dot)org>
17 * Copyright (C) 2021 Eduard Drusa <ventyl86(at)netkosice(dot)sk>
18 *
19 * This library is free software: you can redistribute it and/or modify
20 * it under the terms of the GNU Lesser General Public License as published by
21 * the Free Software Foundation, either version 3 of the License, or
22 * (at your option) any later version.
23 *
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public License
30 * along with this library. If not, see <http://www.gnu.org/licenses/>.
31 */
32
33#pragma once
34
35#include <stdbool.h>
36
40
41/* Clock registers */
42#define CLOCK_XTALFREQ MMIO32(CLOCK_BASE + 0x550)
43
44#define CLOCK_PCLK 16000000
45
49};
50
52
54
56
clock_xtal_freq
Definition: 51/clock.h:46
@ CLOCK_XTAL_FREQ_16MHZ
Definition: 51/clock.h:48
@ CLOCK_XTAL_FREQ_32MHZ
Definition: 51/clock.h:47
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
void clock_set_xtal_freq(enum clock_xtal_freq freq)
Select nominal frequency of external crystal for HFCLK.
Definition: clock.c:40