Skip to content

Commit

Permalink
First addition of ESP320 support (espressif#19)
Browse files Browse the repository at this point in the history
* First addition of ESP320 support

* Updated maximum data size.
  • Loading branch information
Sweet-Peas authored and me-no-dev committed Oct 17, 2016
1 parent 4865ed0 commit bd1dcb8
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
40 changes: 40 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,43 @@ esp32.menu.UploadSpeed.460800.macosx=460800
esp32.menu.UploadSpeed.460800.upload.speed=460800
esp32.menu.UploadSpeed.512000.windows=512000
esp32.menu.UploadSpeed.512000.upload.speed=512000

##############################################################
esp320.name=Electronic SweetPeas - ESP320

esp320.upload.tool=esptool
esp320.upload.maximum_size=1044464
esp320.upload.maximum_data_size=294912
esp320.upload.wait_for_upload_port=true

esp320.serial.disableDTR=true
esp320.serial.disableRTS=true

esp320.build.mcu=esp32
esp320.build.core=esp32
esp320.build.variant=esp320
esp320.build.board=ESP320

esp320.build.f_cpu=160000000L
esp320.build.flash_mode=qio
esp320.build.flash_size=4MB

esp320.menu.FlashFreq.80=80MHz
esp320.menu.FlashFreq.80.build.flash_freq=80m
esp320.menu.FlashFreq.40=40MHz
esp320.menu.FlashFreq.40.build.flash_freq=40m

esp320.menu.UploadSpeed.921600=921600
esp320.menu.UploadSpeed.921600.upload.speed=921600
esp320.menu.UploadSpeed.115200=115200
esp320.menu.UploadSpeed.115200.upload.speed=115200
esp320.menu.UploadSpeed.256000.windows=256000
esp320.menu.UploadSpeed.256000.upload.speed=256000
esp320.menu.UploadSpeed.230400.windows.upload.speed=256000
esp320.menu.UploadSpeed.230400=230400
esp320.menu.UploadSpeed.230400.upload.speed=230400
esp320.menu.UploadSpeed.460800.linux=460800
esp320.menu.UploadSpeed.460800.macosx=460800
esp320.menu.UploadSpeed.460800.upload.speed=460800
esp320.menu.UploadSpeed.512000.windows=512000
esp320.menu.UploadSpeed.512000.upload.speed=512000
33 changes: 33 additions & 0 deletions variants/esp320/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h


#define digitalPinToPort(pin) (0)
#define digitalPinToBitMask(pin) (1UL << (pin))
#define digitalPinToTimer(pin) (0)
#define portOutputRegister(port)
#define portInputRegister(port)
#define portModeRegister(port)

#define NOT_A_PIN -1
#define NOT_A_PORT -1
#define NOT_AN_INTERRUPT -1
#define NOT_ON_TIMER 0

#define EXTERNAL_NUM_INTERRUPTS 11
#define NUM_DIGITAL_PINS 12
#define NUM_ANALOG_INPUTS 5

#define analogInputToDigitalPin(p)
#define digitalPinToInterrupt(p)
#define digitalPinHasPWM(p)

static const uint8_t SDA = 2;
static const uint8_t SCL = 14;

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

#endif /* Pins_Arduino_h */

0 comments on commit bd1dcb8

Please sign in to comment.