]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/TARGET_K20D50M/PeripheralNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_K20XX / TARGET_K20D50M / PeripheralNames.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2015 ARM Limited
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 #ifndef MBED_PERIPHERALNAMES_H
17 #define MBED_PERIPHERALNAMES_H
18
19 #include "cmsis.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef enum {
26     UART_0 = (int)UART0_BASE,
27     UART_1 = (int)UART1_BASE,
28     UART_2 = (int)UART2_BASE
29 } UARTName;
30 #define STDIO_UART_TX     USBTX
31 #define STDIO_UART_RX     USBRX
32 #define STDIO_UART        UART_0
33
34 typedef enum {
35     I2C_0 = (int)I2C0_BASE,
36 } I2CName;
37
38 #define TPM_SHIFT   8
39 typedef enum {
40     PWM_1  = (0 << TPM_SHIFT) | (0),  // FTM0 CH0
41     PWM_2  = (0 << TPM_SHIFT) | (1),  // FTM0 CH1
42     PWM_3  = (0 << TPM_SHIFT) | (2),  // FTM0 CH2
43     PWM_4  = (0 << TPM_SHIFT) | (3),  // FTM0 CH3
44     PWM_5  = (0 << TPM_SHIFT) | (4),  // FTM0 CH4
45     PWM_6  = (0 << TPM_SHIFT) | (5),  // FTM0 CH5
46     PWM_7  = (0 << TPM_SHIFT) | (6),  // FTM0 CH6
47     PWM_8  = (0 << TPM_SHIFT) | (7),  // FTM0 CH7
48     PWM_9  = (1 << TPM_SHIFT) | (0),  // FTM1 CH0
49     PWM_10 = (1 << TPM_SHIFT) | (1),  // FTM1 CH1
50 } PWMName;
51
52 typedef enum {
53     ADC0_SE4b =  4,
54     ADC0_SE5b =  5,
55     ADC0_SE6b =  6,
56     ADC0_SE7b =  7,
57     ADC0_SE8  =  8,
58     ADC0_SE9  =  9,
59     ADC0_SE12 = 12,
60     ADC0_SE13 = 13,
61     ADC0_SE14 = 14,
62     ADC0_SE15 = 15
63 } ADCName;
64
65 typedef enum {
66     SPI_0 = (int)SPI0_BASE,
67 } SPIName;
68
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif