Skip to content

Update of code #1

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 679 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
679 commits
Select commit Hold shift + click to select a range
5f1dff7
IDF release/v3.2 d3e562907 (#3292)
me-no-dev Oct 1, 2019
64cfb33
Add Added unimplemented getCharacteristicsByHandle function (#3277)
tanakamasayuki Oct 1, 2019
71e3d51
Fix BLEUUID toString (#3289)
tanakamasayuki Oct 1, 2019
01d9345
Update development JSON location
me-no-dev Oct 1, 2019
270a275
Add pages action (#3311)
me-no-dev Oct 1, 2019
8a46697
Fix for issue_3209. (#3210)
william-ferguson-au Oct 1, 2019
b334b2c
Add config, menu partition Wrover (#3147)
chio7896 Oct 1, 2019
38c4c06
Support for Master mode, Pin and SSP (#3219)
IonicEV Oct 1, 2019
5ad468f
Add ARM toolchain
me-no-dev Oct 1, 2019
c8e3f0c
Support Pi 4 on 64bit kernel
me-no-dev Oct 1, 2019
85c77a9
Fix CI Builds for Linux (#3313)
me-no-dev Oct 1, 2019
d0b064a
Update CI scripts for better error handling (#3316)
me-no-dev Oct 2, 2019
6f70e27
Base64::encode : const correctness / String by reference passing (#3314)
dirkmueller Oct 2, 2019
4638628
Wait for client.available() to prevent ESP32 crashes (#3154)
paynterf Oct 2, 2019
b10ed77
Update boards_manager.md
me-no-dev Oct 2, 2019
048b265
Update boards_manager.md
me-no-dev Oct 2, 2019
8fb8e7d
CI can be used on windows desktop with msys
me-no-dev Oct 2, 2019
c2b3f2d
Make yield() overridable (#2991)
dok-net Oct 4, 2019
24b277a
Add readFloat to BLE (#3321)
copercini Oct 6, 2019
e506136
Fix typo in SPIFFS and FFAT examples (#3322)
mariansam Oct 6, 2019
0cdfb0b
Add support for WiFi long range mode (#3190)
me-no-dev Oct 6, 2019
9ef3e2d
Allow sketches to have custom partitions (#3328)
me-no-dev Oct 6, 2019
a35035f
fix authrization problem (#3329)
lightzl Oct 8, 2019
79e4339
Remove warnings if no debug enabled (#3334)
luc-github Oct 8, 2019
0cab248
Added a description README.md for libraries (#3349)
lbernstone Oct 14, 2019
611ba8e
Update README.md (#3353)
TechieZee Oct 14, 2019
b847f41
SPI: Ensure all read-only data pointers are marked as const (#3356)
davefiddes Oct 14, 2019
c8d8dc2
Added partition size options for TinyPICO (#3358)
UnexpectedMaker Oct 14, 2019
91e095f
Add an error message in case of invalid configured dependency mbedTLS…
Boldie Oct 17, 2019
188560e
Some event log messages were off by one. (#3391)
xk Nov 11, 2019
ec63d09
Fix WiFiGeneric event handler (#3412)
Nov 11, 2019
e59355d
Docs for lib builder (#3415)
lbernstone Nov 11, 2019
7d2632c
Implement Tx only Flush (#3433)
stickbreaker Nov 11, 2019
547c2d3
Root CA of webserver has changed, minor changes (#3447)
martinius96 Nov 11, 2019
b3085d4
Add menu items Partition Scheme and Debug Level for node32s (#3455)
Nov 11, 2019
8c4ca5a
Update BLE_client.ino (#3463)
takanotume24 Nov 11, 2019
f41beb9
Fixed so configTime will not crash if tcpip is not initialized (#3470)
lbernstone Nov 11, 2019
bc3d113
Fixed incorrect usage of xEventGroupWaitBits (#3446)
wolph Nov 11, 2019
dac493f
SPI: Fix discarded-qalifiers warning when compiling with all warnings…
davefiddes Nov 11, 2019
cec3fca
Fix BluetoothSerial crash when restart (#3471)
rgot-org Nov 11, 2019
9ad8607
Fix Memory leak in addApbChangeCallback() (#3560)
stickbreaker Dec 30, 2019
3fc974f
bugfix(touchpad):swap touch8 and touch9 #3584 (#3620)
TreeNewbeer Jan 9, 2020
d8b2098
Use IDF's ADC Driver and Add analogReadMilliVolts (#3377)
me-no-dev Jan 20, 2020
c09ec5b
Added MGBOT IOTIK 32A and IOTIK 32B boards (#3427)
vrxfile Jan 20, 2020
cfe8526
Add Uri with support for regexUri and globUri (#3441)
Bmooij Jan 20, 2020
8869d39
Created variant for LilyGo TTGO LoRa32-OLED V2 (#3479)
robsonos Jan 20, 2020
7de1717
Fix replacing of headers with overlapping names. Fixes issue #3483 (#…
Jan 20, 2020
3607525
WString explicit converters to reduce Flash size (#3497)
everslick Jan 20, 2020
85ef51f
BLE: reception support multiple service data (#3502)
egrekov Jan 20, 2020
7b3c1df
Fix inability to use all buffers in RMT (#3512)
collin80 Jan 20, 2020
5443d7c
Add TTGO T Journal Camera module & improve commenting (#3515)
WizardTim Jan 20, 2020
579e04b
Cleanup SPI_Multiple_Buses (#3527)
muman613 Jan 20, 2020
2f13a96
Add WIFI_REASON_CONNECTION_FAIL in WiFiGeneric.cpp (#3529)
felixstorm-c4a8 Jan 20, 2020
c2b37d9
Updated BLERemoteCharacteristic to exposre esp_gatt_auth_req_t parame…
cipherz Jan 20, 2020
915d45d
Defined BLE setAdvertisementType (#3535)
syonbori Jan 20, 2020
6e77f7f
Setting loging level to VERBOSE on Semaphore::take (#3545)
I-Connect Jan 20, 2020
0607d36
HardwareSerial::write(const char*, ...) API compatibility to AVR, ESP…
dok-net Jan 20, 2020
dd78794
Update CaptivePortal.ino (#3628)
DanielLester83 Jan 20, 2020
e7c9813
Added Piranha ESP-32 and Metro ESP-32 boards (#3542)
drondistortion Jan 20, 2020
82e208c
Fixed incorrect board name for TinyPICO - You can now use this to det…
UnexpectedMaker Jan 20, 2020
5960cd3
update coreESP32 boards.txt (#3569)
radiumray Jan 20, 2020
86de90f
Added partition and flash size menus for VintLabs boards (#3602)
pvint Jan 20, 2020
89351e3
Update WiFiClient.cpp (#3608)
Vigeant Jan 20, 2020
cb005fc
Extend BLEDevice::setPower() to include powerType parameter. It's opt…
robert-alfaro Jan 20, 2020
8d938c8
Add HONEYLemon board (#3640)
jackrobotics Jan 20, 2020
2195109
Added the channel parameter to the scan fucntion in order to select w…
ingframin Jan 20, 2020
ac9d04a
Add BLEDevice::stopAdvertising() helper method to compliment startAdv…
robert-alfaro Jan 20, 2020
cd85239
Added file.close to examples (#3611)
lbernstone Jan 20, 2020
7637a73
Fix recent commit d8b2098 (PR #3377) which includes esp_adc_cal compo…
robert-alfaro Jan 20, 2020
32d5654
Implement rmtLoop to be able to continuously send pulses (#3650)
me-no-dev Jan 20, 2020
307b136
Implement BTSerial onData to dynamically receive packets from SPP (#3…
me-no-dev Jan 20, 2020
1977370
IDF release/v3.3 (#3339)
me-no-dev Jan 20, 2020
b4a9684
Fix SerialBT.flush (#3579)
mishafarms Jan 20, 2020
ed59ae6
Update README.md (#3653)
kartik-nighania Jan 21, 2020
bb0a194
fix WiFiClient.connected() (#3654)
markyad Jan 21, 2020
b50a175
Use python3 in CI
me-no-dev Jan 25, 2020
80f9f9a
fix removeApbChangeCallback() error in spiStopBus() (#3675)
stickbreaker Jan 26, 2020
ed220bd
Minimize HardwareSerial Receive and Transmit delays (#3664)
hreintke Jan 26, 2020
b2c6788
std::shared_ptr Memory Leak (#3680)
stickbreaker Jan 29, 2020
109ba7a
Revert "std::shared_ptr Memory Leak (#3680)" (#3682)
me-no-dev Jan 29, 2020
9b75c65
Add Senses's WEIZEN board from Senses IoT platform (#3687)
Isaranu Jan 29, 2020
13e0206
Move _STREAM_BOUNDARY before _STREAM_PART (#3720)
abergmann Feb 14, 2020
0f77227
add new board Handbit (#3807)
hznupeter Mar 12, 2020
5508689
Update install-platformio-esp32.sh
me-no-dev Apr 13, 2020
2c9b648
Add support of unified provisioning to Arduino
sweetymhaiske Apr 15, 2020
4d118b3
Minor modifications in provisioning (#3919)
sweetymhaiske Apr 21, 2020
c821531
Add M5Stack-ATOM Board (#3883)
Gitshaoxiang Apr 23, 2020
5d9bb5c
Allow using custom linker scripts (#3735)
valeros May 4, 2020
49b7664
HardwareSerial bugfix & improvement (#3713)
hreintke May 5, 2020
934841e
Added missing wifi_provisioning dependency. (#4003)
PaulMartinsen May 22, 2020
594ee6d
Update SD_MMC.cpp (#4020)
cyberman54 May 22, 2020
79f77af
update M5Camera pins (#4021)
Gitshaoxiang May 22, 2020
09bff50
Add a new board of KITS for IoT education (#3703)
kitsrnd May 29, 2020
35d9759
Fix for issue 3974 m_connectedCount incorrectly decremented when no c…
jamesi8086 May 31, 2020
b92c58d
M5Stack's product offering includes various ESP32-based camera device…
nigel-mellor May 31, 2020
4d98cea
Add Wire:setPins(sda, scl)
me-no-dev Jul 18, 2020
1fd5cd7
Add OTA update feature
sweetymhaiske Aug 25, 2020
9d547a8
Provisioning fixes for: 1.Space 2.Provisioned (#4291)
sweetymhaiske Aug 25, 2020
37a7fb3
Update PlatformIO CI script (#4307)
valeros Aug 31, 2020
cee2359
Update pins_arduino.h (#4211)
Gitshaoxiang Sep 28, 2020
7b613c1
Added documentation regarding delay() resolution in esp-idf component…
ducalex Sep 30, 2020
5999b7b
removed double delete of characteristics (#3521)
rng0x17 Sep 30, 2020
ab23e8a
Greatly reduces error rate (half, or 0 zero errors, depends on in/out…
dok-net Sep 30, 2020
4204869
Extend Print class for 64bit integers. (#3688)
dok-net Sep 30, 2020
7af4490
Update SPI.h
me-no-dev Sep 30, 2020
e4b2ce4
DNS resolving timeout change to prevent stack overlapping (#3731)
asier70 Sep 30, 2020
0dfa5ba
fix typo in WiFiMulti (#3737)
markyad Sep 30, 2020
5871ca9
UpdateClass::printError now accepts the Print object (#3763)
puuu Sep 30, 2020
7a92f89
Set TLS cert options before calling connect on client, so verify work…
kliment Sep 30, 2020
9e65ed1
Process compiler.libraries.ldflags (#3783)
mcdeoliveira Sep 30, 2020
af7ec4e
fix EEPROM class example (#3786)
markyad Sep 30, 2020
daa8c55
add new board mpython (#3814)
hznupeter Sep 30, 2020
9856f0c
Update RMTLoopback.ino (#3823)
jgdent Sep 30, 2020
ef2b545
Fix issue #3833, data parsing of Eddystone TLM data frame (#3836)
beegee-tokyo Sep 30, 2020
e34e0b4
Fixed bug where mutex would not be unlocked (#3837)
admarschoonen Sep 30, 2020
7e9d42d
ESP.getChipModel() and ESP.getChipCores() (#3847)
PA4WD Sep 30, 2020
5197916
Fix BLEClient disconnect bug (#3876)
sindney Sep 30, 2020
8b6d020
added new board Logsens V1p1 (#3880)
satyanraj Sep 30, 2020
80418fa
Fixes UART detach. Fixes #3878 (#3894)
lbernstone Sep 30, 2020
c18d50c
Use esp_partition_* functions in Updater.cpp (#3898)
robertpoll Sep 30, 2020
19ccc47
WIFI_PS_MAX_MODEM feature requested #3896 (#3900)
lbernstone Sep 30, 2020
d219e56
Update pins_arduino.h (#3908)
callifo Sep 30, 2020
4d4a1fd
Added HealthyPi 4 Board Support (#3985)
protocentralashwin Sep 30, 2020
c1a7198
Don't change owner if take() doesnt succeed (#3987)
Bascy Sep 30, 2020
a55265f
Fix clockCyclesPerMicrosecond Change from fixed value to current valu…
tanakamasayuki Sep 30, 2020
f48d901
Update T_Watch board properties and add revision selection (#4025)
lewisxhe Sep 30, 2020
11d071b
Fix to allow more than one certificate to be loaded (espressif#3248).…
pulquero Sep 30, 2020
342b9cf
Fix handling of registerForNotify in BLERemoteCharacteristic.cpp (#4063)
buxtronix Sep 30, 2020
1f6b0b3
Have BLECLient gattc event handlers verify conn_id (#4064)
buxtronix Sep 30, 2020
d56267b
Update GetChipID.ino (#4070)
cweinhofer Sep 30, 2020
fa8a1c3
fix #4071 (#4072)
michael-betz Sep 30, 2020
b7c5e50
Add static pin support (#4078)
chegewara Sep 30, 2020
f30edd0
Update CaptivePortal.ino (#4080)
lbernstone Sep 30, 2020
b551310
Minor change but could confuse some (#4084)
samster395 Sep 30, 2020
2fd3d04
Fix #4046 Details below: (#4086)
geeksville Sep 30, 2020
494061a
WebServer: Fix OOB write (#4088)
Tapped Sep 30, 2020
80e9e42
Fix issue #3522 (WiFi does not restart after stopped) (#4114)
mouridis Sep 30, 2020
4f48cac
Set scan_duplicate in BLE scan params (#4126)
buxtronix Oct 1, 2020
93d850f
Fixed comment with correct FQDN (#4152)
stoey Oct 1, 2020
882b12c
rmdir causes issues in SPIFFS. Fixes #4138, albeit not very cleanly (…
lbernstone Oct 1, 2020
d03f8f1
Update pins_arduino.h (#4190)
jackrobotics Oct 1, 2020
8fcc914
Added facility to invert the polarity of input UART bits. (#4200)
brian-r-calder Oct 1, 2020
c3c38a8
Enable precompiled libraries (#4209)
cpq Oct 1, 2020
6f237a8
Fix ttgo twatch & tbeam board definition error (#4212)
lewisxhe Oct 1, 2020
663effa
Update Parsing.cpp (#4217)
nicolaser15 Oct 1, 2020
86e221d
Update HelloServer.ino (#4219)
jwaitzel Oct 1, 2020
9b2ae12
Added D pin numbers (#4220)
gitolicious Oct 1, 2020
837cc3d
Added SparkFun ESP32 Thing Plus board (#4224)
awende Oct 1, 2020
ee88c42
Add support for following redirects in HTTPClient (#4240)
Clickau Oct 1, 2020
c917ed2
shallow clone to make installation faster (#4246)
dimitre Oct 1, 2020
d93245d
add m5stack-core2 board (#4255)
Gitshaoxiang Oct 1, 2020
0957776
Reinit updater md5 related fields (#4260)
CriPstian Oct 1, 2020
f98fc7e
fix hwSerial tx only flush (#4263)
bertmelis Oct 1, 2020
99c94bb
Set SD state to idle before unregister (reduces power) (#4272)
lbernstone Oct 1, 2020
45d47e2
Fix duplicated pin constant (#4282)
FWeinb Oct 1, 2020
a9cb7c6
mismatched parameter names. Fixes #4310 (#4313)
lbernstone Oct 1, 2020
aa529eb
Fix getString() freeze on empty responses (#4317)
wadimdz Oct 1, 2020
1f4491f
Updated AzureIoT submodule. (#4322)
photomoose Oct 1, 2020
2243081
add I2C_RX_FIFO_OVF_INT_ST handling to i2c_isr_handler_default (#4342)
lienbacher Oct 1, 2020
9e7b13e
WebServer.handleClient delay (#4350)
lbernstone Oct 1, 2020
82670b9
Fix for missed scan response data (BLEScan). (#4358)
jensh Oct 1, 2020
99aa866
Update MDNSResponder::addService to return a boolean (#4365)
thebigpotatoe Oct 1, 2020
8211238
Fix missing headers when compiling as IDF component with Cmake (#4377)
h2zero Oct 1, 2020
af11921
Add support for S.ODI_Ultra_v1.0 (#4372)
SPELECautomations Oct 2, 2020
d2d24a1
add board WiFiduino32 (#4218)
i3water Oct 2, 2020
ccab428
Added definitions for TTGO-LoRA32-V2.1.6 (#4205)
ChrSchultz Oct 2, 2020
219ff30
Add missing slashes in HTTPUpdate examples (#4238)
sasodoma Oct 2, 2020
fb6d5ad
Add Inex OpenKB Board (#4002)
jcubuntu Oct 2, 2020
f76ec4f
adds debugging to dnsserver (#1046)
tablatronix Oct 2, 2020
3570d48
Added the DoIT ESPduino-32 board (#1520)
alexceltare2 Oct 3, 2020
675a40b
Fix Not by reference. But the value was updated. (#3279)
tanakamasayuki Oct 3, 2020
2685a5d
Certificate isn't be free in case parse failure. (#4412)
VoLinhTruc Oct 14, 2020
b07f1c1
Updated Readme.md (#4400)
saptarsi96 Oct 14, 2020
18c3345
fix typos in WiFiSTA.cpp (#4396)
programminghoch10 Oct 14, 2020
c3f3497
fixed some typos (#4395)
programminghoch10 Oct 14, 2020
d8dca9c
bugfix (#4389)
anp135 Oct 14, 2020
ee3bb16
Fix support for following redirects added by ee88c42c3b5e87a2fc09303f…
trandi Oct 14, 2020
831f0ac
Rename eep -> partitions.bin & hex -> bin (#4143)
mjsir911 Oct 14, 2020
d79a1f3
Add an aditional (void *) arg to the RMT callback (much like Ticker()…
dirkx Oct 14, 2020
25bd585
Corrections of Stream.Find, FindUntil and added FindMulti - like AVR-…
ale-trevizoli Oct 14, 2020
1287c52
Add missing "-mlongcalls" flag to PlatformIO build script (#4420)
valeros Oct 16, 2020
ae240a3
Add flash helper constructor to Uri
bmooij-beeliners Oct 19, 2020
7e40de2
Fixes #4435 - WiFiClient improperly treats zero data available for re…
MHotchin Oct 27, 2020
f7fb006
#4293 added missing '<tr>' (#4450)
jellewie Oct 27, 2020
f390246
Don't convert to null-terminated string prior to writeValue (#4473)
snosrap Nov 2, 2020
57145ad
Small description comment correction (#4471)
theMubashir919 Nov 2, 2020
360e04f
Fixing BLE GATT Characteristic notification and Characteristic Descri…
JimmyDurandWesolowski Nov 2, 2020
3cbfa2f
Add partition label argument to SPIFFS (#4443)
thewavelength Nov 2, 2020
cadbad8
Add partition label argument to Update and ArduinoOTA classThe Update…
thewavelength Nov 2, 2020
d6b383f
Merge pull request #4429 from Bmooij/feature/Add_flash_helper_constru…
me-no-dev Nov 2, 2020
d6b9187
Fix for espressif#3460 issue (#4424)
igolubic Nov 2, 2020
1014ba4
Update ISSUE_TEMPLATE.md (#4416)
lbernstone Nov 2, 2020
3054bdf
HTTPUpdateServer library (#4244)
hr-kapanakov Nov 2, 2020
f57c367
Add sendContent overload that takes a const char* and a length (#4276)
nikeee Nov 2, 2020
7c05721
Fix for issue #4158: BLEAdvertising - Crash with stack trace originat…
esikora Nov 2, 2020
704b71d
Fix header parsing
me-no-dev Nov 2, 2020
9f7ff00
Fix parameter to BLEDevice::updatePeerDevice (#4133)
buxtronix Nov 2, 2020
76cd2e2
Fix BLE connection handling (#4137)
buxtronix Nov 2, 2020
0e341a6
Add sdkconfig option CONFIG_ARDUINO_UDP_TASK_PRIORITY, which sets the…
Ivorforce Nov 2, 2020
3491ca7
Add virtual beginMulticast(...) stub to UDP class (#4061)
takeru Nov 2, 2020
c2346c3
Add initial support for arm64 toolchain. (#4117)
Jorropo Nov 2, 2020
dccb4e8
improve & fix BLEScan when wantDuplicates (#3995)
saknarak Nov 2, 2020
76afaf2
Add more options to the AI thinker cam. (#4253)
H3wastooshort Nov 2, 2020
e4b008e
Handle stream timeouts properly, for slow HTTP/HTTPS links (#3752)
nuclearcat Nov 2, 2020
56a7ae8
Trailing spaces (#3738)
MarkusAD Nov 2, 2020
e2452c0
Added isKey method to Preferences (#4441)
lbernstone Nov 3, 2020
6e5be78
Update install-arduino-ide.sh
me-no-dev Nov 3, 2020
22b427d
IDF release/v3.3 (#3672)
me-no-dev Nov 3, 2020
60606e5
Update on-release.sh
me-no-dev Nov 3, 2020
be4d3b6
Try to fix issue with GIT 2.29.0
me-no-dev Nov 3, 2020
90f869e
Fix BUG: Parsing of first line fails (#4484)
FrankBoesing Nov 4, 2020
3968821
HttpClient uses Serial.printf() (#4488)
FrankBoesing Nov 4, 2020
bcb7012
Change variants folder T-Beam (#4496)
TimoWielink Nov 6, 2020
dd1a154
add TimerCAM and CoreInk board (#4498)
Gitshaoxiang Nov 6, 2020
c6a8da6
Allow faster reuse of socket, to be able to restart WifiServer. (#4306)
ahorn42 Nov 6, 2020
ad07d36
Update README.md
me-no-dev Nov 6, 2020
c195167
IDF release/v3.3 66d3783c8
Nov 6, 2020
486a4c6
SDCARD: First sector always written twice if multiple sectors are upd…
me-no-dev Nov 6, 2020
7494c4e
IDF release/v3.3 44ec7972b
Nov 8, 2020
28a8073
Fix issue 4095 (#4503)
MHotchin Nov 8, 2020
534f081
fix bitWrite macro (#4507)
positron96 Nov 9, 2020
3274602
Notify the batteryLevel change (#4517)
Joengenduvel Nov 10, 2020
8816bb5
Added #define LED_BUILTIN to all pins_arduino.h that need it. (#4520)
lbernstone Nov 10, 2020
b6cc108
Update WiFiProv.cpp (#4519)
everslick Nov 10, 2020
a8e99ba
Merge branch 'master' into idf-release/v3.3
me-no-dev Nov 12, 2020
cecef8e
IDF release/v3.3 68b237fe5
Nov 14, 2020
378b6ac
Fix issue in webserver with Chrome based browsers
me-no-dev Nov 15, 2020
d8b1fc8
Added usedBytes to match other filesystems (#4534)
lbernstone Nov 15, 2020
e41fb08
Update esptool to work on BigSur
me-no-dev Nov 15, 2020
954df2f
Disable IRAM optimization for WiFi
me-no-dev Nov 15, 2020
cee7b42
Merge branch 'master' into idf-release/v3.3
me-no-dev Nov 15, 2020
ac9fdef
Allow custom variants directory
loick111 Nov 15, 2020
adafd9d
Merge pull request #4538 from loick111/feature/custom_variants_dir
me-no-dev Nov 15, 2020
a59eb5d
Merge branch 'master' into idf-release/v3.3
me-no-dev Nov 16, 2020
f6bf0f7
IDF release/v3.3 68b237fe5
me-no-dev Nov 16, 2020
6d256b6
IDF release/v3.3 68b237fe5 with Disable IRAM optimisation for WiFi
me-no-dev Nov 16, 2020
dcff2e9
Separate Provisioning library from WiFi library (#4547)
sweetymhaiske Nov 18, 2020
97dcea2
Update library.properties (#4563)
atanisoft Nov 23, 2020
18832bb
M5TimerCam: add LED_BUILTIN & SS/MOSI/MISO/SCK (#4560)
FedericoBusero Nov 23, 2020
6b01143
Fix logic in SPIClass::setHwCs. (#4559)
InvncibiltyCloak Nov 23, 2020
2e12392
IDF release/v3.3 c33fc7821
me-no-dev Dec 1, 2020
82e71f9
Update ssl_client.cpp (#4574)
everslick Dec 1, 2020
3236358
Update WiFiClient.cpp (#4573)
everslick Dec 1, 2020
804c221
Update .gitignore
me-no-dev Dec 1, 2020
aac26a4
[1.0.5] Update Heltec ESP32 series boards definition (#4577)
Heltec-Aaron-Lee Dec 2, 2020
7d5bf9e
[1.0.5] Make looptask stack size configurable (#4564)
coylen Dec 2, 2020
d1a4b3b
Add loop task stack size config to Kconfig
me-no-dev Dec 2, 2020
442c63a
IDF release/v3.3 b4c075169 (#4604)
me-no-dev Dec 7, 2020
b05bdf6
Update esptool for Big Sur
me-no-dev Dec 7, 2020
ef99cd7
Add WiFiClientSecure::setInsecure() to equalize API with ESP8266 (#4648)
me-no-dev Dec 20, 2020
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
Prev Previous commit
Next Next commit
Use IDF's ADC Driver and Add analogReadMilliVolts (espressif#3377)
  • Loading branch information
me-no-dev authored Jan 20, 2020
commit d8b209846131119ad6a84af5987e8625f37900df
228 changes: 97 additions & 131 deletions cores/esp32/esp32-hal-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,96 +22,48 @@
#include "soc/rtc_cntl_reg.h"
#include "soc/sens_reg.h"

#include "driver/adc.h"
#include "esp_adc_cal.h"

#define DEFAULT_VREF 1100
static esp_adc_cal_characteristics_t *__analogCharacteristics[2] = {NULL, NULL};
static uint8_t __analogAttenuation = 3;//11db
static uint8_t __analogWidth = 3;//12 bits
static uint8_t __analogCycles = 8;
static uint8_t __analogSamples = 0;//1 sample
static uint8_t __analogClockDiv = 1;

// Width of returned answer ()
static uint8_t __analogReturnedWidth = 12;
static uint16_t __analogVRef = 0;
static uint8_t __analogVRefPin = 0;

void __analogSetWidth(uint8_t bits){
if(bits < 9){
bits = 9;
} else if(bits > 12){
bits = 12;
}
__analogReturnedWidth = bits;
__analogWidth = bits - 9;
SET_PERI_REG_BITS(SENS_SAR_START_FORCE_REG, SENS_SAR1_BIT_WIDTH, __analogWidth, SENS_SAR1_BIT_WIDTH_S);
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL_REG, SENS_SAR1_SAMPLE_BIT, __analogWidth, SENS_SAR1_SAMPLE_BIT_S);

SET_PERI_REG_BITS(SENS_SAR_START_FORCE_REG, SENS_SAR2_BIT_WIDTH, __analogWidth, SENS_SAR2_BIT_WIDTH_S);
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_SAMPLE_BIT, __analogWidth, SENS_SAR2_SAMPLE_BIT_S);
}

void __analogSetCycles(uint8_t cycles){
__analogCycles = cycles;
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL_REG, SENS_SAR1_SAMPLE_CYCLE, __analogCycles, SENS_SAR1_SAMPLE_CYCLE_S);
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_SAMPLE_CYCLE, __analogCycles, SENS_SAR2_SAMPLE_CYCLE_S);
}

void __analogSetSamples(uint8_t samples){
if(!samples){
return;
}
__analogSamples = samples - 1;
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL_REG, SENS_SAR1_SAMPLE_NUM, __analogSamples, SENS_SAR1_SAMPLE_NUM_S);
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_SAMPLE_NUM, __analogSamples, SENS_SAR2_SAMPLE_NUM_S);
adc1_config_width(__analogWidth);
}

void __analogSetClockDiv(uint8_t clockDiv){
if(!clockDiv){
return;
clockDiv = 1;
}
__analogClockDiv = clockDiv;
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL_REG, SENS_SAR1_CLK_DIV, __analogClockDiv, SENS_SAR1_CLK_DIV_S);
SET_PERI_REG_BITS(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_CLK_DIV, __analogClockDiv, SENS_SAR2_CLK_DIV_S);
adc_set_clk_div(__analogClockDiv);
}

void __analogSetAttenuation(adc_attenuation_t attenuation)
{
__analogAttenuation = attenuation & 3;
uint32_t att_data = 0;
int i = 10;
while(i--){
att_data |= __analogAttenuation << (i * 2);
}
WRITE_PERI_REG(SENS_SAR_ATTEN1_REG, att_data & 0xFFFF);//ADC1 has 8 channels
WRITE_PERI_REG(SENS_SAR_ATTEN2_REG, att_data);
}

void IRAM_ATTR __analogInit(){
void __analogInit(){
static bool initialized = false;
if(initialized){
return;
}

__analogSetAttenuation(__analogAttenuation);
__analogSetCycles(__analogCycles);
__analogSetSamples(__analogSamples + 1);//in samples
initialized = true;
__analogSetClockDiv(__analogClockDiv);
__analogSetWidth(__analogWidth + 9);//in bits

SET_PERI_REG_MASK(SENS_SAR_READ_CTRL_REG, SENS_SAR1_DATA_INV);
SET_PERI_REG_MASK(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_DATA_INV);

SET_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_START_FORCE_M); //SAR ADC1 controller (in RTC) is started by SW
SET_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_SAR1_EN_PAD_FORCE_M); //SAR ADC1 pad enable bitmap is controlled by SW
SET_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_START_FORCE_M); //SAR ADC2 controller (in RTC) is started by SW
SET_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_SAR2_EN_PAD_FORCE_M); //SAR ADC2 pad enable bitmap is controlled by SW

CLEAR_PERI_REG_MASK(SENS_SAR_MEAS_WAIT2_REG, SENS_FORCE_XPD_SAR_M); //force XPD_SAR=0, use XPD_FSM
SET_PERI_REG_BITS(SENS_SAR_MEAS_WAIT2_REG, SENS_FORCE_XPD_AMP, 0x2, SENS_FORCE_XPD_AMP_S); //force XPD_AMP=0

CLEAR_PERI_REG_MASK(SENS_SAR_MEAS_CTRL_REG, 0xfff << SENS_AMP_RST_FB_FSM_S); //clear FSM
SET_PERI_REG_BITS(SENS_SAR_MEAS_WAIT1_REG, SENS_SAR_AMP_WAIT1, 0x1, SENS_SAR_AMP_WAIT1_S);
SET_PERI_REG_BITS(SENS_SAR_MEAS_WAIT1_REG, SENS_SAR_AMP_WAIT2, 0x1, SENS_SAR_AMP_WAIT2_S);
SET_PERI_REG_BITS(SENS_SAR_MEAS_WAIT2_REG, SENS_SAR_AMP_WAIT3, 0x1, SENS_SAR_AMP_WAIT3_S);
while (GET_PERI_REG_BITS2(SENS_SAR_SLAVE_ADDR1_REG, 0x7, SENS_MEAS_STATUS_S) != 0); //wait det_fsm==

initialized = true;
}

void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
Expand All @@ -120,21 +72,20 @@ void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
if(channel < 0 || attenuation > 3){
return ;
}
__analogInit();
if(channel > 7){
SET_PERI_REG_BITS(SENS_SAR_ATTEN2_REG, 3, attenuation, ((channel - 10) * 2));
if(channel > 9){
adc2_config_channel_atten(channel - 10, attenuation);
} else {
SET_PERI_REG_BITS(SENS_SAR_ATTEN1_REG, 3, attenuation, (channel * 2));
adc1_config_channel_atten(channel, attenuation);
}
__analogInit();
}

bool IRAM_ATTR __adcAttachPin(uint8_t pin){

bool __adcAttachPin(uint8_t pin){
int8_t channel = digitalPinToAnalogChannel(pin);
if(channel < 0){
return false;//not adc pin
log_e("Pin %u is not ADC pin!", pin);
return false;
}

int8_t pad = digitalPinToTouchChannel(pin);
if(pad >= 0){
uint32_t touch = READ_PERI_REG(SENS_SAR_TOUCH_ENABLE_REG);
Expand All @@ -151,86 +102,103 @@ bool IRAM_ATTR __adcAttachPin(uint8_t pin){
}

pinMode(pin, ANALOG);

__analogInit();
__analogSetPinAttenuation(pin, __analogAttenuation);
return true;
}

bool IRAM_ATTR __adcStart(uint8_t pin){
void __analogReadResolution(uint8_t bits)
{
if(!bits || bits > 16){
return;
}
__analogSetWidth(bits); // hadware from 9 to 12
}

uint16_t __analogRead(uint8_t pin)
{
int8_t channel = digitalPinToAnalogChannel(pin);
int value = 0;
esp_err_t r = ESP_OK;
if(channel < 0){
return false;//not adc pin
log_e("Pin %u is not ADC pin!", pin);
return value;
}

__adcAttachPin(pin);
if(channel > 9){
channel -= 10;
CLEAR_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_START_SAR_M);
SET_PERI_REG_BITS(SENS_SAR_MEAS_START2_REG, SENS_SAR2_EN_PAD, (1 << channel), SENS_SAR2_EN_PAD_S);
SET_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_START_SAR_M);
r = adc2_get_raw( channel, __analogWidth, &value);
if ( r == ESP_OK ) {
return value;
} else if ( r == ESP_ERR_INVALID_STATE ) {
log_e("GPIO%u: %s: ADC2 not initialized yet.", pin, esp_err_to_name(r));
} else if ( r == ESP_ERR_TIMEOUT ) {
log_e("GPIO%u: %s: ADC2 is in use by Wi-Fi.", pin, esp_err_to_name(r));
} else {
log_e("GPIO%u: %s", pin, esp_err_to_name(r));
}
} else {
CLEAR_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_START_SAR_M);
SET_PERI_REG_BITS(SENS_SAR_MEAS_START1_REG, SENS_SAR1_EN_PAD, (1 << channel), SENS_SAR1_EN_PAD_S);
SET_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_START_SAR_M);
return adc1_get_raw(channel);
}
return true;
return value;
}

bool IRAM_ATTR __adcBusy(uint8_t pin){

int8_t channel = digitalPinToAnalogChannel(pin);
if(channel < 0){
return false;//not adc pin
}

if(channel > 7){
return (GET_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_DONE_SAR) == 0);
void __analogSetVRefPin(uint8_t pin){
if(pin <25 || pin > 27){
pin = 0;
}
return (GET_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_DONE_SAR) == 0);
__analogVRefPin = pin;
}

uint16_t IRAM_ATTR __adcEnd(uint8_t pin)
{

uint16_t value = 0;
uint32_t __analogReadMilliVolts(uint8_t pin){
int8_t channel = digitalPinToAnalogChannel(pin);
if(channel < 0){
return 0;//not adc pin
}
if(channel > 7){
while (GET_PERI_REG_MASK(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_DONE_SAR) == 0); //wait for conversion
value = GET_PERI_REG_BITS2(SENS_SAR_MEAS_START2_REG, SENS_MEAS2_DATA_SAR, SENS_MEAS2_DATA_SAR_S);
} else {
while (GET_PERI_REG_MASK(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_DONE_SAR) == 0); //wait for conversion
value = GET_PERI_REG_BITS2(SENS_SAR_MEAS_START1_REG, SENS_MEAS1_DATA_SAR, SENS_MEAS1_DATA_SAR_S);
}

// Shift result if necessary
uint8_t from = __analogWidth + 9;
if (from == __analogReturnedWidth) {
return value;
log_e("Pin %u is not ADC pin!", pin);
return 0;
}
if (from > __analogReturnedWidth) {
return value >> (from - __analogReturnedWidth);
if(!__analogVRef){
if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP) == ESP_OK) {
log_d("eFuse Two Point: Supported");
__analogVRef = DEFAULT_VREF;
}
if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_VREF) == ESP_OK) {
log_d("eFuse Vref: Supported");
__analogVRef = DEFAULT_VREF;
}
if(!__analogVRef){
__analogVRef = DEFAULT_VREF;
if(__analogVRefPin){
esp_adc_cal_characteristics_t chars;
if(adc2_vref_to_gpio(__analogVRefPin) == ESP_OK){
__analogVRef = __analogRead(__analogVRefPin);
esp_adc_cal_characterize(1, __analogAttenuation, __analogWidth, DEFAULT_VREF, &chars);
__analogVRef = esp_adc_cal_raw_to_voltage(__analogVRef, &chars);
log_d("Vref to GPIO%u: %u", __analogVRefPin, __analogVRef);
}
}
}
}
return value << (__analogReturnedWidth - from);
}

uint16_t IRAM_ATTR __analogRead(uint8_t pin)
{
if(!__adcAttachPin(pin) || !__adcStart(pin)){
return 0;
uint8_t unit = 1;
if(channel > 9){
unit = 2;
}
return __adcEnd(pin);
}

void __analogReadResolution(uint8_t bits)
{
if(!bits || bits > 16){
return;
uint16_t adc_reading = __analogRead(pin);
if(__analogCharacteristics[unit - 1] == NULL){
__analogCharacteristics[unit - 1] = calloc(1, sizeof(esp_adc_cal_characteristics_t));
if(__analogCharacteristics[unit - 1] == NULL){
return 0;
}
esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, __analogAttenuation, __analogWidth, __analogVRef, __analogCharacteristics[unit - 1]);
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
log_i("ADC%u: Characterized using Two Point Value: %u\n", unit, __analogCharacteristics[unit - 1]->vref);
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
log_i("ADC%u: Characterized using eFuse Vref: %u\n", unit, __analogCharacteristics[unit - 1]->vref);
} else if(__analogVRef != DEFAULT_VREF){
log_i("ADC%u: Characterized using Vref to GPIO%u: %u\n", unit, __analogVRefPin, __analogCharacteristics[unit - 1]->vref);
} else {
log_i("ADC%u: Characterized using Default Vref: %u\n", unit, __analogCharacteristics[unit - 1]->vref);
}
}
__analogSetWidth(bits); // hadware from 9 to 12
__analogReturnedWidth = bits; // software from 1 to 16
return esp_adc_cal_raw_to_voltage(adc_reading, __analogCharacteristics[unit - 1]);
}

int __hallRead() //hall sensor without LNA
Expand Down Expand Up @@ -260,14 +228,12 @@ int __hallRead() //hall sensor without LNA
extern uint16_t analogRead(uint8_t pin) __attribute__ ((weak, alias("__analogRead")));
extern void analogReadResolution(uint8_t bits) __attribute__ ((weak, alias("__analogReadResolution")));
extern void analogSetWidth(uint8_t bits) __attribute__ ((weak, alias("__analogSetWidth")));
extern void analogSetCycles(uint8_t cycles) __attribute__ ((weak, alias("__analogSetCycles")));
extern void analogSetSamples(uint8_t samples) __attribute__ ((weak, alias("__analogSetSamples")));
extern void analogSetClockDiv(uint8_t clockDiv) __attribute__ ((weak, alias("__analogSetClockDiv")));
extern void analogSetAttenuation(adc_attenuation_t attenuation) __attribute__ ((weak, alias("__analogSetAttenuation")));
extern void analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation) __attribute__ ((weak, alias("__analogSetPinAttenuation")));
extern int hallRead() __attribute__ ((weak, alias("__hallRead")));

extern bool adcAttachPin(uint8_t pin) __attribute__ ((weak, alias("__adcAttachPin")));
extern bool adcStart(uint8_t pin) __attribute__ ((weak, alias("__adcStart")));
extern bool adcBusy(uint8_t pin) __attribute__ ((weak, alias("__adcBusy")));
extern uint16_t adcEnd(uint8_t pin) __attribute__ ((weak, alias("__adcEnd")));

extern void analogSetVRefPin(uint8_t pin) __attribute__ ((weak, alias("__analogSetVRefPin")));
extern uint32_t analogReadMilliVolts(uint8_t pin) __attribute__ ((weak, alias("__analogReadMilliVolts")));
40 changes: 4 additions & 36 deletions cores/esp32/esp32-hal-adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,6 @@ void analogReadResolution(uint8_t bits);
* */
void analogSetWidth(uint8_t bits);

/*
* Set number of cycles per sample
* Default is 8 and seems to do well
* Range is 1 - 255
* */
void analogSetCycles(uint8_t cycles);

/*
* Set number of samples in the range.
* Default is 1
* Range is 1 - 255
* This setting splits the range into
* "samples" pieces, which could look
* like the sensitivity has been multiplied
* that many times
* */
void analogSetSamples(uint8_t samples);

/*
* Set the divider for the ADC clock.
* Default is 1
Expand All @@ -97,34 +79,20 @@ void analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation);
* */
int hallRead();

/*
* Non-Blocking API (almost)
*
* Note: ADC conversion can run only for single pin at a time.
* That means that if you want to run ADC on two pins on the same bus,
* you need to run them one after another. Probably the best use would be
* to start conversion on both buses in parallel.
* */

/*
* Attach pin to ADC (will also clear any other analog mode that could be on)
* */
bool adcAttachPin(uint8_t pin);

/*
* Start ADC conversion on attached pin's bus
* */
bool adcStart(uint8_t pin);

/*
* Check if conversion on the pin's ADC bus is currently running
* Set pin to use for ADC calibration if the esp is not already calibrated (25, 26 or 27)
* */
bool adcBusy(uint8_t pin);
void analogSetVRefPin(uint8_t pin);

/*
* Get the result of the conversion (will wait if it have not finished)
* Get MilliVolts value for pin
* */
uint16_t adcEnd(uint8_t pin);
uint32_t analogReadMilliVolts(uint8_t pin);

#ifdef __cplusplus
}
Expand Down