]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/TARGET_TEENSY3_1/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_TEENSY3_1 / 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     I2C_1 = (int)I2C1_BASE, 
37 } I2CName;
38
39 #define TPM_SHIFT   8
40 typedef enum {
41     PWM_1  = (0 << TPM_SHIFT) | (0),  // FTM0 CH0
42     PWM_2  = (0 << TPM_SHIFT) | (1),  // FTM0 CH1
43     PWM_3  = (0 << TPM_SHIFT) | (2),  // FTM0 CH2
44     PWM_4  = (0 << TPM_SHIFT) | (3),  // FTM0 CH3
45     PWM_5  = (0 << TPM_SHIFT) | (4),  // FTM0 CH4
46     PWM_6  = (0 << TPM_SHIFT) | (5),  // FTM0 CH5
47     PWM_7  = (0 << TPM_SHIFT) | (6),  // FTM0 CH6
48     PWM_8  = (0 << TPM_SHIFT) | (7),  // FTM0 CH7
49     PWM_9  = (1 << TPM_SHIFT) | (0),  // FTM1 CH0
50     PWM_10 = (1 << TPM_SHIFT) | (1),  // FTM1 CH1
51 } PWMName;
52
53 typedef enum {
54     ADC0_SE4b =  4,
55     ADC0_SE5b =  5,
56     ADC0_SE6b =  6,
57     ADC0_SE7b =  7,
58     ADC0_SE8  =  8,
59     ADC0_SE9  =  9,
60     ADC0_SE12 = 12,
61     ADC0_SE13 = 13,
62     ADC0_SE14 = 14,
63     ADC0_SE15 = 15,    
64     ADC1_SE4b = 16, 
65     ADC1_SE5b = 17,
66     ADC1_SE6b = 18,
67     ADC1_SE7b = 19,   
68 } ADCName;
69
70 typedef enum {
71     DAC_0 = 0
72 } DACName;
73
74 typedef enum {
75     SPI_0 = (int)SPI0_BASE,
76     SPI_1 = (int)SPI0_BASE,
77     SPI_2 = (int)SPI0_BASE,
78     SPI_3 = (int)SPI0_BASE,
79     SPI_4 = (int)SPI0_BASE,
80 } SPIName;
81
82 #ifdef __cplusplus
83 }
84 #endif
85
86 #endif