Skip to content

Commit 31b7eb1

Browse files
Jiwon Yuneadbridge
authored andcommitted
SDT32625B added
1 parent 480333f commit 31b7eb1

File tree

3 files changed

+277
-0
lines changed

3 files changed

+277
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*******************************************************************************
2+
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
18+
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* Except as contained in this notice, the name of Maxim Integrated
23+
* Products, Inc. shall not be used except as stated in the Maxim Integrated
24+
* Products, Inc. Branding Policy.
25+
*
26+
* The mere transfer of this software does not imply any licenses
27+
* of trade secrets, proprietary technology, copyrights, patents,
28+
* trademarks, maskwork rights, or any other form of intellectual
29+
* property whatsoever. Maxim Integrated Products, Inc. retains all
30+
* ownership rights.
31+
*******************************************************************************
32+
*/
33+
34+
#ifndef MBED_PERIPHERALNAMES_H
35+
#define MBED_PERIPHERALNAMES_H
36+
37+
#include "cmsis.h"
38+
39+
#ifdef __cplusplus
40+
extern "C" {
41+
#endif
42+
43+
typedef enum {
44+
UART_0 = MXC_BASE_UART0,
45+
UART_1 = MXC_BASE_UART1,
46+
UART_2 = MXC_BASE_UART2,
47+
STDIO_UART = UART_1
48+
} UARTName;
49+
50+
typedef enum {
51+
I2C_0 = MXC_BASE_I2CM0,
52+
I2C_1 = MXC_BASE_I2CM1
53+
} I2CName;
54+
55+
typedef enum {
56+
SPI_0 = MXC_BASE_SPIM0,
57+
SPI_1 = MXC_BASE_SPIM1,
58+
SPI_2 = MXC_BASE_SPIM2
59+
} SPIName;
60+
61+
typedef enum {
62+
PWM_0 = MXC_BASE_PT0,
63+
PWM_1 = MXC_BASE_PT1,
64+
PWM_2 = MXC_BASE_PT2,
65+
PWM_3 = MXC_BASE_PT3,
66+
PWM_4 = MXC_BASE_PT4,
67+
PWM_5 = MXC_BASE_PT5,
68+
PWM_6 = MXC_BASE_PT6,
69+
PWM_7 = MXC_BASE_PT7,
70+
PWM_8 = MXC_BASE_PT8,
71+
PWM_9 = MXC_BASE_PT9,
72+
PWM_10 = MXC_BASE_PT10,
73+
PWM_11 = MXC_BASE_PT11,
74+
PWM_12 = MXC_BASE_PT12,
75+
PWM_13 = MXC_BASE_PT13,
76+
PWM_14 = MXC_BASE_PT14,
77+
PWM_15 = MXC_BASE_PT15
78+
} PWMName;
79+
80+
typedef enum {
81+
ADC = MXC_BASE_ADC
82+
} ADCName;
83+
84+
#ifdef __cplusplus
85+
}
86+
#endif
87+
88+
#endif
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/*******************************************************************************
2+
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
18+
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* Except as contained in this notice, the name of Maxim Integrated
23+
* Products, Inc. shall not be used except as stated in the Maxim Integrated
24+
* Products, Inc. Branding Policy.
25+
*
26+
* The mere transfer of this software does not imply any licenses
27+
* of trade secrets, proprietary technology, copyrights, patents,
28+
* trademarks, maskwork rights, or any other form of intellectual
29+
* property whatsoever. Maxim Integrated Products, Inc. retains all
30+
* ownership rights.
31+
*******************************************************************************
32+
*/
33+
34+
#ifndef MBED_PINNAMES_H
35+
#define MBED_PINNAMES_H
36+
37+
#include "cmsis.h"
38+
#include "gpio_regs.h"
39+
40+
#ifdef __cplusplus
41+
extern "C" {
42+
#endif
43+
44+
typedef enum {
45+
PIN_INPUT = 0, /* MXC_V_GPIO_OUT_MODE_HIGH_Z,*/
46+
PIN_OUTPUT = 1 /* MXC_V_GPIO_OUT_MODE_NORMAL_DRIVE */
47+
} PinDirection;
48+
49+
#define PORT_SHIFT 12
50+
#define PINNAME_TO_PORT(name) ((unsigned int)(name) >> PORT_SHIFT)
51+
#define PINNAME_TO_PIN(name) ((unsigned int)(name) & ~(0xFFFFFFFF << PORT_SHIFT))
52+
53+
#define NOT_CONNECTED (int)0xFFFFFFFF
54+
55+
typedef enum {
56+
P0_0 = (0 << PORT_SHIFT), P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7,
57+
P1_0 = (1 << PORT_SHIFT), P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7,
58+
P2_0 = (2 << PORT_SHIFT), P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7,
59+
P3_0 = (3 << PORT_SHIFT), P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7,
60+
P4_0 = (4 << PORT_SHIFT), P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7,
61+
62+
// Analog input pins
63+
AIN_0 = (0xA << PORT_SHIFT), AIN_1, AIN_2, AIN_3, AIN_4, AIN_5, AIN_6, AIN_7, AIN_8, AIN_9,
64+
65+
// Analog
66+
A0 = AIN_0,
67+
A1 = AIN_1,
68+
A2 = AIN_2,
69+
A3 = AIN_3,
70+
71+
// General Pin Input Output (GPIO)
72+
GPIO0 = P1_4,
73+
GPIO1 = P1_5,
74+
GPIO2 = P4_0,
75+
GPIO3 = P4_1,
76+
GPIO4 = P4_2,
77+
GPIO5 = P4_3,
78+
GPIO6 = NOT_CONNECTED,
79+
80+
//Purse Width Modulation (PWM)
81+
PWM0 = GPIO2,
82+
PWM1 = GPIO3,
83+
PWM2 = GPIO0,
84+
PWM3 = GPIO1,
85+
86+
// LEDs
87+
LED0 = GPIO0,
88+
LED1 = GPIO1,
89+
LED2 = GPIO2,
90+
LED3 = NOT_CONNECTED,
91+
LED4 = NOT_CONNECTED,
92+
93+
LED_RED = LED0,
94+
LED_GREEN = LED1,
95+
LED_BLUE = LED2,
96+
97+
// USB bridge and SWD UART connected UART pins
98+
USBTX = P2_1,
99+
USBRX = P2_0,
100+
STDIO_UART_TX = USBTX,
101+
STDIO_UART_RX = USBRX,
102+
103+
// UART pins
104+
UART0_RX = P0_0,
105+
UART0_TX = P0_1,
106+
UART0_CTS = P0_2,
107+
UART0_RTS = P0_3,
108+
109+
UART1_RX = P2_0,
110+
UART1_TX = P2_1,
111+
UART1_CTS = P2_2,
112+
UART1_RTS = P2_3,
113+
114+
UART2_RX = P3_0,
115+
UART2_TX = P3_1,
116+
UART2_CTS = P3_2,
117+
UART2_RTS = P3_3,
118+
119+
// I2C pins
120+
I2C0_SCL = P1_7,
121+
I2C0_SDA = P1_6,
122+
123+
I2C1_SCL = P3_5,
124+
I2C1_SDA = P3_4,
125+
126+
I2C2_SCL = NOT_CONNECTED,
127+
I2C2_SDA = NOT_CONNECTED,
128+
129+
// SPI pins
130+
SPI0_SCK = P0_4,
131+
SPI0_MOSI = P0_5,
132+
SPI0_MISO = P0_6,
133+
SPI0_SS0 = P0_7,
134+
SPI0_SS1 = P4_4,
135+
SPI0_SS2 = P4_5,
136+
137+
SPI1_SCK = P1_0,
138+
SPI1_MOSI = P1_1,
139+
SPI1_MISO = P1_2,
140+
SPI1_SS0 = P1_3,
141+
SPI1_SS1 = P3_6,
142+
SPI1_SS2 = P3_7,
143+
144+
SPI2_SCK = P2_4,
145+
SPI2_MOSI = P2_5,
146+
SPI2_MISO = P2_6,
147+
SPI2_SS0 = P2_7,
148+
SPI2_SS1 = P4_6,
149+
SPI2_SS2 = P4_7,
150+
151+
SPI3_SCK = NOT_CONNECTED,
152+
SPI3_MOSI = NOT_CONNECTED,
153+
SPI3_MISO = NOT_CONNECTED,
154+
SPI3_SS0 = NOT_CONNECTED,
155+
SPI3_SS1 = NOT_CONNECTED,
156+
SPI3_SS2 = NOT_CONNECTED,
157+
158+
// SWD UART
159+
SWD_TGT_TX = UART1_TX,
160+
SWD_TGT_RX = UART1_RX,
161+
SWD_TGT_CTS = UART1_CTS,
162+
SWD_TGT_RTS = UART1_RTS,
163+
164+
// Not connected
165+
NC = NOT_CONNECTED
166+
} PinName;
167+
168+
typedef enum {
169+
PullUp,
170+
PullDown,
171+
OpenDrain,
172+
PullNone,
173+
PullDefault = PullUp
174+
} PinMode;
175+
176+
typedef enum {
177+
LED_ON = 0,
178+
LED_OFF = 1
179+
} LedStates;
180+
181+
#ifdef __cplusplus
182+
}
183+
#endif
184+
185+
#endif

targets/targets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,6 +3098,10 @@
30983098
"MAX32625MBED": {
30993099
"inherits": ["MAX32625_NO_BOOT"]
31003100
},
3101+
"SDT32625B": {
3102+
"detect_code": ["3102"],
3103+
"inherits": ["MAX32625_NO_BOOT"]
3104+
},
31013105
"MAX32625PICO": {
31023106
"inherits": ["MAX32625_BOOT"],
31033107
"extra_labels_add": ["MAX32625PICO_BASE"]

0 commit comments

Comments
 (0)