From 7b63f5868391bec3d3c0f487ff182b28d241832f Mon Sep 17 00:00:00 2001 From: MangoGeek <771992497@qq.com> Date: Fri, 12 May 2017 15:02:46 +0800 Subject: [PATCH] add support for widora-air board (#367) * add support for widora-air board * change widora-air f_cpu error,from 400M to 240M --- boards.txt | 43 ++++++++++++++++++++- variants/widora-air/pins_arduino.h | 61 ++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 variants/widora-air/pins_arduino.h diff --git a/boards.txt b/boards.txt index 622ecf8f..1ca45ed7 100644 --- a/boards.txt +++ b/boards.txt @@ -99,6 +99,47 @@ esp32thing.menu.UploadSpeed.512000.upload.speed=512000 ############################################################## +widora-air.name=Widora AIR + +widora-air.upload.tool=esptool +widora-air.upload.maximum_size=1044464 +widora-air.upload.maximum_data_size=294912 +widora-air.upload.wait_for_upload_port=true + +widora-air.serial.disableDTR=true +widora-air.serial.disableRTS=true + +widora-air.build.mcu=esp32 +widora-air.build.core=esp32 +widora-air.build.variant=widora-air +widora-air.build.board=WIDORA_AIR + +widora-air.build.f_cpu=240000000L +widora-air.build.flash_mode=dio +widora-air.build.flash_size=16MB + +widora-air.menu.FlashFreq.80=80MHz +widora-air.menu.FlashFreq.80.build.flash_freq=80m +widora-air.menu.FlashFreq.40=40MHz +widora-air.menu.FlashFreq.40.build.flash_freq=40m + +widora-air.menu.UploadSpeed.921600=921600 +widora-air.menu.UploadSpeed.921600.upload.speed=921600 +widora-air.menu.UploadSpeed.115200=115200 +widora-air.menu.UploadSpeed.115200.upload.speed=115200 +widora-air.menu.UploadSpeed.256000.windows=256000 +widora-air.menu.UploadSpeed.256000.upload.speed=256000 +widora-air.menu.UploadSpeed.230400.windows.upload.speed=256000 +widora-air.menu.UploadSpeed.230400=230400 +widora-air.menu.UploadSpeed.230400.upload.speed=230400 +widora-air.menu.UploadSpeed.460800.linux=460800 +widora-air.menu.UploadSpeed.460800.macosx=460800 +widora-air.menu.UploadSpeed.460800.upload.speed=460800 +widora-air.menu.UploadSpeed.512000.windows=512000 +widora-air.menu.UploadSpeed.512000.upload.speed=512000 + +############################################################## + esp320.name=Electronic SweetPeas - ESP320 esp320.upload.tool=esptool @@ -587,4 +628,4 @@ featheresp32.menu.UploadSpeed.460800.upload.speed=460800 featheresp32.menu.UploadSpeed.512000.windows=512000 featheresp32.menu.UploadSpeed.512000.upload.speed=512000 -############################################################## \ No newline at end of file +############################################################## diff --git a/variants/widora-air/pins_arduino.h b/variants/widora-air/pins_arduino.h new file mode 100644 index 00000000..ed5c79ff --- /dev/null +++ b/variants/widora-air/pins_arduino.h @@ -0,0 +1,61 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define EXTERNAL_NUM_INTERRUPTS 16 +#define NUM_DIGITAL_PINS 7 +#define NUM_ANALOG_INPUTS 10 + +#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 LED_BUILTIN = 25; +#define BUILTIN_LED LED_BUILTIN // backward compatibility + + +static const uint8_t KEY_BUILTIN = 0; + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 23; +static const uint8_t SCL = 19; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 17; +static const uint8_t SCK = 18; + +static const uint8_t A0 = 36; +static const uint8_t A1 = 39; +static const uint8_t A2 = 35; +static const uint8_t A3 = 25; +static const uint8_t A4 = 26; +static const uint8_t A5 = 14; +static const uint8_t A6 = 12; +static const uint8_t A7 = 15; +static const uint8_t A8 = 13; +static const uint8_t A9 = 2; + +static const uint8_t D0 = 19; +static const uint8_t D1 = 23; +static const uint8_t D2 = 18; +static const uint8_t D3 = 17; +static const uint8_t D4 = 16; +static const uint8_t D5 = 5; +static const uint8_t D6 = 4; + +static const uint8_t T0 = 19; +static const uint8_t T1 = 23; +static const uint8_t T2 = 18; +static const uint8_t T3 = 17; +static const uint8_t T4 = 16; +static const uint8_t T5 = 5; +static const uint8_t T6 = 4; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +#endif /* Pins_Arduino_h */