Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update m5stack boards define #9086

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,439 changes: 4,115 additions & 1,324 deletions boards.txt

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions variants/m5stack_atom/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t TXD2 = 32;
static const uint8_t RXD2 = 26;

static const uint8_t SDA = 26;
static const uint8_t SCL = 32;


static const uint8_t G12 = 12;
static const uint8_t G19 = 19;
static const uint8_t G21 = 21;
Expand Down
9 changes: 6 additions & 3 deletions variants/m5stack_atoms3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 35;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// Some boards have too low voltage on this pin (board design bug)
// Use different pin with 3V and connect with 48
// and change this setup for the chosen pin (for example 38)
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

Expand Down
51 changes: 51 additions & 0 deletions variants/m5stack_capsule/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t TX = 43;
static const uint8_t RX = 44;

static const uint8_t TXD2 = 1;
static const uint8_t RXD2 = 2;

static const uint8_t SDA = 13;
static const uint8_t SCL = 15;

static const uint8_t SS = 11;
static const uint8_t MOSI = 12;
static const uint8_t MISO = 39;
static const uint8_t SCK = 14;

static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
static const uint8_t G3 = 3;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G6 = 6;
static const uint8_t G7 = 7;
static const uint8_t G8 = 8;
static const uint8_t G9 = 9;
static const uint8_t G10 = 10;
static const uint8_t G11 = 11;
static const uint8_t G12 = 12;
static const uint8_t G13 = 13;
static const uint8_t G14 = 14;
static const uint8_t G15 = 15;
static const uint8_t G39 = 39;
static const uint8_t G40 = 40;
static const uint8_t G41 = 41;
static const uint8_t G42 = 42;
static const uint8_t G43 = 43;
static const uint8_t G44 = 44;
static const uint8_t G46 = 46;

static const uint8_t ADC1 = 7;
static const uint8_t ADC2 = 8;

#endif /* Pins_Arduino_h */
53 changes: 53 additions & 0 deletions variants/m5stack_cardputer/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t TX = 43;
static const uint8_t RX = 44;

static const uint8_t TXD2 = 1;
static const uint8_t RXD2 = 2;

static const uint8_t SDA = 13;
static const uint8_t SCL = 15;

static const uint8_t SS = 12;
static const uint8_t MOSI = 14;
static const uint8_t MISO = 39;
static const uint8_t SCK = 40;

static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
static const uint8_t G3 = 3;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G6 = 6;
static const uint8_t G7 = 7;
static const uint8_t G8 = 8;
static const uint8_t G9 = 9;
static const uint8_t G10 = 10;
static const uint8_t G11 = 11;
static const uint8_t G12 = 12;
static const uint8_t G13 = 13;
static const uint8_t G14 = 14;
static const uint8_t G15 = 15;
static const uint8_t G39 = 39;
static const uint8_t G40 = 40;
static const uint8_t G41 = 41;
static const uint8_t G42 = 42;
static const uint8_t G43 = 43;
static const uint8_t G44 = 44;
static const uint8_t G46 = 46;

static const uint8_t ADC1 = 7;
static const uint8_t ADC2 = 8;



#endif /* Pins_Arduino_h */
10 changes: 9 additions & 1 deletion variants/m5stack_cores3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001

// CoreS3 has no builtin LED / NeoLED
// Some boards have too low voltage on this pin (board design bug)
// Use different pin with 3V and connect with 48
// and change this setup for the chosen pin (for example 38)
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

static const uint8_t TX = 43;
static const uint8_t RX = 44;
Expand Down
53 changes: 53 additions & 0 deletions variants/m5stack_dial/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t TX = 43;
static const uint8_t RX = 44;

static const uint8_t TXD2 = 1;
static const uint8_t RXD2 = 2;

static const uint8_t SDA = 13;
static const uint8_t SCL = 15;

static const uint8_t SS = 12;
static const uint8_t MOSI = 14;
static const uint8_t MISO = 39;
static const uint8_t SCK = 40;

static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
static const uint8_t G3 = 3;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G6 = 6;
static const uint8_t G7 = 7;
static const uint8_t G8 = 8;
static const uint8_t G9 = 9;
static const uint8_t G10 = 10;
static const uint8_t G11 = 11;
static const uint8_t G12 = 12;
static const uint8_t G13 = 13;
static const uint8_t G14 = 14;
static const uint8_t G15 = 15;
static const uint8_t G39 = 39;
static const uint8_t G40 = 40;
static const uint8_t G41 = 41;
static const uint8_t G42 = 42;
static const uint8_t G43 = 43;
static const uint8_t G44 = 44;
static const uint8_t G46 = 46;

static const uint8_t ADC1 = 7;
static const uint8_t ADC2 = 8;



#endif /* Pins_Arduino_h */
3 changes: 0 additions & 3 deletions variants/m5stack_fire/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t TXD2 = 17;
static const uint8_t RXD2 = 16;

static const uint8_t SDA = 21;
static const uint8_t SCL = 22;

Expand Down
48 changes: 48 additions & 0 deletions variants/m5stack_paper/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

#define TX2 14
#define RX2 13

static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t SDA = 25;
static const uint8_t SCL = 32;

static const uint8_t SS = 15;
static const uint8_t MOSI = 12;
static const uint8_t MISO = 13;
static const uint8_t SCK = 14;

static const uint8_t G25 = 25;
static const uint8_t G32 = 32;

static const uint8_t G26 = 26;
static const uint8_t G33 = 33;

static const uint8_t G18 = 18;
static const uint8_t G19 = 19;

static const uint8_t G21 = 21;
static const uint8_t G22 = 22;

static const uint8_t G36 = 36;
static const uint8_t G2 = 2;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G23 = 23;

static const uint8_t G37 = 37;
static const uint8_t G38 = 38;
static const uint8_t G39 = 39;

static const uint8_t DAC1 = 25;
static const uint8_t DAC2 = 26;

static const uint8_t ADC1 = 35;
static const uint8_t ADC2 = 36;

#endif /* Pins_Arduino_h */
48 changes: 48 additions & 0 deletions variants/m5stack_poe_cam/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t SDA = 25;
static const uint8_t SCL = 33;

// Modified elsewhere
static const uint8_t SS = -1;
static const uint8_t MOSI = -1;
static const uint8_t MISO = -1;
static const uint8_t SCK = -1;

static const uint8_t G23 = 23;
static const uint8_t G25 = 25;
static const uint8_t G27 = 27;
static const uint8_t G22 = 22;
static const uint8_t G26 = 26;
static const uint8_t G21 = 21;
static const uint8_t G32 = 32;
static const uint8_t G35 = 35;
static const uint8_t G34 = 34;
static const uint8_t G5 = 5;
static const uint8_t G39 = 39;
static const uint8_t G18 = 18;
static const uint8_t G36 = 36;
static const uint8_t G19 = 19;
static const uint8_t G15 = 15;

static const uint8_t G2 = 2;
static const uint8_t G33 = 33;

static const uint8_t G13 = 13;
static const uint8_t G4 = 4;

static const uint8_t G0 = 0;

static const uint8_t DAC1 = 25;
static const uint8_t DAC2 = 26;

static const uint8_t ADC1 = 35;
static const uint8_t ADC2 = 36;

#endif /* Pins_Arduino_h */
24 changes: 24 additions & 0 deletions variants/m5stack_stamp_c3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

static const uint8_t TX = 21;
static const uint8_t RX = 20;

static const uint8_t SDA = 8;
static const uint8_t SCL = 9;

static const uint8_t SS = 7;
static const uint8_t MOSI = 6;
static const uint8_t MISO = 5;
static const uint8_t SCK = 4;

static const uint8_t A0 = 0;
static const uint8_t A1 = 1;
static const uint8_t A2 = 2;
static const uint8_t A3 = 3;
static const uint8_t A4 = 4;
static const uint8_t A5 = 5;

#endif /* Pins_Arduino_h */
12 changes: 6 additions & 6 deletions variants/m5stack_stamp_pico/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ static const uint8_t RX = 3;
static const uint8_t SDA = 21;
static const uint8_t SCL = 22;

static const uint8_t SS = 19;
static const uint8_t MOSI = 26;
static const uint8_t MISO = 36;
static const uint8_t SCK = 18;

static const uint8_t G26 = 26;
static const uint8_t G36 = 36;
static const uint8_t G18 = 18;
Expand All @@ -23,9 +28,4 @@ static const uint8_t G0 = 0;
static const uint8_t G32 = 32;
static const uint8_t G33 = 33;

static const uint8_t SS = 19;
static const uint8_t MOSI = 26;
static const uint8_t MISO = 36;
static const uint8_t SCK = 18;

#endif /* Pins_Arduino_h */
#endif /* Pins_Arduino_h */
12 changes: 7 additions & 5 deletions variants/m5stack_stamp_s3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001
Expand All @@ -12,14 +13,15 @@ static const uint8_t RX = 44;
static const uint8_t TXD2 = 1;
static const uint8_t RXD2 = 2;

static const uint8_t SS = 7;
static const uint8_t MOSI = 6;
static const uint8_t MISO = 5;
static const uint8_t SCK = 4;

static const uint8_t SDA = 13;
static const uint8_t SCL = 15;

// Modified elsewhere
static const uint8_t SS = -1;
static const uint8_t MOSI = -1;
static const uint8_t MISO = -1;
static const uint8_t SCK = -1;

static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
Expand Down
Loading