Skip to content

Commit 660f170

Browse files
committed
update: 更新了很多东西
1 parent e61fc78 commit 660f170

File tree

260 files changed

+2446
-2446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+2446
-2446
lines changed

boards.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ GenF030.build.board=GenF030
4242
GenF030.build.mcu=cortex-m0plus
4343
GenF030.build.series=PY32F0xx
4444
GenF030.build.cmsis_lib_gcc=arm_cortexM0l_math
45-
GenF030.build.air_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
45+
GenF030.build.py_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
4646
GenF030.build.drivers_include="-I{build.system.path}/Arduino-PY32F0xx-Drivers/{build.series}_HAL_Driver/Inc" "-I{build.system.path}/Arduino-PY32F0xx-Drivers/{build.series}_HAL_Driver/Src" "-I{build.system.path}/{build.series}" "-I{build.system.path}/Arduino-PY32F0xx-Drivers/CMSIS/Device/{build.series}/Include/" "-I{build.system.path}/Arduino-PY32F0xx-Drivers/CMSIS/Device/{build.series}/Source/gcc/"
4747

4848
GenF030.menu.UploadSpeed.115200=115200
@@ -178,5 +178,5 @@ GenF030.menu.pnum.PY32F030K26T=PY32F030K26T
178178
GenF030.menu.pnum.PY32F030K26T.upload.maximum_size=32768
179179
GenF030.menu.pnum.PY32F030K26T.upload.maximum_data_size=4096
180180
GenF030.menu.pnum.PY32F030K26T.build.board=PY32F030K26T
181-
GenF030.menu.pnum.PY32F030K26T.build.product_line=PY32F030x26
181+
GenF030.menu.pnum.PY32F030K26T.build.product_line=PY32F030x6
182182
GenF030.menu.pnum.PY32F030K26T.build.variant=PY32F030xx/PY32F030K26T

cores/arduino/HardwareTimer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
SOFTWARE.
2121
22-
Copyright (c) 2023 AirM2M
23-
Modified to support Arduino-AirMCU
22+
Copyright (c) 2023 PY32Duino
23+
Modified to support PY32Duino
2424
*/
2525

2626
/* Define to prevent recursive inclusion -------------------------------------*/
@@ -29,7 +29,7 @@
2929

3030
/* Includes ------------------------------------------------------------------*/
3131
#include "timer.h"
32-
#include "airyyxx_ll_tim.h"
32+
#include "py32yyxx_ll_tim.h"
3333

3434
#if defined(HAL_TIM_MODULE_ENABLED) && !defined(HAL_TIM_MODULE_ONLY)
3535

cores/arduino/Tone.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ static HardwareTimer *TimerTone = NULL;
4343
*/
4444
static void tonePeriodElapsedCallback()
4545
{
46-
GPIO_TypeDef *port = get_GPIO_Port(AIR_PORT(TimerTone_pinInfo.pin));
46+
GPIO_TypeDef *port = get_GPIO_Port(PY32_PORT(TimerTone_pinInfo.pin));
4747

4848
if (port != NULL) {
4949
if (TimerTone_pinInfo.count != 0) {
5050
if (TimerTone_pinInfo.count > 0) {
5151
TimerTone_pinInfo.count--;
5252
}
53-
digital_io_toggle(port, AIR_LL_GPIO_PIN(TimerTone_pinInfo.pin));
53+
digital_io_toggle(port, PY32_LL_GPIO_PIN(TimerTone_pinInfo.pin));
5454
} else {
55-
digital_io_write(port, AIR_LL_GPIO_PIN(TimerTone_pinInfo.pin), 0);
55+
digital_io_write(port, PY32_LL_GPIO_PIN(TimerTone_pinInfo.pin), 0);
5656
}
5757
}
5858
}
@@ -69,7 +69,7 @@ static void timerTonePinDeinit()
6969
TimerTone->timerHandleDeinit();
7070
}
7171
if (TimerTone_pinInfo.pin != NC) {
72-
pin_function(TimerTone_pinInfo.pin, AIR_PIN_DATA(AIR_MODE_INPUT, GPIO_NOPULL, 0));
72+
pin_function(TimerTone_pinInfo.pin, PY32_PIN_DATA(PY32_MODE_INPUT, GPIO_NOPULL, 0));
7373
TimerTone_pinInfo.pin = NC;
7474
}
7575
}
@@ -93,7 +93,7 @@ static void timerTonePinInit(PinName p, uint32_t frequency, uint32_t duration)
9393
TimerTone_pinInfo.count = -1;
9494
}
9595

96-
pin_function(TimerTone_pinInfo.pin, AIR_PIN_DATA(AIR_MODE_OUTPUT_PP, GPIO_NOPULL, 0));
96+
pin_function(TimerTone_pinInfo.pin, PY32_PIN_DATA(PY32_MODE_OUTPUT_PP, GPIO_NOPULL, 0));
9797

9898
TimerTone->setOverflow(timFreq, HERTZ_FORMAT);
9999
TimerTone->attachInterrupt(tonePeriodElapsedCallback);

cores/arduino/WInterrupts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void attachInterrupt(uint32_t pin, callback_function_t callback, uint32_t mode)
2626
#if !defined(HAL_EXTI_MODULE_DISABLED)
2727
uint32_t it_mode;
2828
PinName p = digitalPinToPinName(pin);
29-
GPIO_TypeDef *port = set_GPIO_Port_Clock(AIR_PORT(p));
29+
GPIO_TypeDef *port = set_GPIO_Port_Clock(PY32_PORT(p));
3030
if (!port) {
3131
return;
3232
}
@@ -52,7 +52,7 @@ void attachInterrupt(uint32_t pin, callback_function_t callback, uint32_t mode)
5252
//pinF1_DisconnectDebug(p);
5353
#endif /* AIR32F1xx */
5454

55-
air_interrupt_enable(port, AIR_GPIO_PIN(p), callback, it_mode);
55+
air_interrupt_enable(port, PY32_GPIO_PIN(p), callback, it_mode);
5656
#else
5757
UNUSED(pin);
5858
UNUSED(callback);
@@ -77,11 +77,11 @@ void detachInterrupt(uint32_t pin)
7777
{
7878
#if !defined(HAL_EXTI_MODULE_DISABLED)
7979
PinName p = digitalPinToPinName(pin);
80-
GPIO_TypeDef *port = get_GPIO_Port(AIR_PORT(p));
80+
GPIO_TypeDef *port = get_GPIO_Port(PY32_PORT(p));
8181
if (!port) {
8282
return;
8383
}
84-
air_interrupt_disable(port, AIR_GPIO_PIN(p));
84+
air_interrupt_disable(port, PY32_GPIO_PIN(p));
8585
#else
8686
UNUSED(pin);
8787
#endif

cores/arduino/pins_arduino.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extern "C" {
2525
WEAK uint32_t pinNametoDigitalPin(PinName p)
2626
{
2727
uint32_t i = NUM_DIGITAL_PINS;
28-
if (AIR_VALID_PINNAME(p)) {
28+
if (PY32_VALID_PINNAME(p)) {
2929
for (i = 0; i < NUM_DIGITAL_PINS; i++) {
3030
if (digitalPin[i] == (p & PNAME_MASK)) {
3131
i |= ((uint32_t)(p) & ALTX_MASK);

cores/arduino/pins_arduino.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,23 @@ PinName analogInputToPinName(uint32_t pin);
136136
pin_in_pinmap(digitalPinToPinName(p), PinMap_SPI_SSEL))
137137

138138

139-
#define digitalPinToPort(p) (get_GPIO_Port(AIR_PORT(digitalPinToPinName(p))))
140-
#define digitalPinToBitMask(p) (AIR_GPIO_PIN(digitalPinToPinName(p)))
139+
#define digitalPinToPort(p) (get_GPIO_Port(PY32_PORT(digitalPinToPinName(p))))
140+
#define digitalPinToBitMask(p) (PY32_GPIO_PIN(digitalPinToPinName(p)))
141141

142-
#define analogInPinToBit(p) (AIR_GPIO_PIN(digitalPinToPinName(p)))
142+
#define analogInPinToBit(p) (PY32_GPIO_PIN(digitalPinToPinName(p)))
143143
#define portOutputRegister(P) (&(P->ODR))
144144
#define portInputRegister(P) (&(P->IDR))
145145

146146
#define portSetRegister(P) (&(P->BSRR))
147-
#if defined(AIRF2xx) || defined(AIRF4xx) || defined(AIRF7xx)
147+
#if defined(PY32F2xx) || defined(PY32F4xx) || defined(PY32F7xx)
148148
/* For those series reset are in the high part so << 16U needed */
149149
#define portClearRegister(P) (&(P->BSRR))
150150
#else
151151
#define portClearRegister(P) (&(P->BRR))
152152
#endif
153153

154154

155-
#if defined(AIR32F1xx)
155+
#if defined(PY32F1xx)
156156
/*
157157
* Config registers split in 2 registers:
158158
* CRL: pin 0..7

cores/arduino/pins_arduino_analog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*******************************************************************************
3-
* Copyright (c) 2023, AirM2M
3+
* Copyright (c) 2023, PY32Duino
44
* All rights reserved.
55
*
66
* This software component is licensed by ST under BSD 3-Clause license,

cores/arduino/pins_arduino_digital.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*******************************************************************************
3-
* Copyright (c) 2023, AirM2M
3+
* Copyright (c) 2023, PY32Duino
44
* All rights reserved.
55
*
66
* This software component is licensed by ST under BSD 3-Clause license,
@@ -536,7 +536,7 @@ enum {
536536
#endif
537537

538538
/*
539-
* Each Air MCU pin number PYn defined in the variant.h
539+
* Each PY32 pin number PYn defined in the variant.h
540540
* is also the alternate pin number PYn_ALT0
541541
*/
542542
#ifdef PA0

cores/arduino/py32/LL/py32yyxx_ll.h

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,52 @@
99
#endif
1010

1111
/* Include Low Layers drivers */
12-
#include "airyyxx_ll_adc.h"
13-
#include "airyyxx_ll_bdma.h"
14-
#include "airyyxx_ll_bus.h"
15-
#include "airyyxx_ll_comp.h"
16-
#include "airyyxx_ll_cordic.h"
17-
#include "airyyxx_ll_cortex.h"
18-
#include "airyyxx_ll_crc.h"
19-
#include "airyyxx_ll_crs.h"
20-
#include "airyyxx_ll_dac.h"
21-
#include "airyyxx_ll_dcache.h"
22-
#include "airyyxx_ll_delayblock.h"
23-
#include "airyyxx_ll_dlyb.h"
24-
#include "airyyxx_ll_dma.h"
25-
#include "airyyxx_ll_dma2d.h"
26-
#include "airyyxx_ll_dmamux.h"
27-
#include "airyyxx_ll_exti.h"
28-
#include "airyyxx_ll_fmac.h"
29-
#include "airyyxx_ll_fmc.h"
30-
#include "airyyxx_ll_fmpi2c.h"
31-
#include "airyyxx_ll_fsmc.h"
32-
#include "airyyxx_ll_gpio.h"
33-
#include "airyyxx_ll_hrtim.h"
34-
#include "airyyxx_ll_hsem.h"
35-
#include "airyyxx_ll_i2c.h"
36-
#include "airyyxx_ll_icache.h"
37-
#include "airyyxx_ll_ipcc.h"
38-
#include "airyyxx_ll_iwdg.h"
39-
#include "airyyxx_ll_lpgpio.h"
40-
#include "airyyxx_ll_lptim.h"
41-
#include "airyyxx_ll_lpuart.h"
42-
#include "airyyxx_ll_mdma.h"
43-
#include "airyyxx_ll_opamp.h"
44-
#include "airyyxx_ll_pka.h"
45-
#include "airyyxx_ll_pwr.h"
46-
#include "airyyxx_ll_rcc.h"
47-
#include "airyyxx_ll_rng.h"
48-
#include "airyyxx_ll_rtc.h"
49-
#include "airyyxx_ll_sdmmc.h"
50-
#include "airyyxx_ll_spi.h"
51-
#include "airyyxx_ll_swpmi.h"
52-
#include "airyyxx_ll_system.h"
53-
#include "airyyxx_ll_tim.h"
54-
#include "airyyxx_ll_ucpd.h"
55-
#include "airyyxx_ll_usart.h"
56-
#include "airyyxx_ll_usb.h"
57-
#include "airyyxx_ll_utils.h"
58-
#include "airyyxx_ll_wwdg.h"
12+
#include "py32yyxx_ll_adc.h"
13+
#include "py32yyxx_ll_bdma.h"
14+
#include "py32yyxx_ll_bus.h"
15+
#include "py32yyxx_ll_comp.h"
16+
#include "py32yyxx_ll_cordic.h"
17+
#include "py32yyxx_ll_cortex.h"
18+
#include "py32yyxx_ll_crc.h"
19+
#include "py32yyxx_ll_crs.h"
20+
#include "py32yyxx_ll_dac.h"
21+
#include "py32yyxx_ll_dcache.h"
22+
#include "py32yyxx_ll_delayblock.h"
23+
#include "py32yyxx_ll_dlyb.h"
24+
#include "py32yyxx_ll_dma.h"
25+
#include "py32yyxx_ll_dma2d.h"
26+
#include "py32yyxx_ll_dmamux.h"
27+
#include "py32yyxx_ll_exti.h"
28+
#include "py32yyxx_ll_fmac.h"
29+
#include "py32yyxx_ll_fmc.h"
30+
#include "py32yyxx_ll_fmpi2c.h"
31+
#include "py32yyxx_ll_fsmc.h"
32+
#include "py32yyxx_ll_gpio.h"
33+
#include "py32yyxx_ll_hrtim.h"
34+
#include "py32yyxx_ll_hsem.h"
35+
#include "py32yyxx_ll_i2c.h"
36+
#include "py32yyxx_ll_icache.h"
37+
#include "py32yyxx_ll_ipcc.h"
38+
#include "py32yyxx_ll_iwdg.h"
39+
#include "py32yyxx_ll_lpgpio.h"
40+
#include "py32yyxx_ll_lptim.h"
41+
#include "py32yyxx_ll_lpuart.h"
42+
#include "py32yyxx_ll_mdma.h"
43+
#include "py32yyxx_ll_opamp.h"
44+
#include "py32yyxx_ll_pka.h"
45+
#include "py32yyxx_ll_pwr.h"
46+
#include "py32yyxx_ll_rcc.h"
47+
#include "py32yyxx_ll_rng.h"
48+
#include "py32yyxx_ll_rtc.h"
49+
#include "py32yyxx_ll_sdmmc.h"
50+
#include "py32yyxx_ll_spi.h"
51+
#include "py32yyxx_ll_swpmi.h"
52+
#include "py32yyxx_ll_system.h"
53+
#include "py32yyxx_ll_tim.h"
54+
#include "py32yyxx_ll_ucpd.h"
55+
#include "py32yyxx_ll_usart.h"
56+
#include "py32yyxx_ll_usb.h"
57+
#include "py32yyxx_ll_utils.h"
58+
#include "py32yyxx_ll_wwdg.h"
5959
#pragma GCC diagnostic pop
6060
#endif /* _PY32YYXX_LL_H_ */

cores/arduino/py32/PinConfigured.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
extern "C" {
3737
#endif
3838

39-
#define PINCONF_INDEX(X) (AIR_PORT(X)-FirstPort)
39+
#define PINCONF_INDEX(X) (PY32_PORT(X)-FirstPort)
4040

4141
#define PINCONF_MASK 0x01
42-
#define PINCONF_SHIFT(X) (AIR_PIN(X))
42+
#define PINCONF_SHIFT(X) (PY32_PIN(X))
4343
#define PINCONF_BIT(X) (PINCONF_MASK << PINCONF_SHIFT(X))
4444

4545
#define PINCONF_VAL(X, Y) ((Y >> PINCONF_SHIFT(X)) & PINCONF_MASK)

0 commit comments

Comments
 (0)