]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PeripheralNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KLXX / TARGET_KL05Z / PeripheralNames.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2013 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     OSC32KCLK = 0,
27     RTC_CLKIN = 2
28 } RTCName;
29
30 typedef enum {
31     UART_0 = (int)UART0_BASE
32 } UARTName;
33
34 #define STDIO_UART_TX     USBTX
35 #define STDIO_UART_RX     USBRX
36 #define STDIO_UART        UART_0
37
38 typedef enum {
39     I2C_0 = (int)I2C0_BASE,
40     I2C_1 = -1
41 } I2CName;
42
43 typedef enum {
44     ADC0_SE0  =  0,
45     ADC0_SE1  =  1,
46     ADC0_SE2  =  2,
47     ADC0_SE3  =  3,
48     ADC0_SE4  =  4,
49     ADC0_SE5  =  5,
50     ADC0_SE6  =  6,
51     ADC0_SE7  =  7,
52     ADC0_SE8  =  8,
53     ADC0_SE9  =  9,
54     ADC0_SE10 =  10,
55     ADC0_SE11 =  11,
56     ADC0_SE12 =  12,
57     ADC0_SE13 =  13
58 } ADCName;
59
60 typedef enum {
61     DAC_0 = 0
62 } DACName;
63
64 typedef enum {
65     SPI_0 = (int)SPI0_BASE
66 } SPIName;
67
68 #define TPM_SHIFT   8
69 typedef enum {
70     PWM_1  = (0 << TPM_SHIFT) | (0),  // TPM0 CH0
71     PWM_2  = (0 << TPM_SHIFT) | (1),  // TPM0 CH1
72     PWM_3  = (0 << TPM_SHIFT) | (2),  // TPM0 CH2
73     PWM_4  = (0 << TPM_SHIFT) | (3),  // TPM0 CH3
74     PWM_5  = (0 << TPM_SHIFT) | (4),  // TPM0 CH4
75     PWM_6  = (0 << TPM_SHIFT) | (5),  // TPM0 CH5
76
77     PWM_7  = (1 << TPM_SHIFT) | (0),  // TPM1 CH0
78     PWM_8  = (1 << TPM_SHIFT) | (1),  // TPM1 CH1
79 } PWMName;
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif