]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PeripheralNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KLXX / TARGET_KL46Z / 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 UART_1 = (int)UART1_BASE,
33 UART_2 = (int)UART2_BASE
34 } UARTName;
35 #define STDIO_UART_TX USBTX
36 #define STDIO_UART_RX USBRX
37 #define STDIO_UART UART_0
38
39 typedef enum {
40 I2C_0 = (int)I2C0_BASE,
41 I2C_1 = (int)I2C1_BASE,
42 } I2CName;
43
44 #define TPM_SHIFT 8
45 typedef enum {
46 PWM_1 = (0 << TPM_SHIFT) | (0), // TPM0 CH0
47 PWM_2 = (0 << TPM_SHIFT) | (1), // TPM0 CH1
48 PWM_3 = (0 << TPM_SHIFT) | (2), // TPM0 CH2
49 PWM_4 = (0 << TPM_SHIFT) | (3), // TPM0 CH3
50 PWM_5 = (0 << TPM_SHIFT) | (4), // TPM0 CH4
51 PWM_6 = (0 << TPM_SHIFT) | (5), // TPM0 CH5
52
53 PWM_7 = (1 << TPM_SHIFT) | (0), // TPM1 CH0
54 PWM_8 = (1 << TPM_SHIFT) | (1), // TPM1 CH1
55
56 PWM_9 = (2 << TPM_SHIFT) | (0), // TPM2 CH0
57 PWM_10 = (2 << TPM_SHIFT) | (1) // TPM2 CH1
58 } PWMName;
59
60 #define CHANNELS_A_SHIFT 5
61 typedef enum {
62 ADC0_SE0 = 0,
63 ADC0_SE3 = 3,
64 ADC0_SE4a = (1 << CHANNELS_A_SHIFT) | (4),
65 ADC0_SE4b = 4,
66 ADC0_SE5b = 5,
67 ADC0_SE6b = 6,
68 ADC0_SE7a = (1 << CHANNELS_A_SHIFT) | (7),
69 ADC0_SE7b = 7,
70 ADC0_SE8 = 8,
71 ADC0_SE9 = 9,
72 ADC0_SE11 = 11,
73 ADC0_SE12 = 12,
74 ADC0_SE13 = 13,
75 ADC0_SE14 = 14,
76 ADC0_SE15 = 15,
77 ADC0_SE23 = 23
78 } ADCName;
79
80 typedef enum {
81 DAC_0 = 0
82 } DACName;
83
84
85 typedef enum {
86 SPI_0 = (int)SPI0_BASE,
87 SPI_1 = (int)SPI1_BASE,
88 } SPIName;
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif
Imprint / Impressum