Skip to content

Commit 1fdc660

Browse files
cyberman54me-no-dev
authored andcommitted
[Feature] Boards added: Pycom LoPy & LoPy4 (#1984)
* Create pins_arduino.h * Update boards.txt Pycom LoPy + LoPy4 boards added * Create pins_arduino.h * Update pins_arduino.h bugfix antenna switch GPIO port 16 -> 21 * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update boards.txt
1 parent a53c9de commit 1fdc660

File tree

4 files changed

+264
-0
lines changed

4 files changed

+264
-0
lines changed

Diff for: boards.txt

+118
Original file line numberDiff line numberDiff line change
@@ -2445,3 +2445,121 @@ t-beam.menu.DebugLevel.debug.build.code_debug=4
24452445
t-beam.menu.DebugLevel.verbose=Verbose
24462446
t-beam.menu.DebugLevel.verbose.build.code_debug=5
24472447

2448+
##############################################################
2449+
2450+
lopy.name=LoPy
2451+
2452+
lopy.upload.tool=esptool
2453+
lopy.upload.maximum_size=1310720
2454+
lopy.upload.maximum_data_size=327680
2455+
lopy.upload.wait_for_upload_port=true
2456+
2457+
lopy.serial.disableDTR=true
2458+
lopy.serial.disableRTS=true
2459+
2460+
lopy.build.mcu=esp32
2461+
lopy.build.core=esp32
2462+
lopy.build.variant=lopy
2463+
lopy.build.board=LoPy
2464+
2465+
lopy.build.f_cpu=240000000L
2466+
lopy.build.flash_mode=dio
2467+
lopy.build.flash_size=4MB
2468+
lopy.build.boot=dio
2469+
lopy.build.partitions=default
2470+
2471+
lopy.menu.FlashFreq.80=80MHz
2472+
lopy.menu.FlashFreq.80.build.flash_freq=80m
2473+
lopy.menu.FlashFreq.40=40MHz
2474+
lopy.menu.FlashFreq.40.build.flash_freq=40m
2475+
2476+
lopy.menu.UploadSpeed.921600=921600
2477+
lopy.menu.UploadSpeed.921600.upload.speed=921600
2478+
lopy.menu.UploadSpeed.115200=115200
2479+
lopy.menu.UploadSpeed.115200.upload.speed=115200
2480+
lopy.menu.UploadSpeed.256000.windows=256000
2481+
lopy.menu.UploadSpeed.256000.upload.speed=256000
2482+
lopy.menu.UploadSpeed.230400.windows.upload.speed=256000
2483+
lopy.menu.UploadSpeed.230400=230400
2484+
lopy.menu.UploadSpeed.230400.upload.speed=230400
2485+
lopy.menu.UploadSpeed.460800.linux=460800
2486+
lopy.menu.UploadSpeed.460800.macosx=460800
2487+
lopy.menu.UploadSpeed.460800.upload.speed=460800
2488+
lopy.menu.UploadSpeed.512000.windows=512000
2489+
lopy.menu.UploadSpeed.512000.upload.speed=512000
2490+
2491+
lopy.menu.DebugLevel.none=None
2492+
lopy.menu.DebugLevel.none.build.code_debug=0
2493+
lopy.menu.DebugLevel.error=Error
2494+
lopy.menu.DebugLevel.error.build.code_debug=1
2495+
lopy.menu.DebugLevel.warn=Warn
2496+
lopy.menu.DebugLevel.warn.build.code_debug=2
2497+
lopy.menu.DebugLevel.info=Info
2498+
lopy.menu.DebugLevel.info.build.code_debug=3
2499+
lopy.menu.DebugLevel.debug=Debug
2500+
lopy.menu.DebugLevel.debug.build.code_debug=4
2501+
lopy.menu.DebugLevel.verbose=Verbose
2502+
lopy.menu.DebugLevel.verbose.build.code_debug=5
2503+
2504+
##############################################################
2505+
2506+
lopy4.name=LoPy4
2507+
2508+
lopy4.upload.tool=esptool
2509+
lopy4.upload.maximum_size=1310720
2510+
lopy4.upload.maximum_data_size=327680
2511+
lopy4.upload.wait_for_upload_port=true
2512+
2513+
lopy4.serial.disableDTR=true
2514+
lopy4.serial.disableRTS=true
2515+
2516+
lopy4.build.mcu=esp32
2517+
lopy4.build.core=esp32
2518+
lopy4.build.variant=lopy4
2519+
lopy4.build.board=LoPy4
2520+
2521+
lopy4.build.f_cpu=240000000L
2522+
lopy4.build.flash_mode=dio
2523+
lopy4.build.flash_size=4MB
2524+
lopy4.build.boot=dio
2525+
lopy4.build.partitions=default
2526+
2527+
lopy4.menu.PSRAM.disabled=Disabled
2528+
lopy4.menu.PSRAM.disabled.build.defines=
2529+
lopy4.menu.PSRAM.enabled=Enabled
2530+
lopy4.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
2531+
2532+
lopy4.menu.FlashFreq.80=80MHz
2533+
lopy4.menu.FlashFreq.80.build.flash_freq=80m
2534+
lopy4.menu.FlashFreq.40=40MHz
2535+
lopy4.menu.FlashFreq.40.build.flash_freq=40m
2536+
2537+
lopy4.menu.UploadSpeed.921600=921600
2538+
lopy4.menu.UploadSpeed.921600.upload.speed=921600
2539+
lopy4.menu.UploadSpeed.115200=115200
2540+
lopy4.menu.UploadSpeed.115200.upload.speed=115200
2541+
lopy4.menu.UploadSpeed.256000.windows=256000
2542+
lopy4.menu.UploadSpeed.256000.upload.speed=256000
2543+
lopy4.menu.UploadSpeed.230400.windows.upload.speed=256000
2544+
lopy4.menu.UploadSpeed.230400=230400
2545+
lopy4.menu.UploadSpeed.230400.upload.speed=230400
2546+
lopy4.menu.UploadSpeed.460800.linux=460800
2547+
lopy4.menu.UploadSpeed.460800.macosx=460800
2548+
lopy4.menu.UploadSpeed.460800.upload.speed=460800
2549+
lopy4.menu.UploadSpeed.512000.windows=512000
2550+
lopy4.menu.UploadSpeed.512000.upload.speed=512000
2551+
2552+
lopy4.menu.DebugLevel.none=None
2553+
lopy4.menu.DebugLevel.none.build.code_debug=0
2554+
lopy4.menu.DebugLevel.error=Error
2555+
lopy4.menu.DebugLevel.error.build.code_debug=1
2556+
lopy4.menu.DebugLevel.warn=Warn
2557+
lopy4.menu.DebugLevel.warn.build.code_debug=2
2558+
lopy4.menu.DebugLevel.info=Info
2559+
lopy4.menu.DebugLevel.info.build.code_debug=3
2560+
lopy4.menu.DebugLevel.debug=Debug
2561+
lopy4.menu.DebugLevel.debug.build.code_debug=4
2562+
lopy4.menu.DebugLevel.verbose=Verbose
2563+
lopy4.menu.DebugLevel.verbose.build.code_debug=5
2564+
2565+

Diff for: variants/lopy/pins_arduino.h

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define EXTERNAL_NUM_INTERRUPTS 16
7+
#define NUM_DIGITAL_PINS 40
8+
#define NUM_ANALOG_INPUTS 18
9+
10+
#define analogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
11+
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#define digitalPinHasPWM(p) (p < 34)
13+
14+
// SPI LoRa Radio
15+
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
16+
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
17+
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
18+
#define LORA_CS 17 // GPIO17 - SX1276 CS
19+
#define LORA_RST 18 // GPIO18 - SX1276 RST
20+
#define LORA_IO0 23 // GPIO23 - SX1276 IO0
21+
#define LORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
22+
#define LORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0
23+
24+
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
25+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
26+
27+
#define ANT_SELECT 16 // GPIO16 - External Antenna Switch
28+
29+
static const uint8_t TX = 1;
30+
static const uint8_t RX = 3;
31+
32+
static const uint8_t SDA = 12;
33+
static const uint8_t SCL = 13;
34+
35+
static const uint8_t SS = 17;
36+
static const uint8_t MOSI = 22;
37+
static const uint8_t MISO = 37;
38+
static const uint8_t SCK = 13;
39+
40+
static const uint8_t A0 = 36;
41+
static const uint8_t A1 = 37;
42+
static const uint8_t A2 = 38;
43+
static const uint8_t A3 = 39;
44+
static const uint8_t A4 = 32;
45+
static const uint8_t A5 = 33;
46+
static const uint8_t A6 = 34;
47+
static const uint8_t A7 = 35;
48+
static const uint8_t A10 = 4;
49+
static const uint8_t A11 = 0;
50+
static const uint8_t A12 = 2;
51+
static const uint8_t A13 = 15;
52+
static const uint8_t A14 = 13;
53+
static const uint8_t A14 = 12;
54+
static const uint8_t A16 = 14;
55+
static const uint8_t A17 = 27;
56+
static const uint8_t A18 = 25;
57+
static const uint8_t A19 = 26;
58+
59+
static const uint8_t T0 = 4;
60+
static const uint8_t T1 = 0;
61+
static const uint8_t T2 = 2;
62+
static const uint8_t T3 = 15;
63+
static const uint8_t T4 = 13;
64+
static const uint8_t T5 = 12;
65+
static const uint8_t T6 = 14;
66+
static const uint8_t T7 = 27;
67+
static const uint8_t T8 = 33;
68+
static const uint8_t T9 = 32;
69+
70+
static const uint8_t DAC1 = 25;
71+
static const uint8_t DAC2 = 26;
72+
73+
#endif /* Pins_Arduino_h */

Diff for: variants/lopy4/pins_arduino.h

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define EXTERNAL_NUM_INTERRUPTS 16
7+
#define NUM_DIGITAL_PINS 40
8+
#define NUM_ANALOG_INPUTS 18
9+
10+
#define analogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
11+
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#define digitalPinHasPWM(p) (p < 34)
13+
14+
// SPI LoRa Radio
15+
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
16+
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
17+
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
18+
#define LORA_CS 18 // GPIO18 - SX1276 CS
19+
#define LORA_IO0 23 // GPIO23 - SX1276 IO0
20+
#define LORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
21+
#define LORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0
22+
23+
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
24+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
25+
26+
#define ANT_SELECT 21 // GPIO21 - External Antenna Switch
27+
28+
static const uint8_t TX = 1;
29+
static const uint8_t RX = 3;
30+
31+
static const uint8_t SDA = 12;
32+
static const uint8_t SCL = 13;
33+
34+
static const uint8_t MOSI = 22;
35+
static const uint8_t MISO = 37;
36+
static const uint8_t SCK = 13;
37+
38+
static const uint8_t A0 = 36;
39+
static const uint8_t A1 = 37;
40+
static const uint8_t A2 = 38;
41+
static const uint8_t A3 = 39;
42+
static const uint8_t A4 = 32;
43+
static const uint8_t A5 = 33;
44+
static const uint8_t A6 = 34;
45+
static const uint8_t A7 = 35;
46+
static const uint8_t A10 = 4;
47+
static const uint8_t A11 = 0;
48+
static const uint8_t A12 = 2;
49+
static const uint8_t A13 = 15;
50+
static const uint8_t A14 = 13;
51+
static const uint8_t A14 = 12;
52+
static const uint8_t A16 = 14;
53+
static const uint8_t A17 = 27;
54+
static const uint8_t A18 = 25;
55+
static const uint8_t A19 = 26;
56+
57+
static const uint8_t T0 = 4;
58+
static const uint8_t T1 = 0;
59+
static const uint8_t T2 = 2;
60+
static const uint8_t T3 = 15;
61+
static const uint8_t T4 = 13;
62+
static const uint8_t T5 = 12;
63+
static const uint8_t T6 = 14;
64+
static const uint8_t T7 = 27;
65+
static const uint8_t T8 = 33;
66+
static const uint8_t T9 = 32;
67+
68+
static const uint8_t DAC1 = 25;
69+
static const uint8_t DAC2 = 26;
70+
71+
#endif /* Pins_Arduino_h */

Diff for: variants/wipy3/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
1515
#define BUILTIN_LED LED_BUILTIN // backward compatibility
1616

17+
#define ANT_SELECT 21 // GPIO21 - External Antenna Switch
18+
1719
static const uint8_t TX = 1;
1820
static const uint8_t RX = 3;
1921

0 commit comments

Comments
 (0)