Skip to content

Commit 43ee205

Browse files
committed
Add Pycom GPy board (#2754)
1 parent d12c865 commit 43ee205

File tree

2 files changed

+130
-0
lines changed

2 files changed

+130
-0
lines changed

Diff for: boards.txt

+56
Original file line numberDiff line numberDiff line change
@@ -3840,3 +3840,59 @@ d1_mini32.menu.UploadSpeed.512000.upload.speed=512000
38403840

38413841
##############################################################
38423842

3843+
gpy.name=Pycom GPy
3844+
3845+
gpy.upload.tool=esptool_py
3846+
gpy.upload.maximum_size=1310720
3847+
gpy.upload.maximum_data_size=327680
3848+
gpy.upload.wait_for_upload_port=true
3849+
3850+
gpy.serial.disableDTR=true
3851+
gpy.serial.disableRTS=true
3852+
3853+
gpy.build.mcu=esp32
3854+
gpy.build.core=esp32
3855+
gpy.build.variant=gpy
3856+
gpy.build.board=PYCOM_GPY
3857+
3858+
gpy.build.f_cpu=240000000L
3859+
gpy.build.flash_mode=dio
3860+
gpy.build.flash_size=8MB
3861+
gpy.build.boot=dio
3862+
gpy.build.partitions=default
3863+
3864+
gpy.menu.FlashFreq.80=80MHz
3865+
gpy.menu.FlashFreq.80.build.flash_freq=80m
3866+
gpy.menu.FlashFreq.40=40MHz
3867+
gpy.menu.FlashFreq.40.build.flash_freq=40m
3868+
3869+
gpy.menu.UploadSpeed.921600=921600
3870+
gpy.menu.UploadSpeed.921600.upload.speed=921600
3871+
gpy.menu.UploadSpeed.115200=115200
3872+
gpy.menu.UploadSpeed.115200.upload.speed=115200
3873+
gpy.menu.UploadSpeed.256000.windows=256000
3874+
gpy.menu.UploadSpeed.256000.upload.speed=256000
3875+
gpy.menu.UploadSpeed.230400.windows.upload.speed=256000
3876+
gpy.menu.UploadSpeed.230400=230400
3877+
gpy.menu.UploadSpeed.230400.upload.speed=230400
3878+
gpy.menu.UploadSpeed.460800.linux=460800
3879+
gpy.menu.UploadSpeed.460800.macosx=460800
3880+
gpy.menu.UploadSpeed.460800.upload.speed=460800
3881+
gpy.menu.UploadSpeed.512000.windows=512000
3882+
gpy.menu.UploadSpeed.512000.upload.speed=512000
3883+
3884+
gpy.menu.DebugLevel.none=None
3885+
gpy.menu.DebugLevel.none.build.code_debug=0
3886+
gpy.menu.DebugLevel.error=Error
3887+
gpy.menu.DebugLevel.error.build.code_debug=1
3888+
gpy.menu.DebugLevel.warn=Warn
3889+
gpy.menu.DebugLevel.warn.build.code_debug=2
3890+
gpy.menu.DebugLevel.info=Info
3891+
gpy.menu.DebugLevel.info.build.code_debug=3
3892+
gpy.menu.DebugLevel.debug=Debug
3893+
gpy.menu.DebugLevel.debug.build.code_debug=4
3894+
gpy.menu.DebugLevel.verbose=Verbose
3895+
gpy.menu.DebugLevel.verbose.build.code_debug=5
3896+
3897+
##############################################################
3898+

Diff for: variants/gpy/pins_arduino.h

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
// Sequans Monarch LTE Cat M1/NB1 modem
15+
// NOTE: The Pycom pinout as well as spec sheet block diagram / pin details
16+
// incorrectly list the LTE pins. The correct pins are defined in the source and CSV
17+
// at https://github.com/pycom/pycom-micropython-sigfox/tree/master/esp32/boards/GPY.
18+
#define LTE_CTS 18 // GPIO18 - Sequans modem CTS
19+
#define LTE_RTS 19 // GPIO19 - Sequans modem RTS (pull low to communicate)
20+
#define LTE_RX 23 // GPIO23 - Sequans modem RX
21+
#define LTE_TX 5 // GPIO5 - Sequans modem TX
22+
#define LTE_WAKE 27 // GPIO27 - Sequans modem wake-up interrupt
23+
#define LTE_BAUD 921600
24+
25+
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
26+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
27+
28+
#define ANT_SELECT 21 // GPIO21 - WiFi external / internal antenna switch
29+
30+
static const uint8_t TX = 1;
31+
static const uint8_t RX = 3;
32+
33+
static const uint8_t SDA = 12;
34+
static const uint8_t SCL = 13;
35+
36+
static const uint8_t SS = 17;
37+
static const uint8_t MOSI = 22;
38+
static const uint8_t MISO = 37;
39+
static const uint8_t SCK = 13;
40+
41+
static const uint8_t A0 = 36;
42+
static const uint8_t A1 = 37;
43+
static const uint8_t A2 = 38;
44+
static const uint8_t A3 = 39;
45+
static const uint8_t A4 = 32;
46+
static const uint8_t A5 = 33;
47+
static const uint8_t A6 = 34;
48+
static const uint8_t A7 = 35;
49+
static const uint8_t A10 = 4;
50+
static const uint8_t A11 = 0;
51+
static const uint8_t A12 = 2;
52+
static const uint8_t A13 = 15;
53+
static const uint8_t A14 = 13;
54+
static const uint8_t A15 = 12;
55+
static const uint8_t A16 = 14;
56+
static const uint8_t A17 = 27;
57+
static const uint8_t A18 = 25;
58+
static const uint8_t A19 = 26;
59+
60+
static const uint8_t T0 = 4;
61+
static const uint8_t T1 = 0;
62+
static const uint8_t T2 = 2;
63+
static const uint8_t T3 = 15;
64+
static const uint8_t T4 = 13;
65+
static const uint8_t T5 = 12;
66+
static const uint8_t T6 = 14;
67+
static const uint8_t T7 = 27;
68+
static const uint8_t T8 = 33;
69+
static const uint8_t T9 = 32;
70+
71+
static const uint8_t DAC1 = 25;
72+
static const uint8_t DAC2 = 26;
73+
74+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)