diff options
Diffstat (limited to 'keyboards/ergodox_infinity/mcuconf.h')
-rw-r--r-- | keyboards/ergodox_infinity/mcuconf.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/keyboards/ergodox_infinity/mcuconf.h b/keyboards/ergodox_infinity/mcuconf.h new file mode 100644 index 000000000..f6730b99c --- /dev/null +++ b/keyboards/ergodox_infinity/mcuconf.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef _MCUCONF_H_ | ||
18 | #define _MCUCONF_H_ | ||
19 | |||
20 | #define K20x_MCUCONF | ||
21 | |||
22 | /* | ||
23 | * HAL driver system settings. | ||
24 | */ | ||
25 | |||
26 | #define K20x7 | ||
27 | |||
28 | /* Select the MCU clocking mode below by enabling the appropriate block. */ | ||
29 | |||
30 | #define KINETIS_NO_INIT FALSE | ||
31 | |||
32 | /* PEE mode - 48MHz system clock driven by external crystal. */ | ||
33 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE | ||
34 | #define KINETIS_PLLCLK_FREQUENCY 72000000UL | ||
35 | #define KINETIS_SYSCLK_FREQUENCY 72000000UL | ||
36 | #define KINETIS_BUSCLK_FREQUENCY 36000000UL | ||
37 | #define KINETIS_FLASHCLK_FREQUENCY 24000000UL | ||
38 | |||
39 | #if 0 | ||
40 | /* FEI mode - 48 MHz with internal 32.768 kHz crystal */ | ||
41 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI | ||
42 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | ||
43 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ | ||
44 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ | ||
45 | #define KINETIS_CLKDIV1_OUTDIV1 1 | ||
46 | #define KINETIS_CLKDIV1_OUTDIV2 1 | ||
47 | #define KINETIS_CLKDIV1_OUTDIV4 2 | ||
48 | #define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY | ||
49 | #define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 | ||
50 | #endif | ||
51 | |||
52 | /* | ||
53 | * SERIAL driver system settings. | ||
54 | */ | ||
55 | #define KINETIS_SERIAL_USE_UART0 TRUE | ||
56 | #define KINETIS_SERIAL_USE_UART1 TRUE | ||
57 | |||
58 | /* | ||
59 | * USB driver settings | ||
60 | */ | ||
61 | #define KINETIS_USB_USE_USB0 TRUE | ||
62 | /* Need to redefine this, since the default is for K20x */ | ||
63 | /* This is for Teensy LC; you should comment it out (or change to 5) | ||
64 | * for Teensy 3.x */ | ||
65 | #define KINETIS_USB_USB0_IRQ_PRIORITY 2 | ||
66 | |||
67 | /* | ||
68 | * SPI driver system settings. | ||
69 | */ | ||
70 | #define KINETIS_SPI_USE_SPI0 TRUE | ||
71 | |||
72 | #define KINETIS_I2C_USE_I2C0 TRUE | ||
73 | |||
74 | #endif /* _MCUCONF_H_ */ | ||