Skip to content

Commit 79010b6

Browse files
brendanvanbredame-no-dev
authored andcommitted
Add XinaBox CW02 to supported boards (espressif#1620)
* Create pins_arduino.h * Update boards.txt * Update pins_arduino.h
1 parent 9925772 commit 79010b6

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

boards.txt

+76
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,82 @@ esp32.menu.DebugLevel.verbose.build.code_debug=5
101101

102102
##############################################################
103103

104+
cw02.name=XinaBox CW02
105+
106+
cw02.upload.tool=esptool
107+
cw02.upload.maximum_size=1310720
108+
cw02.upload.maximum_data_size=294912
109+
cw02.upload.wait_for_upload_port=true
110+
111+
cw02.serial.disableDTR=true
112+
cw02.serial.disableRTS=true
113+
114+
cw02.build.mcu=esp32
115+
cw02.build.core=esp32
116+
cw02.build.variant=xinabox
117+
cw02.build.board=ESP32_DEV
118+
119+
cw02.build.f_cpu=240000000L
120+
cw02.build.flash_size=4MB
121+
cw02.build.flash_freq=40m
122+
cw02.build.flash_mode=dio
123+
cw02.build.boot=dio
124+
cw02.build.partitions=default
125+
126+
cw02.menu.FlashMode.qio=QIO
127+
cw02.menu.FlashMode.qio.build.flash_mode=dio
128+
cw02.menu.FlashMode.qio.build.boot=qio
129+
cw02.menu.FlashMode.dio=DIO
130+
cw02.menu.FlashMode.dio.build.flash_mode=dio
131+
cw02.menu.FlashMode.dio.build.boot=dio
132+
cw02.menu.FlashMode.qout=QOUT
133+
cw02.menu.FlashMode.qout.build.flash_mode=dout
134+
cw02.menu.FlashMode.qout.build.boot=qout
135+
cw02.menu.FlashMode.dout=DOUT
136+
cw02.menu.FlashMode.dout.build.flash_mode=dout
137+
cw02.menu.FlashMode.dout.build.boot=dout
138+
139+
cw02.menu.FlashFreq.80=80MHz
140+
cw02.menu.FlashFreq.80.build.flash_freq=80m
141+
cw02.menu.FlashFreq.40=40MHz
142+
cw02.menu.FlashFreq.40.build.flash_freq=40m
143+
144+
cw02.menu.FlashSize.4M=4MB (32Mb)
145+
cw02.menu.FlashSize.4M.build.flash_size=4MB
146+
cw02.menu.FlashSize.2M=2MB (16Mb)
147+
cw02.menu.FlashSize.2M.build.flash_size=2MB
148+
cw02.menu.FlashSize.2M.build.partitions=minimal
149+
150+
cw02.menu.UploadSpeed.921600=921600
151+
cw02.menu.UploadSpeed.921600.upload.speed=921600
152+
cw02.menu.UploadSpeed.115200=115200
153+
cw02.menu.UploadSpeed.115200.upload.speed=115200
154+
cw02.menu.UploadSpeed.256000.windows=256000
155+
cw02.menu.UploadSpeed.256000.upload.speed=256000
156+
cw02.menu.UploadSpeed.230400.windows.upload.speed=256000
157+
cw02.menu.UploadSpeed.230400=230400
158+
cw02.menu.UploadSpeed.230400.upload.speed=230400
159+
cw02.menu.UploadSpeed.460800.linux=460800
160+
cw02.menu.UploadSpeed.460800.macosx=460800
161+
cw02.menu.UploadSpeed.460800.upload.speed=460800
162+
cw02.menu.UploadSpeed.512000.windows=512000
163+
cw02.menu.UploadSpeed.512000.upload.speed=512000
164+
165+
cw02.menu.DebugLevel.none=None
166+
cw02.menu.DebugLevel.none.build.code_debug=0
167+
cw02.menu.DebugLevel.error=Error
168+
cw02.menu.DebugLevel.error.build.code_debug=1
169+
cw02.menu.DebugLevel.warn=Warn
170+
cw02.menu.DebugLevel.warn.build.code_debug=2
171+
cw02.menu.DebugLevel.info=Info
172+
cw02.menu.DebugLevel.info.build.code_debug=3
173+
cw02.menu.DebugLevel.debug=Debug
174+
cw02.menu.DebugLevel.debug.build.code_debug=4
175+
cw02.menu.DebugLevel.verbose=Verbose
176+
cw02.menu.DebugLevel.verbose.build.code_debug=5
177+
178+
##############################################################
179+
104180
esp32wrover.name=ESP32 Wrover Module
105181

106182
esp32wrover.upload.tool=esptool

variants/xinabox/pins_arduino.h

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 16
9+
10+
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
11+
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#define digitalPinHasPWM(p) (p < 34)
13+
14+
static const uint8_t LED_BUILTIN = 27;
15+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
16+
17+
static const uint8_t TX = 1;
18+
static const uint8_t RX = 3;
19+
20+
static const uint8_t SDA = 21;
21+
static const uint8_t SCL = 22;
22+
23+
static const uint8_t SS = 5;
24+
static const uint8_t MOSI = 23;
25+
static const uint8_t MISO = 19;
26+
static const uint8_t SCK = 18;
27+
28+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)