mcg.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 PHYTEC Messtechnik GmbH
3  * Copyright (C) 2017 Eistec AB
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
10 #pragma once
11 
12 /* please doxygen by hiding dangling references */
13 #if defined(MODULE_PERIPH_MCG) || defined(MODULE_PERIPH_MCG_LITE) || defined(DOXYGEN)
123 #endif /* MODULE_PERIPH_MCG */
124 
125 #include "periph_conf.h"
126 
127 #ifdef __cplusplus
128 extern "C"
129 {
130 #endif
131 
132 #if DOXYGEN
139 #define CLOCK_CORECLOCK (MCGOUTCLK)
146 #define CLOCK_BUSCLOCK (CLOCK_CORECLOCK / x)
147 #endif
148 
160 int kinetis_mcg_set_mode(kinetis_mcg_mode_t mode);
161 
167 void kinetis_mcg_init(void);
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
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.