File tree Expand file tree Collapse file tree 4 files changed +33
-159
lines changed
libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT Expand file tree Collapse file tree 4 files changed +33
-159
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,9 @@ typedef enum {
28
28
29
29
typedef enum {
30
30
UART_0 = 0 ,
31
- UART_1 = 1 ,
32
31
UART_2 = 2 ,
33
32
UART_3 = 3 ,
34
- UART_4 = 4 ,
33
+ UART_5 = 5 ,
35
34
} UARTName ;
36
35
37
36
#define STDIO_UART_TX USBTX
@@ -41,9 +40,9 @@ typedef enum {
41
40
typedef enum {
42
41
I2C_0 = 0 ,
43
42
I2C_1 = 1 ,
44
- I2C_2 = 2 ,
45
43
} I2CName ;
46
44
45
+
47
46
#define TPM_SHIFT 8
48
47
typedef enum {
49
48
PWM_1 = (0 << TPM_SHIFT ) | (0 ), // FTM0 CH0
@@ -82,6 +81,8 @@ typedef enum {
82
81
PWM_32 = (3 << TPM_SHIFT ) | (7 ), // FTM3 CH7
83
82
} PWMName ;
84
83
84
+
85
+
85
86
#define ADC_INSTANCE_SHIFT 8
86
87
#define ADC_B_CHANNEL_SHIFT 5
87
88
typedef enum {
@@ -113,6 +114,8 @@ typedef enum {
113
114
ADC1_SE18 = (1 << ADC_INSTANCE_SHIFT ) | 18 ,
114
115
} ADCName ;
115
116
117
+
118
+
116
119
typedef enum {
117
120
DAC_0 = 0
118
121
} DACName ;
@@ -121,7 +124,6 @@ typedef enum {
121
124
typedef enum {
122
125
SPI_0 = 0 ,
123
126
SPI_1 = 1 ,
124
- SPI_2 = 2 ,
125
127
} SPIName ;
126
128
127
129
#ifdef __cplusplus
Original file line number Diff line number Diff line change @@ -21,182 +21,58 @@ const PinMap PinMap_RTC[] = {
21
21
{NC , OSC32KCLK , 0 },
22
22
};
23
23
24
- /************ADC***************/
25
- const PinMap PinMap_ADC [] = {
26
- {PTC2 , ADC0_SE4b , 0 },
27
- {PTC8 , ADC1_SE4b , 0 },
28
- {PTC9 , ADC1_SE5b , 0 },
29
- {PTD1 , ADC0_SE5b , 0 },
30
- {PTC10 , ADC1_SE6b , 0 },
31
- {PTD5 , ADC0_SE6b , 0 },
32
- {PTC11 , ADC1_SE7b , 0 },
33
- {PTD6 , ADC0_SE7b , 0 },
34
- {PTB0 , ADC0_SE8 , 0 },
35
- {PTB1 , ADC0_SE9 , 0 },
36
- {PTB2 , ADC0_SE12 , 0 },
37
- {PTB3 , ADC0_SE13 , 0 },
38
- {PTC0 , ADC0_SE14 , 0 },
39
- {PTB10 , ADC1_SE14 , 0 },
40
- {PTB11 , ADC1_SE15 , 0 },
41
- {PTC1 , ADC0_SE15 , 0 },
42
- {PTA17 , ADC1_SE17 , 0 },
43
- //{PTE24, ADC0_SE17, 0}, //I2C pull up
44
- //{PTE25, ADC0_SE18, 0}, //I2C pull up
45
- {NC , NC , 0 }
46
- };
47
-
48
- /************DAC***************/
49
- const PinMap PinMap_DAC [] = {
50
- {DAC0_OUT , DAC_0 , 0 },
51
- {NC , NC , 0 }
52
- };
53
-
54
24
/************I2C***************/
55
25
const PinMap PinMap_I2C_SDA [] = {
56
- {PTE25 , I2C_0 , 5 },
57
- {PTB1 , I2C_0 , 2 },
58
- {PTB3 , I2C_0 , 2 },
59
26
{PTC11 , I2C_1 , 2 },
60
- {PTA13 , I2C_2 , 5 },
61
- {PTD3 , I2C_0 , 7 },
62
- {PTE0 , I2C_1 , 6 },
27
+ {PTB3 , I2C_0 , 7 },
63
28
{NC , NC , 0 }
64
29
};
65
30
66
31
const PinMap PinMap_I2C_SCL [] = {
67
- {PTE24 , I2C_0 , 5 },
68
- {PTB0 , I2C_0 , 2 },
69
32
{PTB2 , I2C_0 , 2 },
70
33
{PTC10 , I2C_1 , 2 },
71
- {PTA12 , I2C_2 , 5 },
72
- {PTA14 , I2C_2 , 5 },
73
- {PTD2 , I2C_0 , 7 },
74
- {PTE1 , I2C_1 , 6 },
75
34
{NC , NC , 0 }
76
35
};
77
36
78
37
/************UART***************/
79
38
const PinMap PinMap_UART_TX [] = {
80
39
{PTB17 , UART_0 , 3 },
81
- {PTC17 , UART_3 , 3 },
82
- {PTD7 , UART_0 , 3 },
83
40
{PTD3 , UART_2 , 3 },
84
- {PTC4 , UART_1 , 3 },
85
- {PTC15 , UART_4 , 3 },
86
41
{PTB11 , UART_3 , 3 },
87
- {PTA14 , UART_0 , 3 },
88
- {PTE24 , UART_4 , 3 },
89
- {PTE4 , UART_3 , 3 },
90
- {PTE0 , UART_1 , 3 },
91
- {NC , NC , 0 }
42
+ {PTE8 , UART_5 , 0 },
43
+ {NC , NC , 0 }
92
44
};
93
45
94
46
const PinMap PinMap_UART_RX [] = {
95
47
{PTB16 , UART_0 , 3 },
96
- {PTE1 , UART_1 , 3 },
97
- {PTE5 , UART_3 , 3 },
98
- {PTE25 , UART_4 , 3 },
99
- {PTA15 , UART_0 , 3 },
100
- {PTC16 , UART_3 , 3 },
101
48
{PTB10 , UART_3 , 3 },
102
- {PTC3 , UART_1 , 3 },
103
- {PTC14 , UART_4 , 3 },
104
- {PTD2 , UART_2 , 3 },
105
- {PTC6 , UART_0 , 3 },
106
- {NC , NC , 0 }
49
+ {PTD2 , UART_2 , 3 },
50
+ {PTE9 , UART_5 , 0 },
51
+ {NC , NC , 0 }
107
52
};
108
53
109
54
/************SPI***************/
110
55
const PinMap PinMap_SPI_SCLK [] = {
111
- {PTD1 , SPI_0 , 2 },
112
56
{PTE2 , SPI_1 , 2 },
113
- {PTA15 , SPI_0 , 2 },
114
- {PTB11 , SPI_1 , 2 },
115
- {PTB21 , SPI_2 , 2 },
116
57
{PTC5 , SPI_0 , 2 },
117
- {PTD5 , SPI_1 , 7 },
118
58
{NC , NC , 0 }
119
59
};
120
60
121
61
const PinMap PinMap_SPI_MOSI [] = {
122
- {PTD2 , SPI_0 , 2 },
123
- {PTE1 , SPI_1 , 2 },
124
62
{PTE3 , SPI_1 , 7 },
125
- {PTA16 , SPI_0 , 2 },
126
- {PTB16 , SPI_1 , 2 },
127
- {PTB22 , SPI_2 , 2 },
128
63
{PTC6 , SPI_0 , 2 },
129
- {PTD6 , SPI_1 , 7 },
130
64
{NC , NC , 0 }
131
65
};
132
66
133
67
const PinMap PinMap_SPI_MISO [] = {
134
- {PTD3 , SPI_0 , 2 },
135
68
{PTE1 , SPI_1 , 7 },
136
- {PTE3 , SPI_1 , 2 },
137
- {PTA17 , SPI_0 , 2 },
138
- {PTB17 , SPI_1 , 2 },
139
- {PTB23 , SPI_2 , 2 },
140
69
{PTC7 , SPI_0 , 2 },
141
- {PTD7 , SPI_1 , 7 },
142
70
{NC , NC , 0 }
143
71
};
144
72
145
73
const PinMap PinMap_SPI_SSEL [] = {
146
- {PTD0 , SPI_0 , 2 },
147
74
{PTE4 , SPI_1 , 2 },
148
- {PTA14 , SPI_0 , 2 },
149
- {PTB10 , SPI_1 , 2 },
150
- {PTB20 , SPI_2 , 2 },
151
75
{PTC4 , SPI_0 , 2 },
152
- {PTD4 , SPI_1 , 7 },
153
76
{NC , NC , 0 }
154
77
};
155
78
156
- /************PWM***************/
157
- const PinMap PinMap_PWM [] = {
158
- {PTA0 , PWM_6 , 3 },
159
- {PTA1 , PWM_7 , 3 },
160
- {PTA2 , PWM_8 , 3 },
161
- {PTA3 , PWM_1 , 3 },
162
- {PTA4 , PWM_2 , 3 },
163
- {PTA5 , PWM_3 , 3 },
164
- {PTA6 , PWM_4 , 3 },
165
- {PTA7 , PWM_5 , 3 },
166
- {PTA8 , PWM_9 , 3 },
167
- {PTA9 , PWM_10 , 3 },
168
- {PTA10 , PWM_17 , 3 },
169
- {PTA11 , PWM_18 , 3 },
170
- {PTA12 , PWM_9 , 3 },
171
- {PTA13 , PWM_10 , 3 },
172
-
173
- {PTB0 , PWM_9 , 3 },
174
- {PTB1 , PWM_10 , 3 },
175
- {PTB18 , PWM_17 , 3 },
176
- {PTB19 , PWM_18 , 3 },
177
-
178
- {PTC1 , PWM_1 , 4 },
179
- {PTC2 , PWM_2 , 4 },
180
- {PTC3 , PWM_3 , 4 },
181
- {PTC4 , PWM_4 , 4 },
182
- {PTC5 , PWM_3 , 7 },
183
- {PTC8 , PWM_29 , 3 },
184
- {PTC9 , PWM_30 , 3 },
185
- {PTC10 , PWM_31 , 3 },
186
- {PTC11 , PWM_32 , 3 },
187
-
188
- {PTD0 , PWM_25 , 4 },
189
- {PTD1 , PWM_26 , 4 },
190
- {PTD2 , PWM_27 , 4 },
191
- {PTD3 , PWM_28 , 4 },
192
- {PTD4 , PWM_5 , 4 },
193
- {PTD5 , PWM_6 , 4 },
194
- {PTD6 , PWM_7 , 4 },
195
- {PTD4 , PWM_5 , 4 },
196
- {PTD7 , PWM_8 , 4 },
197
-
198
- {PTE5 , PWM_25 , 6 },
199
- {PTE6 , PWM_26 , 6 },
200
-
201
- {NC , NC , 0 }
202
- };
Original file line number Diff line number Diff line change @@ -191,21 +191,17 @@ typedef enum {
191
191
PTE30 = (4 << GPIO_PORT_SHIFT | 30 ),
192
192
PTE31 = (4 << GPIO_PORT_SHIFT | 31 ),
193
193
194
- // #TODO all friendly names per platform
195
194
// led color naming
196
- LED_RED = PTA0 ,
197
- LED_GREEN = PTA1 ,
198
- LED_BLUE = PTA2 ,
195
+ LED_GREEN = PTC0 ,
196
+
199
197
// mbed original LED naming
200
- LED1 = LED_RED ,
201
- LED2 = LED_GREEN ,
202
- LED3 = LED_BLUE ,
203
- LED4 = LED_RED ,
198
+ LED1 = PTD15 ,
199
+ LED2 = PTD14 ,
200
+ LED3 = PTD13 ,
201
+ LED4 = PTD11 ,
202
+ LED5 = PTD12 ,
203
+ STATUS = LED_GREEN ,
204
204
205
- //Push buttons
206
- //SW2 = PTC6,
207
- //SW3 = PTA4,
208
-
209
205
// USB Pins
210
206
USBTX = PTB17 ,
211
207
USBRX = PTB16 ,
Original file line number Diff line number Diff line change 16
16
#ifndef MBED_DEVICE_H
17
17
#define MBED_DEVICE_H
18
18
19
- #define DEVICE_PORTIN 0
20
- #define DEVICE_PORTOUT 0
21
- #define DEVICE_PORTINOUT 0
19
+ #define DEVICE_PORTIN 1
20
+ #define DEVICE_PORTOUT 1
21
+ #define DEVICE_PORTINOUT 1
22
22
23
- #define DEVICE_INTERRUPTIN 0
23
+ #define DEVICE_INTERRUPTIN 1
24
24
25
25
#define DEVICE_ANALOGIN 0
26
26
#define DEVICE_ANALOGOUT 0
27
27
28
- #define DEVICE_SERIAL 0
28
+ #define DEVICE_SERIAL 1
29
29
30
- #define DEVICE_I2C 0
31
- #define DEVICE_I2CSLAVE 0
30
+ #define DEVICE_I2C 1
31
+ #define DEVICE_I2CSLAVE 1
32
32
33
- #define DEVICE_SPI 0
34
- #define DEVICE_SPISLAVE 0
33
+ #define DEVICE_SPI 1
34
+ #define DEVICE_SPISLAVE 1
35
35
36
36
#define DEVICE_CAN 0
37
37
38
- #define DEVICE_RTC 0
38
+ #define DEVICE_RTC 1
39
39
40
- #define DEVICE_ETHERNET 0
40
+ #define DEVICE_ETHERNET 1
41
41
42
42
#define DEVICE_PWMOUT 0
43
43
44
44
#define DEVICE_SEMIHOST 0
45
45
#define DEVICE_LOCALFILESYSTEM 0
46
46
#define DEVICE_ID_LENGTH 24
47
47
48
- #define DEVICE_SLEEP 0
48
+ #define DEVICE_SLEEP 1
49
49
50
50
#define DEVICE_DEBUG_AWARENESS 0
51
51
52
- #define DEVICE_STDIO_MESSAGES 0
52
+ #define DEVICE_STDIO_MESSAGES 1
53
53
54
54
#define DEVICE_ERROR_RED 0
55
55
You can’t perform that action at this time.
0 commit comments