Skip to content

Commit 62e34ec

Browse files
committed
Add SPDX identifier
1 parent 5a15f81 commit 62e34ec

27 files changed

+5130
-5053
lines changed
Lines changed: 74 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,74 @@
1-
/* mbed Microcontroller Library
2-
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
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-
17-
#ifndef MBED_PERIPHERALPINS_H
18-
#define MBED_PERIPHERALPINS_H
19-
20-
#include "pinmap.h"
21-
#include "PeripheralNames.h"
22-
23-
extern const int GD_GPIO_REMAP[];
24-
extern const int GD_GPIO_MODE[];
25-
extern const int GD_GPIO_SPEED[];
26-
27-
/* ADC */
28-
#ifdef DEVICE_ANALOGIN
29-
extern const PinMap PinMap_ADC[];
30-
#endif
31-
32-
/* DAC */
33-
#ifdef DEVICE_ANALOGOUT
34-
extern const PinMap PinMap_DAC[];
35-
#endif
36-
37-
/* I2C */
38-
#if DEVICE_I2C
39-
extern const PinMap PinMap_I2C_SDA[];
40-
extern const PinMap PinMap_I2C_SCL[];
41-
#endif
42-
43-
/* PWM */
44-
#if DEVICE_PWMOUT
45-
extern const PinMap PinMap_PWM[];
46-
#endif
47-
48-
/* SERIAL */
49-
#ifdef DEVICE_SERIAL
50-
extern const PinMap PinMap_UART_TX[];
51-
extern const PinMap PinMap_UART_RX[];
52-
#ifdef DEVICE_SERIAL_FC
53-
extern const PinMap PinMap_UART_RTS[];
54-
extern const PinMap PinMap_UART_CTS[];
55-
#endif
56-
#endif
57-
58-
/* SPI */
59-
#ifdef DEVICE_SPI
60-
extern const PinMap PinMap_SPI_MOSI[];
61-
extern const PinMap PinMap_SPI_MISO[];
62-
extern const PinMap PinMap_SPI_SCLK[];
63-
extern const PinMap PinMap_SPI_SSEL[];
64-
#endif
65-
66-
/* CAN */
67-
#ifdef DEVICE_CAN
68-
extern const PinMap PinMap_CAN_RD[];
69-
extern const PinMap PinMap_CAN_TD[];
70-
#endif
71-
72-
#endif
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#ifndef MBED_PERIPHERALPINS_H
20+
#define MBED_PERIPHERALPINS_H
21+
22+
#include "pinmap.h"
23+
#include "PeripheralNames.h"
24+
25+
extern const int GD_GPIO_REMAP[];
26+
extern const int GD_GPIO_MODE[];
27+
extern const int GD_GPIO_SPEED[];
28+
29+
/* ADC */
30+
#ifdef DEVICE_ANALOGIN
31+
extern const PinMap PinMap_ADC[];
32+
#endif
33+
34+
/* DAC */
35+
#ifdef DEVICE_ANALOGOUT
36+
extern const PinMap PinMap_DAC[];
37+
#endif
38+
39+
/* I2C */
40+
#if DEVICE_I2C
41+
extern const PinMap PinMap_I2C_SDA[];
42+
extern const PinMap PinMap_I2C_SCL[];
43+
#endif
44+
45+
/* PWM */
46+
#if DEVICE_PWMOUT
47+
extern const PinMap PinMap_PWM[];
48+
#endif
49+
50+
/* SERIAL */
51+
#ifdef DEVICE_SERIAL
52+
extern const PinMap PinMap_UART_TX[];
53+
extern const PinMap PinMap_UART_RX[];
54+
#ifdef DEVICE_SERIAL_FC
55+
extern const PinMap PinMap_UART_RTS[];
56+
extern const PinMap PinMap_UART_CTS[];
57+
#endif
58+
#endif
59+
60+
/* SPI */
61+
#ifdef DEVICE_SPI
62+
extern const PinMap PinMap_SPI_MOSI[];
63+
extern const PinMap PinMap_SPI_MISO[];
64+
extern const PinMap PinMap_SPI_SCLK[];
65+
extern const PinMap PinMap_SPI_SSEL[];
66+
#endif
67+
68+
/* CAN */
69+
#ifdef DEVICE_CAN
70+
extern const PinMap PinMap_CAN_RD[];
71+
extern const PinMap PinMap_CAN_TD[];
72+
#endif
73+
74+
#endif
Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
1-
/* mbed Microcontroller Library
2-
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
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_PORTNAMES_H
17-
#define MBED_PORTNAMES_H
18-
19-
#ifdef __cplusplus
20-
extern "C" {
21-
#endif
22-
23-
typedef enum {
24-
PORTA = 0,
25-
PORTB = 1,
26-
PORTC = 2,
27-
PORTD = 3,
28-
PORTE = 4,
29-
} PortName;
30-
31-
#ifdef __cplusplus
32-
}
33-
#endif
34-
#endif
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
#ifndef MBED_PORTNAMES_H
19+
#define MBED_PORTNAMES_H
20+
21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
25+
typedef enum {
26+
PORTA = 0,
27+
PORTB = 1,
28+
PORTC = 2,
29+
PORTD = 3,
30+
PORTE = 4,
31+
} PortName;
32+
33+
#ifdef __cplusplus
34+
}
35+
#endif
36+
#endif
Lines changed: 85 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,85 @@
1-
/* mbed Microcontroller Library
2-
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
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-
17-
#ifndef MBED_PERIPHERALNAMES_H
18-
#define MBED_PERIPHERALNAMES_H
19-
20-
#include "cmsis.h"
21-
22-
#ifdef __cplusplus
23-
extern "C" {
24-
#endif
25-
26-
typedef enum {
27-
ADC_0 = (int)ADC0,
28-
ADC_1 = (int)ADC1
29-
} ADCName;
30-
31-
typedef enum {
32-
DAC_0 = (int)DAC0,
33-
DAC_1 = (int)DAC1,
34-
} DACName;
35-
36-
typedef enum {
37-
UART_0 = (int)USART0,
38-
UART_1 = (int)USART1,
39-
UART_2 = (int)USART2,
40-
UART_3 = (int)UART3,
41-
UART_4 = (int)UART4
42-
} UARTName;
43-
44-
#define STDIO_UART_TX PORTA_9
45-
#define STDIO_UART_RX PORTA_10
46-
#define STDIO_UART UART_0
47-
48-
typedef enum {
49-
SPI_0 = (int)SPI0,
50-
SPI_1 = (int)SPI1,
51-
SPI_2 = (int)SPI2
52-
} SPIName;
53-
54-
typedef enum {
55-
I2C_0 = (int)I2C0,
56-
I2C_1 = (int)I2C1
57-
} I2CName;
58-
59-
typedef enum {
60-
PWM_0 = (int)TIMER0,
61-
PWM_1 = (int)TIMER1,
62-
PWM_2 = (int)TIMER2,
63-
PWM_3 = (int)TIMER3,
64-
PWM_4 = (int)TIMER4,
65-
PWM_5 = (int)TIMER7,
66-
PWM_6 = (int)TIMER8,
67-
PWM_7 = (int)TIMER9,
68-
PWM_8 = (int)TIMER10,
69-
PWM_9 = (int)TIMER11,
70-
PWM_10 = (int)TIMER12,
71-
PWM_11 = (int)TIMER13
72-
} PWMName;
73-
74-
typedef enum {
75-
CAN_0 = (int)CAN0,
76-
CAN_1 = (int)CAN1
77-
} CANName;
78-
79-
#ifdef __cplusplus
80-
}
81-
#endif
82-
83-
#endif
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#ifndef MBED_PERIPHERALNAMES_H
20+
#define MBED_PERIPHERALNAMES_H
21+
22+
#include "cmsis.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
typedef enum {
29+
ADC_0 = (int)ADC0,
30+
ADC_1 = (int)ADC1
31+
} ADCName;
32+
33+
typedef enum {
34+
DAC_0 = (int)DAC0,
35+
DAC_1 = (int)DAC1,
36+
} DACName;
37+
38+
typedef enum {
39+
UART_0 = (int)USART0,
40+
UART_1 = (int)USART1,
41+
UART_2 = (int)USART2,
42+
UART_3 = (int)UART3,
43+
UART_4 = (int)UART4
44+
} UARTName;
45+
46+
#define STDIO_UART_TX PORTA_9
47+
#define STDIO_UART_RX PORTA_10
48+
#define STDIO_UART UART_0
49+
50+
typedef enum {
51+
SPI_0 = (int)SPI0,
52+
SPI_1 = (int)SPI1,
53+
SPI_2 = (int)SPI2
54+
} SPIName;
55+
56+
typedef enum {
57+
I2C_0 = (int)I2C0,
58+
I2C_1 = (int)I2C1
59+
} I2CName;
60+
61+
typedef enum {
62+
PWM_0 = (int)TIMER0,
63+
PWM_1 = (int)TIMER1,
64+
PWM_2 = (int)TIMER2,
65+
PWM_3 = (int)TIMER3,
66+
PWM_4 = (int)TIMER4,
67+
PWM_5 = (int)TIMER7,
68+
PWM_6 = (int)TIMER8,
69+
PWM_7 = (int)TIMER9,
70+
PWM_8 = (int)TIMER10,
71+
PWM_9 = (int)TIMER11,
72+
PWM_10 = (int)TIMER12,
73+
PWM_11 = (int)TIMER13
74+
} PWMName;
75+
76+
typedef enum {
77+
CAN_0 = (int)CAN0,
78+
CAN_1 = (int)CAN1
79+
} CANName;
80+
81+
#ifdef __cplusplus
82+
}
83+
#endif
84+
85+
#endif

0 commit comments

Comments
 (0)