Skip to content

Add M5Stack-ATOM Board #3883

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

Merged
merged 5 commits into from
Apr 23, 2020
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
61 changes: 61 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,67 @@ m5stick-c.menu.DebugLevel.debug.build.code_debug=4
m5stick-c.menu.DebugLevel.verbose=Verbose
m5stick-c.menu.DebugLevel.verbose.build.code_debug=5

##############################################################

m5stack-atom.name=M5Stack-ATOM

m5stack-atom.upload.tool=esptool_py
m5stack-atom.upload.maximum_size=1310720
m5stack-atom.upload.maximum_data_size=327680
m5stack-atom.upload.wait_for_upload_port=true

m5stack-atom.serial.disableDTR=true
m5stack-atom.serial.disableRTS=true

m5stack-atom.build.mcu=esp32
m5stack-atom.build.core=esp32
m5stack-atom.build.variant=m5stack_atom
m5stack-atom.build.board=M5Stack_ATOM

m5stack-atom.build.f_cpu=240000000L
m5stack-atom.build.flash_size=4MB
m5stack-atom.build.flash_freq=80m
m5stack-atom.build.flash_mode=dio
m5stack-atom.build.boot=dio
m5stack-atom.build.partitions=default
m5stack-atom.build.defines=

m5stack-atom.menu.PartitionScheme.default=Default
m5stack-atom.menu.PartitionScheme.default.build.partitions=default
m5stack-atom.menu.PartitionScheme.no_ota=No OTA (Large APP)
m5stack-atom.menu.PartitionScheme.no_ota.build.partitions=no_ota
m5stack-atom.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
m5stack-atom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
m5stack-atom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
m5stack-atom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080


m5stack-atom.menu.UploadSpeed.1500000=1500000
m5stack-atom.menu.UploadSpeed.1500000.upload.speed=1500000
m5stack-atom.menu.UploadSpeed.750000=750000
m5stack-atom.menu.UploadSpeed.750000.upload.speed=750000
m5stack-atom.menu.UploadSpeed.500000=500000
m5stack-atom.menu.UploadSpeed.500000.upload.speed=500000
m5stack-atom.menu.UploadSpeed.250000=250000
m5stack-atom.menu.UploadSpeed.250000.upload.speed=250000
m5stack-atom.menu.UploadSpeed.115200=115200
m5stack-atom.menu.UploadSpeed.115200.upload.speed=115200



m5stack-atom.menu.DebugLevel.none=None
m5stack-atom.menu.DebugLevel.none.build.code_debug=0
m5stack-atom.menu.DebugLevel.error=Error
m5stack-atom.menu.DebugLevel.error.build.code_debug=1
m5stack-atom.menu.DebugLevel.warn=Warn
m5stack-atom.menu.DebugLevel.warn.build.code_debug=2
m5stack-atom.menu.DebugLevel.info=Info
m5stack-atom.menu.DebugLevel.info.build.code_debug=3
m5stack-atom.menu.DebugLevel.debug=Debug
m5stack-atom.menu.DebugLevel.debug.build.code_debug=4
m5stack-atom.menu.DebugLevel.verbose=Verbose
m5stack-atom.menu.DebugLevel.verbose.build.code_debug=5


##############################################################

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

#include <stdint.h>

#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16

#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

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

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 G22 = 21;
static const uint8_t G22 = 22;
static const uint8_t G23 = 23;
static const uint8_t G25 = 25;
static const uint8_t G26 = 26;
static const uint8_t G27 = 27;
static const uint8_t G32 = 32;
static const uint8_t G33 = 33;
static const uint8_t G39 = 39;

static const uint8_t G9 = 9;
static const uint8_t G10 = 10;
static const uint8_t G37 = 37;
static const uint8_t G36 = 36;
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 */