mcg.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 PHYTEC Messtechnik GmbH
3  * SPDX-FileCopyrightText: 2017 Eistec AB
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
9 /* please doxygen by hiding dangling references */
10 #if defined(MODULE_PERIPH_MCG) || defined(MODULE_PERIPH_MCG_LITE) || defined(DOXYGEN)
120 #endif /* MODULE_PERIPH_MCG */
121 
122 #include "periph_conf.h"
123 
124 #ifdef __cplusplus
125 extern "C"
126 {
127 #endif
128 
129 #if DOXYGEN
136 #define CLOCK_CORECLOCK (MCGOUTCLK)
143 #define CLOCK_BUSCLOCK (CLOCK_CORECLOCK / x)
144 #endif
145 
157 int kinetis_mcg_set_mode(kinetis_mcg_mode_t mode);
158 
164 void kinetis_mcg_init(void);
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
int kinetis_mcg_set_mode(kinetis_mcg_mode_t mode)
Switch the MCG to the specified clocking mode.
void kinetis_mcg_init(void)
Initialize the MCG.