Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 71900ab

Browse filesBrowse files
author
Chuck Todd
committed
2 parents 61cf742 + 097673f commit 71900ab
Copy full SHA for 71900ab

File tree

Expand file treeCollapse file tree

53 files changed

+2551
-217
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

53 files changed

+2551
-217
lines changed

‎boards.txt

Copy file name to clipboardExpand all lines: boards.txt
+56-4Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,58 @@ esp32.menu.DebugLevel.verbose.build.code_debug=5
8282

8383
##############################################################
8484

85+
pico32.name=ESP32 Pico Kit
86+
87+
pico32.upload.tool=esptool
88+
pico32.upload.maximum_size=1310720
89+
pico32.upload.maximum_data_size=294912
90+
pico32.upload.wait_for_upload_port=true
91+
92+
pico32.serial.disableDTR=true
93+
pico32.serial.disableRTS=true
94+
95+
pico32.build.mcu=esp32
96+
pico32.build.core=esp32
97+
pico32.build.variant=pico32
98+
pico32.build.board=ESP32_PICO
99+
100+
pico32.build.f_cpu=240000000L
101+
pico32.build.flash_size=4MB
102+
pico32.build.flash_freq=80m
103+
pico32.build.flash_mode=qio
104+
pico32.build.boot=qio
105+
pico32.build.partitions=default
106+
107+
pico32.menu.UploadSpeed.921600=921600
108+
pico32.menu.UploadSpeed.921600.upload.speed=921600
109+
pico32.menu.UploadSpeed.115200=115200
110+
pico32.menu.UploadSpeed.115200.upload.speed=115200
111+
pico32.menu.UploadSpeed.256000.windows=256000
112+
pico32.menu.UploadSpeed.256000.upload.speed=256000
113+
pico32.menu.UploadSpeed.230400.windows.upload.speed=256000
114+
pico32.menu.UploadSpeed.230400=230400
115+
pico32.menu.UploadSpeed.230400.upload.speed=230400
116+
pico32.menu.UploadSpeed.460800.linux=460800
117+
pico32.menu.UploadSpeed.460800.macosx=460800
118+
pico32.menu.UploadSpeed.460800.upload.speed=460800
119+
pico32.menu.UploadSpeed.512000.windows=512000
120+
pico32.menu.UploadSpeed.512000.upload.speed=512000
121+
122+
pico32.menu.DebugLevel.none=None
123+
pico32.menu.DebugLevel.none.build.code_debug=0
124+
pico32.menu.DebugLevel.error=Error
125+
pico32.menu.DebugLevel.error.build.code_debug=1
126+
pico32.menu.DebugLevel.warn=Warn
127+
pico32.menu.DebugLevel.warn.build.code_debug=2
128+
pico32.menu.DebugLevel.info=Info
129+
pico32.menu.DebugLevel.info.build.code_debug=3
130+
pico32.menu.DebugLevel.debug=Debug
131+
pico32.menu.DebugLevel.debug.build.code_debug=4
132+
pico32.menu.DebugLevel.verbose=Verbose
133+
pico32.menu.DebugLevel.verbose.build.code_debug=5
134+
135+
##############################################################
136+
85137
esp32thing.name=SparkFun ESP32 Thing
86138

87139
esp32thing.upload.tool=esptool
@@ -952,7 +1004,7 @@ mhetesp32minikit.menu.UploadSpeed.512000.upload.speed=512000
9521004
esp32vn-iot-uno.name=ESP32vn IoT Uno
9531005

9541006
esp32vn-iot-uno.upload.tool=esptool
955-
esp32vn-iot-uno.upload.maximum_size=1044464
1007+
esp32vn-iot-uno.upload.maximum_size=1310720
9561008
esp32vn-iot-uno.upload.maximum_data_size=294912
9571009
esp32vn-iot-uno.upload.wait_for_upload_port=true
9581010

@@ -1166,7 +1218,7 @@ m5stack-core-esp32.serial.disableRTS=true
11661218
m5stack-core-esp32.build.mcu=esp32
11671219
m5stack-core-esp32.build.core=esp32
11681220
m5stack-core-esp32.build.variant=esp32
1169-
m5stack-core-esp32.build.board=M5Stack-Core-ESP32
1221+
m5stack-core-esp32.build.board=M5Stack_Core_ESP32
11701222

11711223
m5stack-core-esp32.build.f_cpu=240000000L
11721224
m5stack-core-esp32.build.flash_size=4MB
@@ -1225,7 +1277,7 @@ m5stack-core-esp32.menu.DebugLevel.verbose.build.code_debug=5
12251277
heltec_wifi_kit_32.name=Heltec_WIFI_Kit_32
12261278

12271279
heltec_wifi_kit_32.upload.tool=esptool
1228-
heltec_wifi_kit_32.upload.maximum_size=1044464
1280+
heltec_wifi_kit_32.upload.maximum_size=1310720
12291281
heltec_wifi_kit_32.upload.maximum_data_size=294912
12301282
heltec_wifi_kit_32.upload.wait_for_upload_port=true
12311283

@@ -1268,7 +1320,7 @@ heltec_wifi_kit_32.menu.UploadSpeed.512000.upload.speed=512000
12681320
heltec_wifi_lora_32.name=Heltec_WIFI_LoRa_32
12691321

12701322
heltec_wifi_lora_32.upload.tool=esptool
1271-
heltec_wifi_lora_32.upload.maximum_size=1044464
1323+
heltec_wifi_lora_32.upload.maximum_size=1310720
12721324
heltec_wifi_lora_32.upload.maximum_data_size=294912
12731325
heltec_wifi_lora_32.upload.wait_for_upload_port=true
12741326

‎cores/esp32/Esp.cpp

Copy file name to clipboardExpand all lines: cores/esp32/Esp.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size)
218218

219219
uint64_t EspClass::getEfuseMac(void)
220220
{
221-
uint64_t _chipmacid;
221+
uint64_t _chipmacid = 0LL;
222222
esp_efuse_mac_get_default((uint8_t*) (&_chipmacid));
223223
return _chipmacid;
224224
}

‎cores/esp32/esp32-hal-misc.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-misc.c
+33-29Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "nvs.h"
2222
#include "esp_partition.h"
2323
#include "esp_log.h"
24+
#include "pthread.h"
2425
#include <sys/time.h>
2526

2627
//Undocumented!!! Get chip temperature in Farenheit
@@ -40,40 +41,43 @@ void yield()
4041
portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED;
4142
static pthread_key_t microsStore=NULL; // Thread Local Storage Handle
4243

43-
void* microsStoreDelete(void * storage){ // release thread local data when task is delete.
44-
if(storage) free(storage);
44+
void microsStoreDelete(void * storage) { // release thread local data when task is delete.
45+
if(storage) free(storage);
4546
}
4647

47-
unsigned long IRAM_ATTR micros(){
48-
49-
if (!microsStore){ // first Time Ever thread local not init'd
50-
portENTER_CRITICAL_ISR(&microsMux);
51-
pthread_key_create(&microsStore,microsStoreDelete); // create initial holder
52-
portEXIT_CRITICAL_ISR(&microsMux);
53-
}
48+
unsigned long IRAM_ATTR micros()
49+
{
50+
if (!microsStore) { // first Time Ever thread local not init'd
51+
portENTER_CRITICAL_ISR(&microsMux);
52+
pthread_key_create(&microsStore,microsStoreDelete); // create initial holder
53+
portEXIT_CRITICAL_ISR(&microsMux);
54+
}
5455

55-
uint32_t *ptr;// [0] is lastCount, [1] is overFlow
56+
uint32_t *ptr;// [0] is lastCount, [1] is overFlow
5657

57-
ptr = pthread_getspecific(microsStore); // get address of storage
58+
ptr = pthread_getspecific(microsStore); // get address of storage
5859

59-
if(ptr == NULL){ // first time in this thread, allocate mem, init it.
60-
portENTER_CRITICAL_ISR(&microsMux);
61-
ptr = (uint32_t*)malloc(sizeof(uint32_t)*2);
62-
pthread_setspecific(microsStore,ptr); // store the pointer to this thread's values
63-
ptr[0] = 0; // lastCount value
64-
ptr[1] = 0; // overFlow
65-
portEXIT_CRITICAL_ISR(&microsMux);
66-
}
67-
68-
unsigned long ccount;
69-
portENTER_CRITICAL_ISR(&microsMux);
70-
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
71-
if(ccount < ptr[0]){
72-
ptr[1] += UINT32_MAX / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
73-
}
74-
ptr[0] = ccount;
75-
portEXIT_CRITICAL_ISR(&microsMux);
76-
return ptr[1] + (ccount / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ);
60+
if(ptr == NULL) { // first time in this thread, allocate mem, init it.
61+
portENTER_CRITICAL_ISR(&microsMux);
62+
ptr = (uint32_t*)malloc(sizeof(uint32_t)*2);
63+
pthread_setspecific(microsStore,ptr); // store the pointer to this thread's values
64+
ptr[0] = 0; // lastCount value
65+
ptr[1] = 0; // overFlow
66+
portEXIT_CRITICAL_ISR(&microsMux);
67+
}
68+
69+
unsigned long ccount;
70+
71+
portENTER_CRITICAL_ISR(&microsMux);
72+
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) ); //get cycle count
73+
if(ccount < ptr[0]) { // overflow occurred
74+
ptr[1] += UINT32_MAX / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
75+
}
76+
77+
ptr[0] = ccount;
78+
portEXIT_CRITICAL_ISR(&microsMux);
79+
80+
return ptr[1] + (ccount / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ);
7781
}
7882

7983
unsigned long IRAM_ATTR millis()

‎cores/esp32/esp32-hal-spi.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-spi.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ uint8_t spiGetDataMode(spi_t * spi)
309309
bool outEdge = spi->dev->user.ck_out_edge;
310310
if(idleEdge) {
311311
if(outEdge) {
312-
return SPI_MODE3;
312+
return SPI_MODE2;
313313
}
314-
return SPI_MODE2;
314+
return SPI_MODE3;
315315
}
316316
if(outEdge) {
317317
return SPI_MODE1;
@@ -713,11 +713,11 @@ void spiTransaction(spi_t * spi, uint32_t clockDiv, uint8_t dataMode, uint8_t bi
713713
break;
714714
case SPI_MODE2:
715715
spi->dev->pin.ck_idle_edge = 1;
716-
spi->dev->user.ck_out_edge = 0;
716+
spi->dev->user.ck_out_edge = 1;
717717
break;
718718
case SPI_MODE3:
719719
spi->dev->pin.ck_idle_edge = 1;
720-
spi->dev->user.ck_out_edge = 1;
720+
spi->dev->user.ck_out_edge = 0;
721721
break;
722722
case SPI_MODE0:
723723
default:

‎docs/arduino-ide/debian_ubuntu.md

Copy file name to clipboardExpand all lines: docs/arduino-ide/debian_ubuntu.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Installation instructions for Debian / Ubuntu OS
1616
cd esp32 && \
1717
git submodule update --init --recursive && \
1818
cd tools && \
19-
python get.py
19+
python2 get.py
2020
```
2121
- Restart Arduino IDE
2222

@@ -32,4 +32,4 @@ Installation instructions for Debian / Ubuntu OS
3232
cd esp32 && \
3333
git submodule update --init --recursive && \
3434
cd tools && \
35-
python get.py```
35+
python2 get.py```

‎docs/platformio.md

Copy file name to clipboard
+8-9Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
Installation instructions for using PlatformIO
22
=================================================
33

4-
[PlatformIO](http://platformio.org) is an open source ecosystem for IoT development with cross platform build system, library manager and full support for Espressif ESP32 development. It works on the popular host OS: Mac OS X, Windows,Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
5-
6-
- [What is PlatformIO?](http://docs.platformio.org/page/what-is-platformio.html)
7-
- [PlatformIO IDE](http://platformio.org/platformio-ide)
8-
- [PlatformIO Core (CLI)](http://docs.platformio.org/page/core.html)
9-
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/page/ide.html) -
10-
Cloud9, Codeanywehre, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM and Visual Studio
11-
- [Project Examples](https://github.com/platformio/platform-espressif32/tree/develop/examples)
12-
- [Using "Stage" (Git) version of Arduino Core](http://docs.platformio.org/page/platforms/espressif32.html#using-arduino-framework-with-staging-version)
4+
- [What is PlatformIO?](http://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=arduino-esp32)
5+
- [PlatformIO IDE](http://platformio.org/platformio-ide?utm_source=github&utm_medium=arduino-esp32)
6+
- [PlatformIO Core](http://docs.platformio.org/en/latest/core.html?utm_source=github&utm_medium=arduino-esp32) (command line tool)
7+
- [Advanced usage](http://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32) -
8+
custom settings, uploading to SPIFFS, Over-the-Air (OTA), staging version
9+
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/en/latest/ide.html?utm_source=github&utm_medium=arduino-esp32) -
10+
Cloud9, Codeanywhere, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM, Visual Studio, and VSCode
11+
- [Project Examples](http://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32#examples)

‎libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino

Copy file name to clipboardExpand all lines: libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ void setup() {
6565

6666
void loop() {
6767
ArduinoOTA.handle();
68-
}
68+
}

‎libraries/ArduinoOTA/keywords.txt

Copy file name to clipboardExpand all lines: libraries/ArduinoOTA/keywords.txt
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ ArduinoOTA KEYWORD1
1515
begin KEYWORD2
1616
setup KEYWORD2
1717
handle KEYWORD2
18-
onStart KEYWORD2
19-
onEnd KEYWORD2
20-
onError KEYWORD2
21-
onProgress KEYWORD2
18+
onStart KEYWORD2
19+
onEnd KEYWORD2
20+
onError KEYWORD2
21+
onProgress KEYWORD2
2222

2323
#######################################
2424
# Constants (LITERAL1)

‎libraries/BluetoothSerial/README.md

Copy file name to clipboard
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Bluetooth Serial Library
2+
3+
A simple Serial compatible library using ESP32 classical bluetooth (SPP)
4+
5+
6+
7+
#### How to use it?
8+
9+
- Download one bluetooth terminal app in your smartphone<br>
10+
For Android: https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal <br>
11+
For iOS: https://itunes.apple.com/us/app/hm10-bluetooth-serial-lite/id1030454675
12+
13+
- Flash an example sketch to your ESP32
14+
15+
- Scan and pair the device in your smartphone
16+
17+
- Open the bluetooth terminal app
18+
19+
- Enjoy
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//This example code is in the Public Domain (or CC0 licensed, at your option.)
2+
//By Evandro Copercini - 2018
3+
//
4+
//This example creates a bridge between Serial and Classical Bluetooth (SPP)
5+
//and also demonstrate that SerialBT have the same functionalities of a normal Serial
6+
7+
#include "BluetoothSerial.h"
8+
9+
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
10+
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
11+
#endif
12+
13+
BluetoothSerial SerialBT;
14+
15+
void setup() {
16+
Serial.begin(115200);
17+
SerialBT.begin("ESP32test"); //Bluetooth device name
18+
Serial.println("The device started, now you can pair it with bluetooth!");
19+
}
20+
21+
void loop() {
22+
if (Serial.available()) {
23+
SerialBT.write(Serial.read());
24+
}
25+
if (SerialBT.available()) {
26+
Serial.write(SerialBT.read());
27+
}
28+
delay(20);
29+
}
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#######################################
2+
# Syntax Coloring Map For BluetoothSerial
3+
#######################################
4+
5+
#######################################
6+
# Library (KEYWORD3)
7+
#######################################
8+
9+
BluetoothSerial KEYWORD3
10+
11+
#######################################
12+
# Datatypes (KEYWORD1)
13+
#######################################
14+
15+
BluetoothSerial KEYWORD1
16+
17+
#######################################
18+
# Methods and Functions (KEYWORD2)
19+
#######################################
20+
21+
SerialBT KEYWORD2
22+
hasClient KEYWORD2
23+
24+
#######################################
25+
# Constants (LITERAL1)
26+
#######################################
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=BluetoothSerial
2+
version=1.0
3+
author=Evandro Copercini
4+
maintainer=Evandro Copercini
5+
sentence=Simple UART to Classical Bluetooth bridge for ESP32
6+
paragraph=
7+
category=Communication
8+
url=
9+
architectures=esp32

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.