forked from espressif/arduino-esp32
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
77810471ce | |||
be081ac026 | |||
4d3f6caa0d | |||
2db811f7f3 | |||
39836f12df | |||
25fd2d0f3b | |||
278fa0d87a | |||
b37f4069e4 | |||
e602145c2b | |||
6f6ee98188 | |||
1289f4be4b | |||
70f000da71 | |||
884e417a49 | |||
bb7dea1566 | |||
bff9f0b6b1 | |||
72803703fd | |||
0596a2ac86 | |||
fe1fdd2790 | |||
af7e489f01 | |||
5cfff190e9 | |||
7a332864ab | |||
8aa6e2e143 | |||
b5f317010c | |||
f644d9d157 | |||
a15b7e9088 | |||
ce340faf94 | |||
b69b04cb2b | |||
0cbba8a71d | |||
9e1f8cc457 | |||
cfe7e01158 | |||
fcd734a13c |
@ -7,6 +7,9 @@ python:
|
||||
os:
|
||||
- linux
|
||||
|
||||
git:
|
||||
depth: false
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "l/4Dt+KQ/mACtGAHDUsPr66fUte840PZoQ4xpPikqWZI0uARu4l+Ym7+sHinnT6fBqrj8AJeBYGz4nFa8NK4LutZn9mSD40w+sxl0wSV4oHV8rzKe3Cd8+sMG3+o33yWoikMNjSvqa73Q0rm+SgrlInNdZbuAyixL+a2alaWSnGPm4F2xwUGj+S33TOy5P/Xp77CYtCV5S8vzyk/eEdNhoF0GYePJVdfuzCOUjXMyT5OWxORkzzQ7Hnn/Ka/RDfV8Si4HgujLQBrK5q6iPnNBFqBSqilYBepSMn4opnOBpIm0SCgePz7XQEFC83buA7GUcnCnfg38bf+dCwHaODf1d1PmqVRYt2QmfinexXtM4afAtL0iBUDtvrfnXHzwW9w82VeZhpbJSVh9DUQvB0IlsZeCz9J9PUBAi3N+SMX+9l+BomYwRUlPuKY+Ef2JKk9q6mxtUkky5R0daAlVxEhpVdQks1rT+T+NMoDMemxQ3SKEiqAHh6EgHecruszffmZ71uLX9MpERpew0qN+UFiafws+jkTjx+3yF9yut0Hf9sMbeAYzzkGzRqJTUEBJ6B29Cql8M0yRXCNN/8wuuTHhG8esstozga4ZQoIVrq7mEAgup376PTcNfr1+imbbWVQ7lJdYIuDe6OS5V3OX6np11vgK/DbhfyzvQv9Z1zAGnM="
|
||||
|
@ -150,6 +150,8 @@ set(BLE_SRCS
|
||||
libraries/BLE/src/BLEDescriptor.cpp
|
||||
libraries/BLE/src/BLEDescriptorMap.cpp
|
||||
libraries/BLE/src/BLEDevice.cpp
|
||||
libraries/BLE/src/BLEEddystoneTLM.cpp
|
||||
libraries/BLE/src/BLEEddystoneURL.cpp
|
||||
libraries/BLE/src/BLEExceptions.cpp
|
||||
libraries/BLE/src/BLEHIDDevice.cpp
|
||||
libraries/BLE/src/BLERemoteCharacteristic.cpp
|
||||
|
96
boards.txt
96
boards.txt
@ -10,7 +10,7 @@ menu.PSRAM=PSRAM
|
||||
|
||||
esp32.name=ESP32 Dev Module
|
||||
|
||||
esp32.upload.tool=esptool
|
||||
esp32.upload.tool=esptool_py
|
||||
esp32.upload.maximum_size=1310720
|
||||
esp32.upload.maximum_data_size=327680
|
||||
esp32.upload.wait_for_upload_port=true
|
||||
@ -108,7 +108,7 @@ esp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
esp32wrover.name=ESP32 Wrover Module
|
||||
|
||||
esp32wrover.upload.tool=esptool
|
||||
esp32wrover.upload.tool=esptool_py
|
||||
esp32wrover.upload.maximum_size=1310720
|
||||
esp32wrover.upload.maximum_data_size=327680
|
||||
esp32wrover.upload.wait_for_upload_port=true
|
||||
@ -190,7 +190,7 @@ esp32wrover.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
pico32.name=ESP32 Pico Kit
|
||||
|
||||
pico32.upload.tool=esptool
|
||||
pico32.upload.tool=esptool_py
|
||||
pico32.upload.maximum_size=1310720
|
||||
pico32.upload.maximum_data_size=327680
|
||||
pico32.upload.wait_for_upload_port=true
|
||||
@ -243,7 +243,7 @@ pico32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
ttgo-lora32-v1.name=TTGO LoRa32-OLED V1
|
||||
|
||||
ttgo-lora32-v1.upload.tool=esptool
|
||||
ttgo-lora32-v1.upload.tool=esptool_py
|
||||
ttgo-lora32-v1.upload.maximum_size=1310720
|
||||
ttgo-lora32-v1.upload.maximum_data_size=294912
|
||||
ttgo-lora32-v1.upload.wait_for_upload_port=true
|
||||
@ -299,7 +299,7 @@ ttgo-lora32-v1.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
cw02.name=XinaBox CW02
|
||||
|
||||
cw02.upload.tool=esptool
|
||||
cw02.upload.tool=esptool_py
|
||||
cw02.upload.maximum_size=1310720
|
||||
cw02.upload.maximum_data_size=294912
|
||||
cw02.upload.wait_for_upload_port=true
|
||||
@ -375,7 +375,7 @@ cw02.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
esp32thing.name=SparkFun ESP32 Thing
|
||||
|
||||
esp32thing.upload.tool=esptool
|
||||
esp32thing.upload.tool=esptool_py
|
||||
esp32thing.upload.maximum_size=1310720
|
||||
esp32thing.upload.maximum_data_size=327680
|
||||
esp32thing.upload.wait_for_upload_port=true
|
||||
@ -442,7 +442,7 @@ esp32thing.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
nina_w10.name=u-blox NINA-W10 series (ESP32)
|
||||
|
||||
nina_w10.upload.tool=esptool
|
||||
nina_w10.upload.tool=esptool_py
|
||||
nina_w10.upload.maximum_size=1310720
|
||||
nina_w10.upload.maximum_data_size=327680
|
||||
nina_w10.upload.wait_for_upload_port=true
|
||||
@ -481,7 +481,7 @@ nina_w10.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
widora-air.name=Widora AIR
|
||||
|
||||
widora-air.upload.tool=esptool
|
||||
widora-air.upload.tool=esptool_py
|
||||
widora-air.upload.maximum_size=1310720
|
||||
widora-air.upload.maximum_data_size=327680
|
||||
widora-air.upload.wait_for_upload_port=true
|
||||
@ -525,7 +525,7 @@ widora-air.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
esp320.name=Electronic SweetPeas - ESP320
|
||||
|
||||
esp320.upload.tool=esptool
|
||||
esp320.upload.tool=esptool_py
|
||||
esp320.upload.maximum_size=1310720
|
||||
esp320.upload.maximum_data_size=327680
|
||||
esp320.upload.wait_for_upload_port=true
|
||||
@ -569,7 +569,7 @@ esp320.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
nano32.name=Nano32
|
||||
|
||||
nano32.upload.tool=esptool
|
||||
nano32.upload.tool=esptool_py
|
||||
nano32.upload.maximum_size=1310720
|
||||
nano32.upload.maximum_data_size=327680
|
||||
nano32.upload.wait_for_upload_port=true
|
||||
@ -613,7 +613,7 @@ nano32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
d32.name=LOLIN D32
|
||||
|
||||
d32.upload.tool=esptool
|
||||
d32.upload.tool=esptool_py
|
||||
d32.upload.maximum_size=1310720
|
||||
d32.upload.maximum_data_size=327680
|
||||
d32.upload.wait_for_upload_port=true
|
||||
@ -686,7 +686,7 @@ d32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
d32_pro.name=LOLIN D32 PRO
|
||||
|
||||
d32_pro.upload.tool=esptool
|
||||
d32_pro.upload.tool=esptool_py
|
||||
d32_pro.upload.maximum_size=1310720
|
||||
d32_pro.upload.maximum_data_size=327680
|
||||
d32_pro.upload.wait_for_upload_port=true
|
||||
@ -764,7 +764,7 @@ d32_pro.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
lolin32.name=WEMOS LOLIN32
|
||||
|
||||
lolin32.upload.tool=esptool
|
||||
lolin32.upload.tool=esptool_py
|
||||
lolin32.upload.maximum_size=1310720
|
||||
lolin32.upload.maximum_data_size=327680
|
||||
lolin32.upload.wait_for_upload_port=true
|
||||
@ -817,7 +817,7 @@ lolin32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
pocket_32.name=Dongsen Tech Pocket 32
|
||||
|
||||
pocket_32.upload.tool=esptool
|
||||
pocket_32.upload.tool=esptool_py
|
||||
pocket_32.upload.maximum_size=1310720
|
||||
pocket_32.upload.maximum_data_size=327680
|
||||
pocket_32.upload.wait_for_upload_port=true
|
||||
@ -861,7 +861,7 @@ pocket_32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
WeMosBat.name="WeMos" WiFi&Bluetooth Battery
|
||||
|
||||
WeMosBat.upload.tool=esptool
|
||||
WeMosBat.upload.tool=esptool_py
|
||||
WeMosBat.upload.maximum_size=1310720
|
||||
WeMosBat.upload.maximum_data_size=327680
|
||||
WeMosBat.upload.wait_for_upload_port=true
|
||||
@ -918,7 +918,7 @@ WeMosBat.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
espea32.name=ESPea32
|
||||
|
||||
espea32.upload.tool=esptool
|
||||
espea32.upload.tool=esptool_py
|
||||
espea32.upload.maximum_size=1310720
|
||||
espea32.upload.maximum_data_size=327680
|
||||
espea32.upload.wait_for_upload_port=true
|
||||
@ -962,7 +962,7 @@ espea32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
quantum.name=Noduino Quantum
|
||||
|
||||
quantum.upload.tool=esptool
|
||||
quantum.upload.tool=esptool_py
|
||||
quantum.upload.maximum_size=1310720
|
||||
quantum.upload.maximum_data_size=327680
|
||||
quantum.upload.wait_for_upload_port=true
|
||||
@ -1006,7 +1006,7 @@ quantum.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
node32s.name=Node32s
|
||||
|
||||
node32s.upload.tool=esptool
|
||||
node32s.upload.tool=esptool_py
|
||||
node32s.upload.maximum_size=1310720
|
||||
node32s.upload.maximum_data_size=327680
|
||||
node32s.upload.wait_for_upload_port=true
|
||||
@ -1050,7 +1050,7 @@ node32s.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
hornbill32dev.name=Hornbill ESP32 Dev
|
||||
|
||||
hornbill32dev.upload.tool=esptool
|
||||
hornbill32dev.upload.tool=esptool_py
|
||||
hornbill32dev.upload.maximum_size=1310720
|
||||
hornbill32dev.upload.maximum_data_size=327680
|
||||
hornbill32dev.upload.wait_for_upload_port=true
|
||||
@ -1094,7 +1094,7 @@ hornbill32dev.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
hornbill32minima.name=Hornbill ESP32 Minima
|
||||
|
||||
hornbill32minima.upload.tool=esptool
|
||||
hornbill32minima.upload.tool=esptool_py
|
||||
hornbill32minima.upload.maximum_size=1310720
|
||||
hornbill32minima.upload.maximum_data_size=327680
|
||||
hornbill32minima.upload.wait_for_upload_port=true
|
||||
@ -1137,7 +1137,7 @@ hornbill32minima.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
firebeetle32.name=FireBeetle-ESP32
|
||||
|
||||
firebeetle32.upload.tool=esptool
|
||||
firebeetle32.upload.tool=esptool_py
|
||||
firebeetle32.upload.maximum_size=1310720
|
||||
firebeetle32.upload.maximum_data_size=327680
|
||||
firebeetle32.upload.wait_for_upload_port=true
|
||||
@ -1181,7 +1181,7 @@ firebeetle32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
intorobot-fig.name=IntoRobot Fig
|
||||
|
||||
intorobot-fig.upload.tool=esptool
|
||||
intorobot-fig.upload.tool=esptool_py
|
||||
intorobot-fig.upload.maximum_size=1310720
|
||||
intorobot-fig.upload.maximum_data_size=327680
|
||||
intorobot-fig.upload.wait_for_upload_port=true
|
||||
@ -1225,7 +1225,7 @@ intorobot-fig.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
onehorse32dev.name=Onehorse ESP32 Dev Module
|
||||
|
||||
onehorse32dev.upload.tool=esptool
|
||||
onehorse32dev.upload.tool=esptool_py
|
||||
onehorse32dev.upload.maximum_size=1310720
|
||||
onehorse32dev.upload.maximum_data_size=327680
|
||||
onehorse32dev.upload.wait_for_upload_port=true
|
||||
@ -1269,7 +1269,7 @@ onehorse32dev.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
featheresp32.name=Adafruit ESP32 Feather
|
||||
|
||||
featheresp32.upload.tool=esptool
|
||||
featheresp32.upload.tool=esptool_py
|
||||
featheresp32.upload.maximum_size=1310720
|
||||
featheresp32.upload.maximum_data_size=327680
|
||||
featheresp32.upload.wait_for_upload_port=true
|
||||
@ -1326,7 +1326,7 @@ featheresp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
nodemcu-32s.name=NodeMCU-32S
|
||||
|
||||
nodemcu-32s.upload.tool=esptool
|
||||
nodemcu-32s.upload.tool=esptool_py
|
||||
nodemcu-32s.upload.maximum_size=1310720
|
||||
nodemcu-32s.upload.maximum_data_size=327680
|
||||
nodemcu-32s.upload.wait_for_upload_port=true
|
||||
@ -1370,7 +1370,7 @@ nodemcu-32s.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
mhetesp32devkit.name=MH ET LIVE ESP32DevKIT
|
||||
|
||||
mhetesp32devkit.upload.tool=esptool
|
||||
mhetesp32devkit.upload.tool=esptool_py
|
||||
mhetesp32devkit.upload.maximum_size=1310720
|
||||
mhetesp32devkit.upload.maximum_data_size=327680
|
||||
mhetesp32devkit.upload.wait_for_upload_port=true
|
||||
@ -1436,7 +1436,7 @@ mhetesp32devkit.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
mhetesp32minikit.name=MH ET LIVE ESP32MiniKit
|
||||
|
||||
mhetesp32minikit.upload.tool=esptool
|
||||
mhetesp32minikit.upload.tool=esptool_py
|
||||
mhetesp32minikit.upload.maximum_size=1310720
|
||||
mhetesp32minikit.upload.maximum_data_size=327680
|
||||
mhetesp32minikit.upload.wait_for_upload_port=true
|
||||
@ -1502,7 +1502,7 @@ mhetesp32minikit.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
esp32vn-iot-uno.name=ESP32vn IoT Uno
|
||||
|
||||
esp32vn-iot-uno.upload.tool=esptool
|
||||
esp32vn-iot-uno.upload.tool=esptool_py
|
||||
esp32vn-iot-uno.upload.maximum_size=1310720
|
||||
esp32vn-iot-uno.upload.maximum_data_size=327680
|
||||
esp32vn-iot-uno.upload.wait_for_upload_port=true
|
||||
@ -1546,7 +1546,7 @@ esp32vn-iot-uno.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
esp32doit-devkit-v1.name=DOIT ESP32 DEVKIT V1
|
||||
|
||||
esp32doit-devkit-v1.upload.tool=esptool
|
||||
esp32doit-devkit-v1.upload.tool=esptool_py
|
||||
esp32doit-devkit-v1.upload.maximum_size=1310720
|
||||
esp32doit-devkit-v1.upload.maximum_data_size=327680
|
||||
esp32doit-devkit-v1.upload.wait_for_upload_port=true
|
||||
@ -1601,7 +1601,7 @@ esp32doit-devkit-v1.menu.DebugLevel.debug.build.code_debug=4
|
||||
|
||||
esp32-evb.name=OLIMEX ESP32-EVB
|
||||
|
||||
esp32-evb.upload.tool=esptool
|
||||
esp32-evb.upload.tool=esptool_py
|
||||
esp32-evb.upload.maximum_size=1310720
|
||||
esp32-evb.upload.maximum_data_size=327680
|
||||
esp32-evb.upload.wait_for_upload_port=true
|
||||
@ -1634,7 +1634,7 @@ esp32-evb.menu.UploadSpeed.115200.upload.speed=115200
|
||||
|
||||
esp32-gateway.name=OLIMEX ESP32-GATEWAY
|
||||
|
||||
esp32-gateway.upload.tool=esptool
|
||||
esp32-gateway.upload.tool=esptool_py
|
||||
esp32-gateway.upload.maximum_size=1310720
|
||||
esp32-gateway.upload.maximum_data_size=327680
|
||||
esp32-gateway.upload.wait_for_upload_port=true
|
||||
@ -1667,7 +1667,7 @@ esp32-gateway.menu.UploadSpeed.115200.upload.speed=115200
|
||||
|
||||
esp32-poe.name=OLIMEX ESP32-PoE
|
||||
|
||||
esp32-poe.upload.tool=esptool
|
||||
esp32-poe.upload.tool=esptool_py
|
||||
esp32-poe.upload.maximum_size=1310720
|
||||
esp32-poe.upload.maximum_data_size=327680
|
||||
esp32-poe.upload.wait_for_upload_port=true
|
||||
@ -1700,7 +1700,7 @@ esp32-poe.menu.UploadSpeed.115200.upload.speed=115200
|
||||
|
||||
espino32.name=ThaiEasyElec's ESPino32
|
||||
|
||||
espino32.upload.tool=esptool
|
||||
espino32.upload.tool=esptool_py
|
||||
espino32.upload.maximum_size=1310720
|
||||
espino32.upload.maximum_data_size=327680
|
||||
espino32.upload.wait_for_upload_port=true
|
||||
@ -1744,7 +1744,7 @@ espino32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
m5stack-core-esp32.name=M5Stack-Core-ESP32
|
||||
|
||||
m5stack-core-esp32.upload.tool=esptool
|
||||
m5stack-core-esp32.upload.tool=esptool_py
|
||||
m5stack-core-esp32.upload.maximum_size=1310720
|
||||
m5stack-core-esp32.upload.maximum_data_size=327680
|
||||
m5stack-core-esp32.upload.wait_for_upload_port=true
|
||||
@ -1823,7 +1823,7 @@ m5stack-core-esp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
m5stack-fire.name=M5Stack-FIRE
|
||||
|
||||
m5stack-fire.upload.tool=esptool
|
||||
m5stack-fire.upload.tool=esptool_py
|
||||
m5stack-fire.upload.maximum_size=6553600
|
||||
m5stack-fire.upload.maximum_data_size=4521984
|
||||
m5stack-fire.upload.wait_for_upload_port=true
|
||||
@ -1887,7 +1887,7 @@ m5stack-fire.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
odroid_esp32.name=ODROID ESP32
|
||||
|
||||
odroid_esp32.upload.tool=esptool
|
||||
odroid_esp32.upload.tool=esptool_py
|
||||
odroid_esp32.upload.maximum_size=1310720
|
||||
odroid_esp32.upload.maximum_data_size=327680
|
||||
odroid_esp32.upload.wait_for_upload_port=true
|
||||
@ -1966,7 +1966,7 @@ odroid_esp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
heltec_wifi_kit_32.name=Heltec_WIFI_Kit_32
|
||||
|
||||
heltec_wifi_kit_32.upload.tool=esptool
|
||||
heltec_wifi_kit_32.upload.tool=esptool_py
|
||||
heltec_wifi_kit_32.upload.maximum_size=1310720
|
||||
heltec_wifi_kit_32.upload.maximum_data_size=327680
|
||||
heltec_wifi_kit_32.upload.wait_for_upload_port=true
|
||||
@ -2010,7 +2010,7 @@ heltec_wifi_kit_32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
heltec_wifi_lora_32.name=Heltec_WIFI_LoRa_32
|
||||
|
||||
heltec_wifi_lora_32.upload.tool=esptool
|
||||
heltec_wifi_lora_32.upload.tool=esptool_py
|
||||
heltec_wifi_lora_32.upload.maximum_size=1310720
|
||||
heltec_wifi_lora_32.upload.maximum_data_size=327680
|
||||
heltec_wifi_lora_32.upload.wait_for_upload_port=true
|
||||
@ -2054,7 +2054,7 @@ heltec_wifi_lora_32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
espectro32.name=ESPectro32
|
||||
|
||||
espectro32.upload.tool=esptool
|
||||
espectro32.upload.tool=esptool_py
|
||||
espectro32.upload.maximum_size=1310720
|
||||
espectro32.upload.maximum_data_size=327680
|
||||
espectro32.upload.wait_for_upload_port=true
|
||||
@ -2130,7 +2130,7 @@ espectro32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
##############################################################
|
||||
CoreESP32.name=Microduino-CoreESP32
|
||||
|
||||
CoreESP32.upload.tool=esptool
|
||||
CoreESP32.upload.tool=esptool_py
|
||||
CoreESP32.upload.maximum_size=1310720
|
||||
CoreESP32.upload.maximum_data_size=327680
|
||||
CoreESP32.upload.wait_for_upload_port=true
|
||||
@ -2175,7 +2175,7 @@ CoreESP32.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
alksesp32.name=ALKS ESP32
|
||||
|
||||
alksesp32.upload.tool=esptool
|
||||
alksesp32.upload.tool=esptool_py
|
||||
alksesp32.upload.maximum_size=1310720
|
||||
alksesp32.upload.maximum_data_size=327680
|
||||
alksesp32.upload.wait_for_upload_port=true
|
||||
@ -2264,7 +2264,7 @@ alksesp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
wipy3.name=WiPy 3.0
|
||||
|
||||
wipy3.upload.tool=esptool
|
||||
wipy3.upload.tool=esptool_py
|
||||
wipy3.upload.maximum_size=1310720
|
||||
wipy3.upload.maximum_data_size=294912
|
||||
wipy3.upload.wait_for_upload_port=true
|
||||
@ -2321,7 +2321,7 @@ wipy3.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
bpi-bit.name=BPI-BIT
|
||||
|
||||
bpi-bit.upload.tool=esptool
|
||||
bpi-bit.upload.tool=esptool_py
|
||||
bpi-bit.upload.maximum_size=1310720
|
||||
bpi-bit.upload.maximum_data_size=294912
|
||||
bpi-bit.upload.wait_for_upload_port=true
|
||||
@ -2364,7 +2364,7 @@ bpi-bit.menu.UploadSpeed.512000.upload.speed=512000
|
||||
|
||||
wesp32.name=Silicognition wESP32
|
||||
|
||||
wesp32.upload.tool=esptool
|
||||
wesp32.upload.tool=esptool_py
|
||||
wesp32.upload.maximum_size=1310720
|
||||
wesp32.upload.maximum_data_size=327680
|
||||
wesp32.upload.wait_for_upload_port=true
|
||||
@ -2421,7 +2421,7 @@ wesp32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
t-beam.name=T-Beam
|
||||
|
||||
t-beam.upload.tool=esptool
|
||||
t-beam.upload.tool=esptool_py
|
||||
t-beam.upload.maximum_size=1310720
|
||||
t-beam.upload.maximum_data_size=327680
|
||||
t-beam.upload.wait_for_upload_port=true
|
||||
@ -2482,7 +2482,7 @@ t-beam.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
d-duino-32.name=D-duino-32
|
||||
|
||||
d-duino-32.upload.tool=esptool
|
||||
d-duino-32.upload.tool=esptool_py
|
||||
d-duino-32.upload.maximum_size=1310720
|
||||
d-duino-32.upload.maximum_data_size=327680
|
||||
d-duino-32.upload.wait_for_upload_port=true
|
||||
@ -2553,7 +2553,7 @@ d-duino-32.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
lopy.name=LoPy
|
||||
|
||||
lopy.upload.tool=esptool
|
||||
lopy.upload.tool=esptool_py
|
||||
lopy.upload.maximum_size=1310720
|
||||
lopy.upload.maximum_data_size=327680
|
||||
lopy.upload.wait_for_upload_port=true
|
||||
@ -2609,7 +2609,7 @@ lopy.menu.DebugLevel.verbose.build.code_debug=5
|
||||
|
||||
lopy4.name=LoPy4
|
||||
|
||||
lopy4.upload.tool=esptool
|
||||
lopy4.upload.tool=esptool_py
|
||||
lopy4.upload.maximum_size=1310720
|
||||
lopy4.upload.maximum_data_size=327680
|
||||
lopy4.upload.wait_for_upload_port=true
|
||||
|
@ -26,10 +26,11 @@
|
||||
#include <soc/soc.h>
|
||||
#include <soc/efuse_reg.h>
|
||||
#include <esp_partition.h>
|
||||
#include <esp_ota_ops.h>
|
||||
extern "C" {
|
||||
#include <esp_image_format.h>
|
||||
#include "esp_ota_ops.h"
|
||||
#include "esp_image_format.h"
|
||||
}
|
||||
#include <MD5Builder.h>
|
||||
|
||||
/**
|
||||
* User-defined Literals
|
||||
@ -156,7 +157,7 @@ static uint32_t sketchSize(sketchSize_t response) {
|
||||
.size = running->size,
|
||||
};
|
||||
data.start_addr = running_pos.offset;
|
||||
esp_image_load(ESP_IMAGE_VERIFY, &running_pos, &data);
|
||||
esp_image_verify(ESP_IMAGE_VERIFY, &running_pos, &data);
|
||||
if (response) {
|
||||
return running_pos.size - data.image_len;
|
||||
} else {
|
||||
@ -168,8 +169,53 @@ uint32_t EspClass::getSketchSize () {
|
||||
return sketchSize(SKETCH_SIZE_TOTAL);
|
||||
}
|
||||
|
||||
String EspClass::getSketchMD5()
|
||||
{
|
||||
static String result;
|
||||
if (result.length()) {
|
||||
return result;
|
||||
}
|
||||
uint32_t lengthLeft = getSketchSize();
|
||||
|
||||
const esp_partition_t *running = esp_ota_get_running_partition();
|
||||
if (!running) {
|
||||
log_e("Partition could not be found");
|
||||
|
||||
return String();
|
||||
}
|
||||
const size_t bufSize = SPI_FLASH_SEC_SIZE;
|
||||
std::unique_ptr<uint8_t[]> buf(new uint8_t[bufSize]);
|
||||
uint32_t offset = 0;
|
||||
if(!buf.get()) {
|
||||
log_e("Not enough memory to allocate buffer");
|
||||
|
||||
return String();
|
||||
}
|
||||
MD5Builder md5;
|
||||
md5.begin();
|
||||
while( lengthLeft > 0) {
|
||||
size_t readBytes = (lengthLeft < bufSize) ? lengthLeft : bufSize;
|
||||
if (!ESP.flashRead(running->address + offset, reinterpret_cast<uint32_t*>(buf.get()), (readBytes + 3) & ~3)) {
|
||||
log_e("Could not read buffer from flash");
|
||||
|
||||
return String();
|
||||
}
|
||||
md5.add(buf.get(), readBytes);
|
||||
lengthLeft -= readBytes;
|
||||
offset += readBytes;
|
||||
}
|
||||
md5.calculate();
|
||||
result = md5.toString();
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t EspClass::getFreeSketchSpace () {
|
||||
return sketchSize(SKETCH_SIZE_FREE);
|
||||
const esp_partition_t* _partition = esp_ota_get_next_update_partition(NULL);
|
||||
if(!_partition){
|
||||
return 0;
|
||||
}
|
||||
|
||||
return _partition->size;
|
||||
}
|
||||
|
||||
uint8_t EspClass::getChipRevision(void)
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
FlashMode_t magicFlashChipMode(uint8_t byte);
|
||||
|
||||
uint32_t getSketchSize();
|
||||
String getSketchMD5();
|
||||
uint32_t getFreeSketchSpace();
|
||||
|
||||
bool flashEraseSector(uint32_t sector);
|
||||
|
@ -63,7 +63,7 @@ size_t Print::printf(const char *format, ...)
|
||||
len = vsnprintf(temp, len+1, format, arg);
|
||||
write((uint8_t*)temp, len);
|
||||
va_end(arg);
|
||||
if(len > 64){
|
||||
if(len >= sizeof(loc_buf)){
|
||||
delete[] temp;
|
||||
}
|
||||
return len;
|
||||
|
@ -248,9 +248,10 @@ static void IRAM_ATTR i2cDumpCmdQueue(i2c_t *i2c)
|
||||
|
||||
/* Stickbreaker ISR mode debug support
|
||||
*/
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
|
||||
static void i2cDumpDqData(i2c_t * i2c)
|
||||
{
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)&&(defined ENABLE_I2C_DEBUG_BUFFER)
|
||||
#if defined (ENABLE_I2C_DEBUG_BUFFER)
|
||||
uint16_t a=0;
|
||||
char buff[140];
|
||||
I2C_DATA_QUEUE_t *tdq;
|
||||
@ -306,9 +307,12 @@ static void i2cDumpDqData(i2c_t * i2c)
|
||||
}
|
||||
a++;
|
||||
}
|
||||
#else
|
||||
log_i("Debug Buffer not Enabled");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
|
||||
static void i2cDumpI2c(i2c_t * i2c)
|
||||
{
|
||||
log_e("i2c=%p",i2c);
|
||||
@ -332,11 +336,12 @@ static void i2cDumpI2c(i2c_t * i2c)
|
||||
i2cDumpDqData(i2c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
|
||||
static void i2cDumpInts(uint8_t num)
|
||||
{
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO) && (defined ENABLE_I2C_DEBUG_BUFFER)
|
||||
|
||||
#if defined (ENABLE_I2C_DEBUG_BUFFER)
|
||||
uint32_t b;
|
||||
log_i("%u row\tcount\tINTR\tTX\tRX\tTick ",num);
|
||||
for(uint32_t a=1; a<=INTBUFFMAX; a++) {
|
||||
@ -349,9 +354,10 @@ static void i2cDumpInts(uint8_t num)
|
||||
log_i("Debug Buffer not Enabled");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static void IRAM_ATTR i2cDumpStatus(i2c_t * i2c){
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)&&(defined ENABLE_I2C_DEBUG_BUFFER)
|
||||
static void IRAM_ATTR i2cDumpStatus(i2c_t * i2c){
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t ack_rec: 1; /*This register stores the value of ACK bit.*/
|
||||
@ -377,11 +383,11 @@ static void IRAM_ATTR i2cDumpStatus(i2c_t * i2c){
|
||||
sr.val= i2c->dev->status_reg.val;
|
||||
|
||||
log_i("ack(%d) sl_rw(%d) to(%d) arb(%d) busy(%d) sl(%d) trans(%d) rx(%d) tx(%d) sclMain(%d) scl(%d)",sr.ack_rec,sr.slave_rw,sr.time_out,sr.arb_lost,sr.bus_busy,sr.slave_addressed,sr.byte_trans, sr.rx_fifo_cnt, sr.tx_fifo_cnt,sr.scl_main_state_last, sr.scl_state_last);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static void i2cDumpFifo(i2c_t * i2c){
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)&&(defined ENABLE_I2C_DEBUG_BUFFER)
|
||||
static void i2cDumpFifo(i2c_t * i2c){
|
||||
char buf[64];
|
||||
uint16_t k = 0;
|
||||
uint16_t i = fifoPos+1;
|
||||
@ -422,8 +428,8 @@ if(i != fifoPos){// actual data
|
||||
}
|
||||
}while( i!= fifoPos);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static void IRAM_ATTR i2cTriggerDumps(i2c_t * i2c, uint8_t trigger, const char locus[]){
|
||||
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)&&(defined ENABLE_I2C_DEBUG_BUFFER)
|
||||
@ -1142,7 +1148,7 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)
|
||||
if(tdq->ctrl.addrReq ==2) { // 10bit address
|
||||
taddr =((tdq->ctrl.addr >> 7) & 0xFE)
|
||||
|tdq->ctrl.mode;
|
||||
taddr = (taddr <<8) || (tdq->ctrl.addr&0xFF);
|
||||
taddr = (taddr <<8) | (tdq->ctrl.addr&0xFF);
|
||||
} else { // 7bit address
|
||||
taddr = ((tdq->ctrl.addr<<1)&0xFE)
|
||||
|tdq->ctrl.mode;
|
||||
|
@ -21,7 +21,9 @@
|
||||
#include "esp_partition.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_timer.h"
|
||||
#ifdef CONFIG_BT_ENABLED
|
||||
#include "esp_bt.h"
|
||||
#endif //CONFIG_BT_ENABLED
|
||||
#include <sys/time.h>
|
||||
#include "esp32-hal.h"
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
static void setTimeZone(long offset, int daylight)
|
||||
{
|
||||
char cst[16] = {0};
|
||||
char cdt[16] = "DST";
|
||||
char tz[32] = {0};
|
||||
char cst[17] = {0};
|
||||
char cdt[17] = "DST";
|
||||
char tz[33] = {0};
|
||||
|
||||
if(offset % 3600){
|
||||
sprintf(cst, "UTC%ld:%02u:%02u", offset / 3600, abs((offset % 3600) / 60), abs(offset % 60));
|
||||
|
Submodule libraries/BLE updated: 7951347ed6...b232e7f5f0
97
libraries/ESP32/examples/FreeRTOS/FreeRTOS.ino
Normal file
97
libraries/ESP32/examples/FreeRTOS/FreeRTOS.ino
Normal file
@ -0,0 +1,97 @@
|
||||
#if CONFIG_FREERTOS_UNICORE
|
||||
#define ARDUINO_RUNNING_CORE 0
|
||||
#else
|
||||
#define ARDUINO_RUNNING_CORE 1
|
||||
#endif
|
||||
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN 13
|
||||
#endif
|
||||
|
||||
// define two tasks for Blink & AnalogRead
|
||||
void TaskBlink( void *pvParameters );
|
||||
void TaskAnalogReadA3( void *pvParameters );
|
||||
|
||||
// the setup function runs once when you press reset or power the board
|
||||
void setup() {
|
||||
|
||||
// initialize serial communication at 115200 bits per second:
|
||||
Serial.begin(115200);
|
||||
|
||||
// Now set up two tasks to run independently.
|
||||
xTaskCreatePinnedToCore(
|
||||
TaskBlink
|
||||
, "TaskBlink" // A name just for humans
|
||||
, 1024 // This stack size can be checked & adjusted by reading the Stack Highwater
|
||||
, NULL
|
||||
, 2 // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest.
|
||||
, NULL
|
||||
, ARDUINO_RUNNING_CORE);
|
||||
|
||||
xTaskCreatePinnedToCore(
|
||||
TaskAnalogReadA3
|
||||
, "AnalogReadA3"
|
||||
, 1024 // Stack size
|
||||
, NULL
|
||||
, 1 // Priority
|
||||
, NULL
|
||||
, ARDUINO_RUNNING_CORE);
|
||||
|
||||
// Now the task scheduler, which takes over control of scheduling individual tasks, is automatically started.
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// Empty. Things are done in Tasks.
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/*---------------------- Tasks ---------------------*/
|
||||
/*--------------------------------------------------*/
|
||||
|
||||
void TaskBlink(void *pvParameters) // This is a task.
|
||||
{
|
||||
(void) pvParameters;
|
||||
|
||||
/*
|
||||
Blink
|
||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
||||
|
||||
If you want to know what pin the on-board LED is connected to on your ESP32 model, check
|
||||
the Technical Specs of your board.
|
||||
*/
|
||||
|
||||
// initialize digital LED_BUILTIN on pin 13 as an output.
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
|
||||
for (;;) // A Task shall never return or exit.
|
||||
{
|
||||
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
|
||||
vTaskDelay(100); // one tick delay (15ms) in between reads for stability
|
||||
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
|
||||
vTaskDelay(100); // one tick delay (15ms) in between reads for stability
|
||||
}
|
||||
}
|
||||
|
||||
void TaskAnalogReadA3(void *pvParameters) // This is a task.
|
||||
{
|
||||
(void) pvParameters;
|
||||
|
||||
/*
|
||||
AnalogReadSerial
|
||||
Reads an analog input on pin A3, prints the result to the serial monitor.
|
||||
Graphical representation is available using serial plotter (Tools > Serial Plotter menu)
|
||||
Attach the center pin of a potentiometer to pin A3, and the outside pins to +5V and ground.
|
||||
|
||||
This example code is in the public domain.
|
||||
*/
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// read the input on analog pin A3:
|
||||
int sensorValueA3 = analogRead(A3);
|
||||
// print out the value you read:
|
||||
Serial.println(sensorValueA3);
|
||||
vTaskDelay(10); // one tick delay (15ms) in between reads for stability
|
||||
}
|
||||
}
|
@ -43,6 +43,14 @@ License (MIT license):
|
||||
#include <functional>
|
||||
#include "esp_wifi.h"
|
||||
|
||||
// Add quotes around defined value
|
||||
#ifdef __IN_ECLIPSE__
|
||||
#define STR_EXPAND(tok) #tok
|
||||
#define STR(tok) STR_EXPAND(tok)
|
||||
#else
|
||||
#define STR(tok) tok
|
||||
#endif
|
||||
|
||||
static void _on_sys_event(system_event_t *event){
|
||||
mdns_handle_system_event(NULL, event);
|
||||
}
|
||||
@ -82,7 +90,7 @@ void MDNSResponder::setInstanceName(String name) {
|
||||
|
||||
void MDNSResponder::enableArduino(uint16_t port, bool auth){
|
||||
mdns_txt_item_t arduTxtData[4] = {
|
||||
{(char*)"board" ,(char*)ARDUINO_VARIANT},
|
||||
{(char*)"board" ,(char*)STR(ARDUINO_VARIANT)},
|
||||
{(char*)"tcp_check" ,(char*)"no"},
|
||||
{(char*)"ssh_upload" ,(char*)"no"},
|
||||
{(char*)"auth_upload" ,(char*)"no"}
|
||||
|
@ -56,7 +56,7 @@ void loop() {
|
||||
|
||||
switch (ret) {
|
||||
case HTTP_UPDATE_FAILED:
|
||||
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s\n", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str());
|
||||
Serial.printf("HTTP_UPDATE_FAILED Error (%d): %s\n", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str());
|
||||
break;
|
||||
|
||||
case HTTP_UPDATE_NO_UPDATES:
|
||||
|
@ -49,14 +49,20 @@ HTTPUpdate::~HTTPUpdate(void)
|
||||
HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& url, const String& currentVersion)
|
||||
{
|
||||
HTTPClient http;
|
||||
http.begin(client, url);
|
||||
if(!http.begin(client, url))
|
||||
{
|
||||
return HTTP_UPDATE_FAILED;
|
||||
}
|
||||
return handleUpdate(http, currentVersion, false);
|
||||
}
|
||||
|
||||
HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion)
|
||||
{
|
||||
HTTPClient http;
|
||||
http.begin(client, url);
|
||||
if(!http.begin(client, url))
|
||||
{
|
||||
return HTTP_UPDATE_FAILED;
|
||||
}
|
||||
return handleUpdate(http, currentVersion, true);
|
||||
}
|
||||
|
||||
@ -64,7 +70,10 @@ HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& host, uint
|
||||
const String& currentVersion)
|
||||
{
|
||||
HTTPClient http;
|
||||
http.begin(client, host, port, uri);
|
||||
if(!http.begin(client, host, port, uri))
|
||||
{
|
||||
return HTTP_UPDATE_FAILED;
|
||||
}
|
||||
return handleUpdate(http, currentVersion, false);
|
||||
}
|
||||
|
||||
@ -93,31 +102,33 @@ String HTTPUpdate::getLastErrorString(void)
|
||||
StreamString error;
|
||||
Update.printError(error);
|
||||
error.trim(); // remove line ending
|
||||
return String(F("Update error: ")) + error;
|
||||
return String("Update error: ") + error;
|
||||
}
|
||||
|
||||
// error from http client
|
||||
if(_lastError > -100) {
|
||||
return String(F("HTTP error: ")) + HTTPClient::errorToString(_lastError);
|
||||
return String("HTTP error: ") + HTTPClient::errorToString(_lastError);
|
||||
}
|
||||
|
||||
switch(_lastError) {
|
||||
case HTTP_UE_TOO_LESS_SPACE:
|
||||
return F("Not Enough space");
|
||||
return "Not Enough space";
|
||||
case HTTP_UE_SERVER_NOT_REPORT_SIZE:
|
||||
return F("Server Did Not Report Size");
|
||||
return "Server Did Not Report Size";
|
||||
case HTTP_UE_SERVER_FILE_NOT_FOUND:
|
||||
return F("File Not Found (404)");
|
||||
return "File Not Found (404)";
|
||||
case HTTP_UE_SERVER_FORBIDDEN:
|
||||
return F("Forbidden (403)");
|
||||
return "Forbidden (403)";
|
||||
case HTTP_UE_SERVER_WRONG_HTTP_CODE:
|
||||
return F("Wrong HTTP Code");
|
||||
return "Wrong HTTP Code";
|
||||
case HTTP_UE_SERVER_FAULTY_MD5:
|
||||
return F("Wrong MD5");
|
||||
return "Wrong MD5";
|
||||
case HTTP_UE_BIN_VERIFY_HEADER_FAILED:
|
||||
return F("Verify Bin Header Failed");
|
||||
return "Verify Bin Header Failed";
|
||||
case HTTP_UE_BIN_FOR_WRONG_FLASH:
|
||||
return F("New Binary Does Not Fit Flash Size");
|
||||
return "New Binary Does Not Fit Flash Size";
|
||||
case HTTP_UE_NO_PARTITION:
|
||||
return "Partition Could Not be Found";
|
||||
}
|
||||
|
||||
return String();
|
||||
@ -164,29 +175,32 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient& http, const String& curren
|
||||
// use HTTP/1.0 for update since the update handler not support any transfer Encoding
|
||||
http.useHTTP10(true);
|
||||
http.setTimeout(_httpClientTimeout);
|
||||
http.setUserAgent(F("ESP32-http-Update"));
|
||||
http.addHeader(F("Cache-Control"), F("no-cache"));
|
||||
http.addHeader(F("x-ESP32-STA-MAC"), WiFi.macAddress());
|
||||
http.addHeader(F("x-ESP32-AP-MAC"), WiFi.softAPmacAddress());
|
||||
http.addHeader(F("x-ESP32-free-space"), String(ESP.getFreeSketchSpace()));
|
||||
http.addHeader(F("x-ESP32-sketch-size"), String(ESP.getSketchSize()));
|
||||
// To do http.addHeader(F("x-ESP32-sketch-md5"), String(ESP.getSketchMD5()));
|
||||
// Sketch MD5 is not supported by the core, but SHA256 is, so add a SHA256 instead
|
||||
http.setUserAgent("ESP32-http-Update");
|
||||
http.addHeader("Cache-Control", "no-cache");
|
||||
http.addHeader("x-ESP32-STA-MAC", WiFi.macAddress());
|
||||
http.addHeader("x-ESP32-AP-MAC", WiFi.softAPmacAddress());
|
||||
http.addHeader("x-ESP32-free-space", String(ESP.getFreeSketchSpace()));
|
||||
http.addHeader("x-ESP32-sketch-size", String(ESP.getSketchSize()));
|
||||
String sketchMD5 = ESP.getSketchMD5();
|
||||
if(sketchMD5.length() != 0) {
|
||||
http.addHeader("x-ESP32-sketch-md5", sketchMD5);
|
||||
}
|
||||
// Add also a SHA256
|
||||
String sketchSHA256 = getSketchSHA256();
|
||||
if(sketchSHA256.length() != 0) {
|
||||
http.addHeader(F("x-ESP32-sketch-sha256"), sketchSHA256);
|
||||
http.addHeader("x-ESP32-sketch-sha256", sketchSHA256);
|
||||
}
|
||||
http.addHeader(F("x-ESP32-chip-size"), String(ESP.getFlashChipSize()));
|
||||
http.addHeader(F("x-ESP32-sdk-version"), ESP.getSdkVersion());
|
||||
http.addHeader("x-ESP32-chip-size", String(ESP.getFlashChipSize()));
|
||||
http.addHeader("x-ESP32-sdk-version", ESP.getSdkVersion());
|
||||
|
||||
if(spiffs) {
|
||||
http.addHeader(F("x-ESP32-mode"), F("spiffs"));
|
||||
http.addHeader("x-ESP32-mode", "spiffs");
|
||||
} else {
|
||||
http.addHeader(F("x-ESP32-mode"), F("sketch"));
|
||||
http.addHeader("x-ESP32-mode", "sketch");
|
||||
}
|
||||
|
||||
if(currentVersion && currentVersion[0] != 0x00) {
|
||||
http.addHeader(F("x-ESP32-version"), currentVersion);
|
||||
http.addHeader("x-ESP32-version", currentVersion);
|
||||
}
|
||||
|
||||
const char * headerkeys[] = { "x-MD5" };
|
||||
@ -229,14 +243,25 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient& http, const String& curren
|
||||
if(len > 0) {
|
||||
bool startUpdate = true;
|
||||
if(spiffs) {
|
||||
// To do size_t spiffsSize = ((size_t) &_SPIFFS_end - (size_t) &_SPIFFS_start);
|
||||
// To do if(len > (int) spiffsSize) {
|
||||
// To do log_e("spiffsSize to low (%d) needed: %d\n", spiffsSize, len);
|
||||
// To do startUpdate = false;
|
||||
// To do }
|
||||
const esp_partition_t* _partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_SPIFFS, NULL);
|
||||
if(!_partition){
|
||||
_lastError = HTTP_UE_NO_PARTITION;
|
||||
return HTTP_UPDATE_FAILED;
|
||||
}
|
||||
|
||||
if(len > _partition->size) {
|
||||
log_e("spiffsSize to low (%d) needed: %d\n", _partition->size, len);
|
||||
startUpdate = false;
|
||||
}
|
||||
} else {
|
||||
if(len > (int) ESP.getFreeSketchSpace()) {
|
||||
log_e("FreeSketchSpace to low (%d) needed: %d\n", ESP.getFreeSketchSpace(), len);
|
||||
int sketchFreeSpace = ESP.getFreeSketchSpace();
|
||||
if(!sketchFreeSpace){
|
||||
_lastError = HTTP_UE_NO_PARTITION;
|
||||
return HTTP_UPDATE_FAILED;
|
||||
}
|
||||
|
||||
if(len > sketchFreeSpace) {
|
||||
log_e("FreeSketchSpace to low (%d) needed: %d\n", sketchFreeSpace, len);
|
||||
startUpdate = false;
|
||||
}
|
||||
}
|
||||
@ -366,6 +391,8 @@ bool HTTPUpdate::runUpdate(Stream& in, uint32_t size, String md5, int command)
|
||||
}
|
||||
}
|
||||
|
||||
// To do: the SHA256 could be checked if the server sends it
|
||||
|
||||
if(Update.writeStream(in) != size) {
|
||||
_lastError = Update.getError();
|
||||
Update.printError(error);
|
||||
|
@ -42,6 +42,7 @@
|
||||
#define HTTP_UE_SERVER_FAULTY_MD5 (-105)
|
||||
#define HTTP_UE_BIN_VERIFY_HEADER_FAILED (-106)
|
||||
#define HTTP_UE_BIN_FOR_WRONG_FLASH (-107)
|
||||
#define HTTP_UE_NO_PARTITION (-108)
|
||||
|
||||
enum HTTPUpdateResult {
|
||||
HTTP_UPDATE_FAILED,
|
||||
|
@ -16,7 +16,7 @@ extern "C" {
|
||||
#include "diskio.h"
|
||||
#include "ffconf.h"
|
||||
#include "ff.h"
|
||||
#include "esp_vfs.h"
|
||||
//#include "esp_vfs.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
char CRC7(const char* data, int length);
|
||||
unsigned short CRC16(const char* data, int length);
|
||||
|
@ -214,6 +214,11 @@ void SPIClass::writeBytes(uint8_t * data, uint32_t size)
|
||||
spiEndTransaction(_spi);
|
||||
}
|
||||
|
||||
void SPIClass::transfer(uint8_t * data, uint32_t size)
|
||||
{
|
||||
transferBytes(data, data, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data void *
|
||||
* @param size uint32_t
|
||||
|
@ -65,10 +65,11 @@ public:
|
||||
|
||||
void beginTransaction(SPISettings settings);
|
||||
void endTransaction(void);
|
||||
|
||||
void transfer(uint8_t * data, uint32_t size);
|
||||
uint8_t transfer(uint8_t data);
|
||||
uint16_t transfer16(uint16_t data);
|
||||
uint32_t transfer32(uint32_t data);
|
||||
|
||||
void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
|
||||
void transferBits(uint32_t data, uint32_t * out, uint8_t bits);
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|University|Board|Method|Result|
|
||||
|-------------|-------------| -----|------|
|
||||
|Technical University in Košice (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working|
|
||||
|Technical University in Košice (Slovakia)|ESP32 DevKitc v4|PEAP + MsCHAPv2|Working|
|
||||
|Technical University in Košice (Slovakia)|ESP32 Devmodule v4|PEAP + MsCHAPv2|Working on 6th attempt in loop|
|
||||
|Slovak Technical University in Bratislava (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working|
|
||||
|University of Antwerp (Belgium)|Lolin32|PEAP + MsCHAPv2|Working|
|
||||
|UPV Universitat Politècnica de València (Spain)|ESP32 Devmodule v4|PEAP + MsCHAPv2|Working|
|
||||
@ -27,7 +27,8 @@
|
||||
|Universidad de Granada (Spain)|Lolin D32 Pro|PEAP + MsCHAPv2|Working|
|
||||
|Universidad de Granada (Spain)|Lolin D32|PEAP + MsCHAPv2|Working|
|
||||
|Universidade Federal de Santa Catarina (Brazil)|xxx|EAP-TTLS + MsCHAPv2|Working|
|
||||
|University of Regensburg (Germany)|Lolin32|PEAP + MsCHAPv2|Working|
|
||||
|University of Central Florida (Orlando, Florida)|ESP32 Built-in OLED – Heltec WiFi Kit 32|PEAP + MsCHAPv2|Working|
|
||||
|Université de Montpellier (France)|NodeMCU-32S|PEAP + MsCHAPv2|Working|
|
||||
|
||||
# Common errors - Switch to Debug mode for Serial monitor prints
|
||||
|Error|Appearance|Solution|
|
||||
|
@ -398,7 +398,8 @@ int WiFiClient::peek()
|
||||
|
||||
int WiFiClient::available()
|
||||
{
|
||||
if(!_connected) {
|
||||
if(!_rxBuffer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int res = _rxBuffer->available();
|
||||
@ -439,6 +440,8 @@ uint8_t WiFiClient::connected()
|
||||
if (_connected) {
|
||||
uint8_t dummy;
|
||||
int res = recv(fd(), &dummy, 0, MSG_DONTWAIT);
|
||||
// avoid unused var warning by gcc
|
||||
(void)res;
|
||||
switch (errno) {
|
||||
case EWOULDBLOCK:
|
||||
case ENOENT: //caused by vfs
|
||||
|
@ -96,7 +96,7 @@ static bool _start_network_event_task(){
|
||||
}
|
||||
}
|
||||
if(!_network_event_task_handle){
|
||||
xTaskCreatePinnedToCore(_network_event_task, "network_event", 4096, NULL, 2, &_network_event_task_handle, ARDUINO_RUNNING_CORE);
|
||||
xTaskCreatePinnedToCore(_network_event_task, "network_event", 4096, NULL, ESP_TASKD_EVENT_PRIO - 1, &_network_event_task_handle, ARDUINO_RUNNING_CORE);
|
||||
if(!_network_event_task_handle){
|
||||
log_e("Network Event Task Start Failed!");
|
||||
return false;
|
||||
|
@ -118,16 +118,12 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
||||
status = WiFi.status();
|
||||
}
|
||||
|
||||
IPAddress ip;
|
||||
uint8_t * mac;
|
||||
switch(status) {
|
||||
case 3:
|
||||
ip = WiFi.localIP();
|
||||
mac = WiFi.BSSID();
|
||||
log_i("[WIFI] Connecting done.");
|
||||
log_d("[WIFI] SSID: %s", WiFi.SSID().c_str());
|
||||
log_d("[WIFI] IP: %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
|
||||
log_d("[WIFI] MAC: %02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
log_d("[WIFI] IP: %s", WiFi.localIP().toString().c_str());
|
||||
log_d("[WIFI] MAC: %s", WiFi.BSSIDstr().c_str());
|
||||
log_d("[WIFI] Channel: %d", WiFi.channel());
|
||||
break;
|
||||
case 1:
|
||||
|
@ -683,8 +683,10 @@ void WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
|
||||
smartconfig_status_t status = (smartconfig_status_t) st;
|
||||
log_d("Status: %s", sc_status_strings[st % 5]);
|
||||
if (status == SC_STATUS_GETTING_SSID_PSWD) {
|
||||
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
|
||||
smartconfig_type_t * type = (smartconfig_type_t *)result;
|
||||
log_d("Type: %s", sc_type_strings[*type % 3]);
|
||||
#endif
|
||||
} else if (status == SC_STATUS_LINK) {
|
||||
wifi_sta_config_t *sta_conf = reinterpret_cast<wifi_sta_config_t *>(result);
|
||||
log_d("SSID: %s", (char *)(sta_conf->ssid));
|
||||
@ -694,8 +696,10 @@ void WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
|
||||
_smartConfigDone = true;
|
||||
} else if (status == SC_STATUS_LINK_OVER) {
|
||||
if(result){
|
||||
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
|
||||
ip4_addr_t * ip = (ip4_addr_t *)result;
|
||||
log_d("Sender IP: " IPSTR, IP2STR(ip));
|
||||
#endif
|
||||
}
|
||||
WiFi.stopSmartConfig();
|
||||
}
|
||||
|
67
libraries/WiFiClientSecure/README.md
Normal file
67
libraries/WiFiClientSecure/README.md
Normal file
@ -0,0 +1,67 @@
|
||||
WiFiClientSecure
|
||||
================
|
||||
|
||||
The WiFiClientSecure class implements support for secure connections using TLS (SSL).
|
||||
It inherits from WiFiClient and thus implements a superset of that class' interface.
|
||||
There are three ways to establish a secure connection using the WiFiClientSecure class:
|
||||
using a root certificate authority (CA) cert, using a root CA cert plus a client cert and key,
|
||||
and using a pre-shared key (PSK).
|
||||
|
||||
Using a root certificate authority cert
|
||||
---------------------------------------
|
||||
This method authenticates the server and negotiates an encrypted connection.
|
||||
It is the same functionality as implemented in your web browser when you connect to HTTPS sites.
|
||||
|
||||
If you are accessing your own server:
|
||||
- Generate a root certificate for your own certificate authority
|
||||
- Generate a cert & private key using your root certificate ("self-signed cert") for your server
|
||||
If you are accessing a public server:
|
||||
- Obtain the cert of the public CA that signed that server's cert
|
||||
Then:
|
||||
- In WiFiClientSecure use setCACert (or the appropriate connect method) to set the root cert of your
|
||||
CA or of the public CA
|
||||
- When WiFiClientSecure connects to the target server it uses the CA cert to verify the certificate
|
||||
presented by the server, and then negotiates encryption for the connection
|
||||
|
||||
Please see the WiFiClientSecure example.
|
||||
|
||||
Using a root CA cert and client cert/keys
|
||||
-----------------------------------------
|
||||
This method authenticates the server and additionally also authenticates
|
||||
the client to the server, then negotiates an encrypted connection.
|
||||
|
||||
- Follow steps above
|
||||
- Using your root CA generate cert/key for your client
|
||||
- Register the keys with the server you will be accessing so the server can authenticate your client
|
||||
- In WiFiClientSecure use setCACert (or the appropriate connect method) to set the root cert of your
|
||||
CA or of the public CA, this is used to authenticate the server
|
||||
- In WiFiClientSecure use setCertificate, and setPrivateKey (or the appropriate connect method) to
|
||||
set your client's cert & key, this will be used to authenticate your client to the server
|
||||
- When WiFiClientSecure connects to the target server it uses the CA cert to verify the certificate
|
||||
presented by the server, it will use the cert/key to authenticate your client to the server, and
|
||||
it will then negotiate encryption for the connection
|
||||
|
||||
Using Pre-Shared Keys (PSK)
|
||||
---------------------------
|
||||
|
||||
TLS supports authentication and encryption using a pre-shared key (i.e. a key that both client and
|
||||
server know) as an alternative to the public key cryptography commonly used on the web for HTTPS.
|
||||
PSK is starting to be used for MQTT, e.g. in mosquitto, to simplify the set-up and avoid having to
|
||||
go through the whole CA, cert, and private key process.
|
||||
|
||||
A pre-shared key is a binary string of up to 32 bytes and is commonly represented in hex form. In
|
||||
addition to the key, clients can also present an id and typically the server allows a different key
|
||||
to be associated with each client id. In effect this is very similar to username and password pairs,
|
||||
except that unlike a password the key is not directly transmitted to the server, thus a connection to a
|
||||
malicious server does not divulge the password. Plus the server is also authenticated to the client.
|
||||
|
||||
To use PSK:
|
||||
- Generate a random hex string (generating an MD5 or SHA for some file is one way to do this)
|
||||
- Come up with a string id for your client and configure your server to accept the id/key pair
|
||||
- In WiFiClientSecure use setPreSharedKey (or the appropriate connect method) to
|
||||
set the id/key combo
|
||||
- When WiFiClientSecure connects to the target server it uses the id/key combo to authenticate the
|
||||
server (it must prove that it has the key too), authenticate the client and then negotiate
|
||||
encryption for the connection
|
||||
|
||||
Please see the WiFiClientPSK example.
|
@ -0,0 +1,85 @@
|
||||
/*
|
||||
Wifi secure connection example for ESP32 using a pre-shared key (PSK)
|
||||
This is useful with MQTT servers instead of using a self-signed cert, tested with mosquitto.
|
||||
Running on TLS 1.2 using mbedTLS
|
||||
|
||||
To test run a test server using: openssl s_server -accept 8443 -psk 1a2b3c4d -nocert
|
||||
It will show the http request made, but there's no easy way to send a reply back...
|
||||
|
||||
2017 - Evandro Copercini - Apache 2.0 License.
|
||||
2018 - Adapted for PSK by Thorsten von Eicken
|
||||
*/
|
||||
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
#if 0
|
||||
const char* ssid = "your-ssid"; // your network SSID (name of wifi network)
|
||||
const char* password = "your-password"; // your network password
|
||||
#else
|
||||
const char* ssid = "test"; // your network SSID (name of wifi network)
|
||||
const char* password = "securetest"; // your network password
|
||||
#endif
|
||||
|
||||
//const char* server = "server.local"; // Server hostname
|
||||
const IPAddress server = IPAddress(192, 168, 0, 14); // Server IP address
|
||||
const int port = 8443; // server's port (8883 for MQTT)
|
||||
|
||||
const char* pskIdent = "Client_identity"; // PSK identity (sometimes called key hint)
|
||||
const char* psKey = "1a2b3c4d"; // PSK Key (must be hex string without 0x)
|
||||
|
||||
WiFiClientSecure client;
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(115200);
|
||||
delay(100);
|
||||
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
WiFi.begin(ssid, password);
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
Serial.print(".");
|
||||
// wait 1 second for re-trying
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
Serial.print("Connected to ");
|
||||
Serial.println(ssid);
|
||||
|
||||
client.setPreSharedKey(pskIdent, psKey);
|
||||
|
||||
Serial.println("\nStarting connection to server...");
|
||||
if (!client.connect(server, port))
|
||||
Serial.println("Connection failed!");
|
||||
else {
|
||||
Serial.println("Connected to server!");
|
||||
// Make a HTTP request:
|
||||
client.println("GET /a/check HTTP/1.0");
|
||||
client.print("Host: ");
|
||||
client.println(server);
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
|
||||
while (client.connected()) {
|
||||
String line = client.readStringUntil('\n');
|
||||
if (line == "\r") {
|
||||
Serial.println("headers received");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if there are incoming bytes available
|
||||
// from the server, read them and print them:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.write(c);
|
||||
}
|
||||
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// do nothing
|
||||
}
|
@ -39,6 +39,8 @@ WiFiClientSecure::WiFiClientSecure()
|
||||
_CA_cert = NULL;
|
||||
_cert = NULL;
|
||||
_private_key = NULL;
|
||||
_pskIdent = NULL;
|
||||
_psKey = NULL;
|
||||
next = NULL;
|
||||
}
|
||||
|
||||
@ -59,6 +61,8 @@ WiFiClientSecure::WiFiClientSecure(int sock)
|
||||
_CA_cert = NULL;
|
||||
_cert = NULL;
|
||||
_private_key = NULL;
|
||||
_pskIdent = NULL;
|
||||
_psKey = NULL;
|
||||
next = NULL;
|
||||
}
|
||||
|
||||
@ -89,11 +93,15 @@ void WiFiClientSecure::stop()
|
||||
|
||||
int WiFiClientSecure::connect(IPAddress ip, uint16_t port)
|
||||
{
|
||||
if (_pskIdent && _psKey)
|
||||
return connect(ip, port, _pskIdent, _psKey);
|
||||
return connect(ip, port, _CA_cert, _cert, _private_key);
|
||||
}
|
||||
|
||||
int WiFiClientSecure::connect(const char *host, uint16_t port)
|
||||
{
|
||||
if (_pskIdent && _psKey)
|
||||
return connect(host, port, _pskIdent, _psKey);
|
||||
return connect(host, port, _CA_cert, _cert, _private_key);
|
||||
}
|
||||
|
||||
@ -104,7 +112,24 @@ int WiFiClientSecure::connect(IPAddress ip, uint16_t port, const char *_CA_cert,
|
||||
|
||||
int WiFiClientSecure::connect(const char *host, uint16_t port, const char *_CA_cert, const char *_cert, const char *_private_key)
|
||||
{
|
||||
int ret = start_ssl_client(sslclient, host, port, _CA_cert, _cert, _private_key);
|
||||
int ret = start_ssl_client(sslclient, host, port, _CA_cert, _cert, _private_key, NULL, NULL);
|
||||
_lastError = ret;
|
||||
if (ret < 0) {
|
||||
log_e("start_ssl_client: %d", ret);
|
||||
stop();
|
||||
return 0;
|
||||
}
|
||||
_connected = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int WiFiClientSecure::connect(IPAddress ip, uint16_t port, const char *pskIdent, const char *psKey) {
|
||||
return connect(ip.toString().c_str(), port,_pskIdent, _psKey);
|
||||
}
|
||||
|
||||
int WiFiClientSecure::connect(const char *host, uint16_t port, const char *pskIdent, const char *psKey) {
|
||||
log_v("start_ssl_client with PSK");
|
||||
int ret = start_ssl_client(sslclient, host, port, NULL, NULL, NULL, _pskIdent, _psKey);
|
||||
_lastError = ret;
|
||||
if (ret < 0) {
|
||||
log_e("start_ssl_client: %d", ret);
|
||||
@ -131,13 +156,6 @@ size_t WiFiClientSecure::write(uint8_t data)
|
||||
int WiFiClientSecure::read()
|
||||
{
|
||||
uint8_t data = -1;
|
||||
|
||||
if(_peek >= 0){
|
||||
data = _peek;
|
||||
_peek = -1;
|
||||
return data;
|
||||
}
|
||||
|
||||
int res = read(&data, 1);
|
||||
if (res < 0) {
|
||||
return res;
|
||||
@ -161,7 +179,8 @@ size_t WiFiClientSecure::write(const uint8_t *buf, size_t size)
|
||||
int WiFiClientSecure::read(uint8_t *buf, size_t size)
|
||||
{
|
||||
int peeked = 0;
|
||||
if ((!buf && size) || (_peek < 0 && !available())) {
|
||||
int avail = available();
|
||||
if ((!buf && size) || avail <= 0) {
|
||||
return -1;
|
||||
}
|
||||
if(!size){
|
||||
@ -171,7 +190,8 @@ int WiFiClientSecure::read(uint8_t *buf, size_t size)
|
||||
buf[0] = _peek;
|
||||
_peek = -1;
|
||||
size--;
|
||||
if(!size || !available()){
|
||||
avail--;
|
||||
if(!size || !avail){
|
||||
return 1;
|
||||
}
|
||||
buf++;
|
||||
@ -181,23 +201,23 @@ int WiFiClientSecure::read(uint8_t *buf, size_t size)
|
||||
int res = get_ssl_receive(sslclient, buf, size);
|
||||
if (res < 0) {
|
||||
stop();
|
||||
return res;
|
||||
return peeked?peeked:res;
|
||||
}
|
||||
return res + peeked;
|
||||
}
|
||||
|
||||
int WiFiClientSecure::available()
|
||||
{
|
||||
int peeked = (_peek >= 0);
|
||||
if (!_connected) {
|
||||
return 0;
|
||||
return peeked;
|
||||
}
|
||||
int res = data_to_read(sslclient);
|
||||
if (res < 0) {
|
||||
stop();
|
||||
} else if(_peek >= 0) {
|
||||
res += 1;
|
||||
return peeked?peeked:res;
|
||||
}
|
||||
return res;
|
||||
return res+peeked;
|
||||
}
|
||||
|
||||
uint8_t WiFiClientSecure::connected()
|
||||
@ -223,6 +243,11 @@ void WiFiClientSecure::setPrivateKey (const char *private_key)
|
||||
_private_key = private_key;
|
||||
}
|
||||
|
||||
void WiFiClientSecure::setPreSharedKey(const char *pskIdent, const char *psKey) {
|
||||
_pskIdent = pskIdent;
|
||||
_psKey = psKey;
|
||||
}
|
||||
|
||||
bool WiFiClientSecure::verify(const char* fp, const char* domain_name)
|
||||
{
|
||||
if (!sslclient)
|
||||
@ -232,18 +257,19 @@ bool WiFiClientSecure::verify(const char* fp, const char* domain_name)
|
||||
}
|
||||
|
||||
char *WiFiClientSecure::_streamLoad(Stream& stream, size_t size) {
|
||||
char *dest = (char*)malloc(size);
|
||||
static char *dest = nullptr;
|
||||
if(dest) {
|
||||
free(dest);
|
||||
}
|
||||
dest = (char*)malloc(size);
|
||||
if (!dest) {
|
||||
return nullptr;
|
||||
}
|
||||
if (size != stream.readBytes(dest, size)) {
|
||||
free(dest);
|
||||
return nullptr;
|
||||
dest = nullptr;
|
||||
}
|
||||
char ret[size+1];
|
||||
snprintf(ret, size, "%s", dest);
|
||||
free(dest);
|
||||
return ret;
|
||||
return dest;
|
||||
}
|
||||
|
||||
bool WiFiClientSecure::loadCACert(Stream& stream, size_t size) {
|
||||
|
@ -35,6 +35,8 @@ protected:
|
||||
const char *_CA_cert;
|
||||
const char *_cert;
|
||||
const char *_private_key;
|
||||
const char *_pskIdent; // identity for PSK cipher suites
|
||||
const char *_psKey; // key in hex for PSK cipher suites
|
||||
|
||||
public:
|
||||
WiFiClientSecure *next;
|
||||
@ -45,6 +47,8 @@ public:
|
||||
int connect(const char *host, uint16_t port);
|
||||
int connect(IPAddress ip, uint16_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key);
|
||||
int connect(const char *host, uint16_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key);
|
||||
int connect(IPAddress ip, uint16_t port, const char *pskIdent, const char *psKey);
|
||||
int connect(const char *host, uint16_t port, const char *pskIdent, const char *psKey);
|
||||
int peek();
|
||||
size_t write(uint8_t data);
|
||||
size_t write(const uint8_t *buf, size_t size);
|
||||
@ -55,6 +59,7 @@ public:
|
||||
void stop();
|
||||
uint8_t connected();
|
||||
int lastError(char *buf, const size_t size);
|
||||
void setPreSharedKey(const char *pskIdent, const char *psKey); // psKey in Hex
|
||||
void setCACert(const char *rootCA);
|
||||
void setCertificate(const char *client_ca);
|
||||
void setPrivateKey (const char *private_key);
|
||||
|
@ -45,7 +45,7 @@ void ssl_init(sslclient_context *ssl_client)
|
||||
}
|
||||
|
||||
|
||||
int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key)
|
||||
int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key, const char *pskIdent, const char *psKey)
|
||||
{
|
||||
char buf[512];
|
||||
int ret, flags, timeout;
|
||||
@ -116,6 +116,36 @@ int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t p
|
||||
if (ret < 0) {
|
||||
return handle_error(ret);
|
||||
}
|
||||
} else if (pskIdent != NULL && psKey != NULL) {
|
||||
log_v("Setting up PSK");
|
||||
// convert PSK from hex to binary
|
||||
if ((strlen(psKey) & 1) != 0 || strlen(psKey) > 2*MBEDTLS_PSK_MAX_LEN) {
|
||||
log_e("pre-shared key not valid hex or too long");
|
||||
return -1;
|
||||
}
|
||||
unsigned char psk[MBEDTLS_PSK_MAX_LEN];
|
||||
size_t psk_len = strlen(psKey)/2;
|
||||
for (int j=0; j<strlen(psKey); j+= 2) {
|
||||
char c = psKey[j];
|
||||
if (c >= '0' && c <= '9') c -= '0';
|
||||
else if (c >= 'A' && c <= 'F') c -= 'A' - 10;
|
||||
else if (c >= 'a' && c <= 'f') c -= 'a' - 10;
|
||||
else return -1;
|
||||
psk[j/2] = c<<4;
|
||||
c = psKey[j+1];
|
||||
if (c >= '0' && c <= '9') c -= '0';
|
||||
else if (c >= 'A' && c <= 'F') c -= 'A' - 10;
|
||||
else if (c >= 'a' && c <= 'f') c -= 'a' - 10;
|
||||
else return -1;
|
||||
psk[j/2] |= c;
|
||||
}
|
||||
// set mbedtls config
|
||||
ret = mbedtls_ssl_conf_psk(&ssl_client->ssl_conf, psk, psk_len,
|
||||
(const unsigned char *)pskIdent, strlen(pskIdent));
|
||||
if (ret != 0) {
|
||||
log_e("mbedtls_ssl_conf_psk returned %d", ret);
|
||||
return handle_error(ret);
|
||||
}
|
||||
} else {
|
||||
mbedtls_ssl_conf_authmode(&ssl_client->ssl_conf, MBEDTLS_SSL_VERIFY_NONE);
|
||||
log_i("WARNING: Use certificates for a more secure communication!");
|
||||
|
@ -29,7 +29,7 @@ typedef struct sslclient_context {
|
||||
|
||||
|
||||
void ssl_init(sslclient_context *ssl_client);
|
||||
int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key);
|
||||
int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, const char *rootCABuff, const char *cli_cert, const char *cli_key, const char *pskIdent, const char *psKey);
|
||||
void stop_ssl_socket(sslclient_context *ssl_client, const char *rootCABuff, const char *cli_cert, const char *cli_key);
|
||||
int data_to_read(sslclient_context *ssl_client);
|
||||
int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, uint16_t len);
|
||||
|
@ -154,14 +154,15 @@ void TwoWire::beginTransmission(uint16_t address)
|
||||
uint8_t TwoWire::endTransmission(bool sendStop) // Assumes Wire.beginTransaction(), Wire.write()
|
||||
{
|
||||
if(transmitting == 1) {
|
||||
// txlength is howmany bytes in txbuffer have been use
|
||||
last_error = writeTransmission(txAddress, &txBuffer[txQueued], txLength - txQueued, sendStop);
|
||||
if(last_error == I2C_ERROR_CONTINUE){
|
||||
txQueued = txLength;
|
||||
} else if( last_error == I2C_ERROR_OK){
|
||||
rxIndex = 0;
|
||||
rxLength = rxQueued;
|
||||
rxQueued = 0;
|
||||
txQueued = 0; // the SendStop=true will restart all Queueing
|
||||
if(last_error == I2C_ERROR_CONTINUE){
|
||||
// txlength is howmany bytes in txbuffer have been use
|
||||
txQueued = txLength;
|
||||
}
|
||||
} else {
|
||||
last_error = I2C_ERROR_NO_BEGIN;
|
||||
@ -170,7 +171,7 @@ uint8_t TwoWire::endTransmission(bool sendStop) // Assumes Wire.beginTransactio
|
||||
txIndex = 0;
|
||||
txLength = 0;
|
||||
transmitting = 0;
|
||||
return last_error;
|
||||
return (last_error == I2C_ERROR_CONTINUE)?I2C_ERROR_OK:last_error; // Don't return Continue for compatibility.
|
||||
}
|
||||
|
||||
/* @stickBreaker 11/2017 fix for ReSTART timeout, ISR
|
||||
@ -191,12 +192,19 @@ uint8_t TwoWire::requestFrom(uint16_t address, uint8_t size, bool sendStop)
|
||||
|
||||
last_error = readTransmission(address, &rxBuffer[cnt], size, sendStop, &cnt);
|
||||
rxIndex = 0;
|
||||
rxLength = rxQueued;
|
||||
|
||||
rxLength = cnt;
|
||||
|
||||
if( last_error != I2C_ERROR_CONTINUE){ // not a buffered ReSTART operation
|
||||
// so this operation actually moved data, queuing is done.
|
||||
rxQueued = 0;
|
||||
txQueued = 0; // the SendStop=true will restart all Queueing
|
||||
if(last_error != I2C_ERROR_OK){
|
||||
txQueued = 0; // the SendStop=true will restart all Queueing or error condition
|
||||
}
|
||||
|
||||
if(last_error != I2C_ERROR_OK){ // ReSTART on read does not return any data
|
||||
cnt = 0;
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
@ -67,12 +67,13 @@ protected:
|
||||
public:
|
||||
TwoWire(uint8_t bus_num);
|
||||
~TwoWire();
|
||||
bool begin(int sda=-1, int scl=-1, uint32_t frequency=0);
|
||||
bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
|
||||
// calling will attemp to recover hung bus
|
||||
|
||||
void setClock(uint32_t frequency); // change bus clock without initing hardware
|
||||
size_t getClock(); // current bus clock rate in hz
|
||||
|
||||
void setTimeOut(uint16_t timeOutMillis);
|
||||
void setTimeOut(uint16_t timeOutMillis); // default timeout of i2c transactions is 50ms
|
||||
uint16_t getTimeOut();
|
||||
|
||||
uint8_t lastError();
|
||||
@ -137,6 +138,7 @@ extern TwoWire Wire1;
|
||||
|
||||
|
||||
/*
|
||||
V1.0.2 30NOV2018 stop returning I2C_ERROR_CONTINUE on ReSTART operations, regain compatibility with Arduino libs
|
||||
V1.0.1 02AUG2018 First Fix after release, Correct ReSTART handling, change Debug control, change begin()
|
||||
to a function, this allow reporting if bus cannot be initialized, Wire.begin() can be used to recover
|
||||
a hung bus busy condition.
|
||||
|
@ -37,8 +37,8 @@
|
||||
},
|
||||
{
|
||||
"packager": "esp32",
|
||||
"name": "esptool",
|
||||
"version": "2.5.0"
|
||||
"name": "esptool_py",
|
||||
"version": "2.6.0"
|
||||
},
|
||||
{
|
||||
"packager": "esp32",
|
||||
@ -84,43 +84,43 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esptool",
|
||||
"version": "2.5.0",
|
||||
"name": "esptool_py",
|
||||
"version": "2.6.0",
|
||||
"systems": [
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.5.0-windows.zip",
|
||||
"archiveFileName": "esptool-2.5.0-windows.zip",
|
||||
"checksum": "SHA-256:576b8068b577cae0e6e937566a9d32a08ff7ff82963fb60400eacb6691f2fbfb",
|
||||
"size": "3420959"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-windows.zip",
|
||||
"archiveFileName": "esptool-2.6.0-windows.zip",
|
||||
"checksum": "SHA-256:a73f4cf68db240d7f1d250c5c7f2dfcb53c17a37483729f1bf71f8f43d79a799",
|
||||
"size": "3421208"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.5.0-macos.tar.gz",
|
||||
"archiveFileName": "esptool-2.5.0-macos.tar.gz",
|
||||
"checksum": "SHA-256:2da8ba3b83d99b5d808cab955a077e3e0738ec640b51de932d047cad7fac1157",
|
||||
"size": "3835397"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-macos.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-macos.tar.gz",
|
||||
"checksum": "SHA-256:0a881b91547c840fab8c72ae3d031069384278b8c2e5241647e8c8292c5e4a4b",
|
||||
"size": "3835660"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.5.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.5.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:34d63b9a0bf2acb9b6fdac15f91a8756f4e722065de031e8fbce4e4abc369e54",
|
||||
"size": "43468"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.5.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.5.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:34d63b9a0bf2acb9b6fdac15f91a8756f4e722065de031e8fbce4e4abc369e54",
|
||||
"size": "43468"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
},
|
||||
{
|
||||
"host": "arm-linux-gnueabihf",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.5.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.5.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:34d63b9a0bf2acb9b6fdac15f91a8756f4e722065de031e8fbce4e4abc369e54",
|
||||
"size": "43468"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
36
platform.txt
36
platform.txt
@ -3,13 +3,13 @@ version=0.0.1
|
||||
|
||||
runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
|
||||
|
||||
tools.esptool.path={runtime.platform.path}/tools/esptool
|
||||
tools.esptool.cmd=esptool
|
||||
tools.esptool.cmd.linux=esptool.py
|
||||
tools.esptool.cmd.windows=esptool.exe
|
||||
tools.esptool_py.path={runtime.platform.path}/tools/esptool
|
||||
tools.esptool_py.cmd=esptool
|
||||
tools.esptool_py.cmd.linux=esptool.py
|
||||
tools.esptool_py.cmd.windows=esptool.exe
|
||||
|
||||
tools.esptool.network_cmd=python "{runtime.platform.path}/tools/espota.py"
|
||||
tools.esptool.network_cmd.windows="{runtime.platform.path}/tools/espota.exe"
|
||||
tools.esptool_py.network_cmd=python "{runtime.platform.path}/tools/espota.py"
|
||||
tools.esptool_py.network_cmd.windows="{runtime.platform.path}/tools/espota.exe"
|
||||
|
||||
tools.gen_esp32part.cmd=python "{runtime.platform.path}/tools/gen_esp32part.py"
|
||||
tools.gen_esp32part.cmd.windows="{runtime.platform.path}/tools/gen_esp32part.exe"
|
||||
@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
|
||||
|
||||
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
|
||||
compiler.sdk.path={runtime.platform.path}/tools/sdk
|
||||
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module"
|
||||
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp32-camera"
|
||||
|
||||
compiler.c.cmd=xtensa-esp32-elf-gcc
|
||||
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
|
||||
@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
|
||||
|
||||
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
||||
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
|
||||
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lapp_update -lnghttp -lspiffs -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++
|
||||
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lapp_update -lnghttp -lspiffs -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++
|
||||
|
||||
compiler.as.cmd=xtensa-esp32-elf-as
|
||||
|
||||
@ -71,17 +71,17 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}"
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{build.path}/arduino.ar" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
|
||||
|
||||
## Create eeprom
|
||||
recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{runtime.platform.path}/tools/partitions/{build.partitions}.csv" "{build.path}/{build.project_name}.partitions.bin"
|
||||
|
||||
## Create hex
|
||||
recipe.objcopy.hex.pattern="{tools.esptool.path}/{tools.esptool.cmd}" --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf"
|
||||
recipe.objcopy.hex.pattern.linux=python "{tools.esptool.path}/{tools.esptool.cmd}" --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf"
|
||||
recipe.objcopy.hex.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf"
|
||||
recipe.objcopy.hex.pattern.linux=python "{tools.esptool_py.path}/{tools.esptool_py.cmd}" --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf"
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.bin
|
||||
@ -94,9 +94,9 @@ recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss|\.noinit)\s+([0-9]+).*
|
||||
|
||||
# ------------------------------
|
||||
|
||||
tools.esptool.upload.protocol=esp32
|
||||
tools.esptool.upload.params.verbose=
|
||||
tools.esptool.upload.params.quiet=
|
||||
tools.esptool.upload.pattern="{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader_{build.boot}_{build.flash_freq}.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
|
||||
tools.esptool.upload.pattern.linux=python "{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader_{build.boot}_{build.flash_freq}.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
|
||||
tools.esptool.upload.network_pattern={network_cmd} -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"
|
||||
tools.esptool_py.upload.protocol=esp32
|
||||
tools.esptool_py.upload.params.verbose=
|
||||
tools.esptool_py.upload.params.quiet=
|
||||
tools.esptool_py.upload.pattern="{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader_{build.boot}_{build.flash_freq}.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
|
||||
tools.esptool_py.upload.pattern.linux=python "{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader_{build.boot}_{build.flash_freq}.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
|
||||
tools.esptool_py.upload.network_pattern={network_cmd} -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"
|
||||
|
@ -231,7 +231,7 @@ echo " - updating platform.txt..."
|
||||
cat $srcdir/platform.txt | \
|
||||
sed "s/version=.*/version=$ver$extent/g" | \
|
||||
sed 's/runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf//g' | \
|
||||
sed 's/tools.esptool.path={runtime.platform.path}\/tools\/esptool/tools.esptool.path=\{runtime.tools.esptool.path\}/g' \
|
||||
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' \
|
||||
> $outdir/platform.txt
|
||||
|
||||
# Put core version and short hash of git version into core_version.h
|
||||
@ -338,7 +338,7 @@ if [ ! -z "$prev_any_release" ] && [ "$prev_any_release" != "null" ]; then
|
||||
|
||||
# Release notes: GIT log comments (prev_any_release, current_release>
|
||||
echo " - executing: git log --oneline $prev_any_release.."
|
||||
#git log --oneline $prev_any_release.. > $releaseDir/commits.txt
|
||||
git log --oneline $prev_any_release.. > $releaseDir/commits.txt
|
||||
fi
|
||||
|
||||
# for RELEASE run update REL JSON as well
|
||||
@ -353,7 +353,7 @@ if [ $bIsPrerelease -eq 0 ]; then
|
||||
|
||||
# Release notes: GIT log comments (prev_release, current_release>
|
||||
echo " - executing: git log --oneline $prev_release.."
|
||||
#git log --oneline $prev_release.. > $releaseDir/commits.txt
|
||||
git log --oneline $prev_release.. > $releaseDir/commits.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -205,7 +205,7 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
|
||||
data = connection.recv(32).decode()
|
||||
logging.info('Result: %s' ,data)
|
||||
|
||||
if data == "OK":
|
||||
if "OK" in data:
|
||||
logging.info('Success')
|
||||
connection.close()
|
||||
f.close()
|
||||
|
Binary file not shown.
@ -29,11 +29,15 @@ import struct
|
||||
import sys
|
||||
import hashlib
|
||||
import binascii
|
||||
import errno
|
||||
|
||||
MAX_PARTITION_LENGTH = 0xC00 # 3K for partition data (96 entries) leaves 1K in a 4K sector for signature
|
||||
MD5_PARTITION_BEGIN = b"\xEB\xEB" + b"\xFF" * 14 # The first 2 bytes are like magic numbers for MD5 sum
|
||||
PARTITION_TABLE_SIZE = 0x1000 # Size of partition table
|
||||
|
||||
MIN_PARTITION_SUBTYPE_APP_OTA = 0x10
|
||||
NUM_PARTITION_SUBTYPE_APP_OTA = 16
|
||||
|
||||
__version__ = '1.2'
|
||||
|
||||
APP_TYPE = 0x00
|
||||
@ -253,8 +257,8 @@ class PartitionDefinition(object):
|
||||
}
|
||||
|
||||
# add subtypes for the 16 OTA slot values ("ota_XX, etc.")
|
||||
for ota_slot in range(16):
|
||||
SUBTYPES[TYPES["app"]]["ota_%d" % ota_slot] = 0x10 + ota_slot
|
||||
for ota_slot in range(NUM_PARTITION_SUBTYPE_APP_OTA):
|
||||
SUBTYPES[TYPES["app"]]["ota_%d" % ota_slot] = MIN_PARTITION_SUBTYPE_APP_OTA + ota_slot
|
||||
|
||||
def __init__(self):
|
||||
self.name = ""
|
||||
@ -480,6 +484,16 @@ def main():
|
||||
raise InputError("Partitions defined in '%s' occupy %.1fMB of flash (%d bytes) which does not fit in configured flash size %dMB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu." %
|
||||
(args.input.name, table_size / 1024.0 / 1024.0, table_size, size_mb))
|
||||
|
||||
# Make sure that the output directory is created
|
||||
output_dir = os.path.abspath(os.path.dirname(args.output))
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
try:
|
||||
os.makedirs(output_dir)
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
if input_is_binary:
|
||||
output = table.to_csv()
|
||||
with sys.stdout if args.output == '-' else open(args.output, 'w') as f:
|
||||
|
@ -151,6 +151,7 @@ env.Append(
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wifi_provisioning"),
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wpa_supplicant"),
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "include", "xtensa-debug-module"),
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp32-camera"),
|
||||
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
|
||||
],
|
||||
|
||||
@ -160,7 +161,7 @@ env.Append(
|
||||
],
|
||||
|
||||
LIBS=[
|
||||
"-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lmdns", "-lvfs", "-lesp_ringbuf", "-lsoc", "-lcore", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lapp_update", "-lnghttp", "-lspiffs", "-lunity", "-lesp_https_server", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-lsmartconfig_ack", "-lexpat", "-lm", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lstdc++"
|
||||
"-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lesp32-camera", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lmdns", "-lvfs", "-lesp_ringbuf", "-lsoc", "-lcore", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lapp_update", "-lnghttp", "-lspiffs", "-lunity", "-lesp_https_server", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-lsmartconfig_ack", "-lexpat", "-lm", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lstdc++"
|
||||
],
|
||||
|
||||
LIBSOURCE_DIRS=[
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -20,6 +20,7 @@
|
||||
#include <stddef.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_partition.h"
|
||||
#include "esp_image_format.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -41,6 +42,14 @@ extern "C"
|
||||
*/
|
||||
typedef uint32_t esp_ota_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Return esp_app_desc structure. This structure includes app version.
|
||||
*
|
||||
* Return description for running app.
|
||||
* @return Pointer to esp_app_desc structure.
|
||||
*/
|
||||
const esp_app_desc_t *esp_ota_get_app_description(void);
|
||||
|
||||
/**
|
||||
* @brief Commence an OTA update writing to the specified partition.
|
||||
|
||||
@ -170,6 +179,22 @@ const esp_partition_t* esp_ota_get_running_partition(void);
|
||||
*/
|
||||
const esp_partition_t* esp_ota_get_next_update_partition(const esp_partition_t *start_from);
|
||||
|
||||
/**
|
||||
* @brief Returns esp_app_desc structure for app partition. This structure includes app version.
|
||||
*
|
||||
* Returns a description for the requested app partition.
|
||||
* @param[in] partition Pointer to app partition. (only app partition)
|
||||
* @param[out] app_desc Structure of info about app.
|
||||
* @return
|
||||
* - ESP_OK Successful.
|
||||
* - ESP_ERR_NOT_FOUND app_desc structure is not found. Magic word is incorrect.
|
||||
* - ESP_ERR_NOT_SUPPORTED Partition is not application.
|
||||
* - ESP_ERR_INVALID_ARG Arguments is NULL or if partition's offset exceeds partition size.
|
||||
* - ESP_ERR_INVALID_SIZE Read would go out of bounds of the partition.
|
||||
* - or one of error codes from lower-level flash driver.
|
||||
*/
|
||||
esp_err_t esp_ota_get_partition_description(const esp_partition_t *partition, esp_app_desc_t *app_desc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "esp_flash_data_types.h"
|
||||
#include "esp_image_format.h"
|
||||
|
||||
/// Type of hold a GPIO in low state
|
||||
typedef enum {
|
||||
@ -23,21 +24,29 @@ typedef enum {
|
||||
} esp_comm_gpio_hold_t;
|
||||
|
||||
/**
|
||||
* @brief Calculate crc for the OTA data partition.
|
||||
* @brief Calculate crc for the OTA data select.
|
||||
*
|
||||
* @param[in] ota_data The OTA data partition.
|
||||
* @param[in] s The OTA data select.
|
||||
* @return Returns crc value.
|
||||
*/
|
||||
uint32_t bootloader_common_ota_select_crc(const esp_ota_select_entry_t *s);
|
||||
|
||||
/**
|
||||
* @brief Verifies the validity of the OTA data partition
|
||||
* @brief Verifies the validity of the OTA data select
|
||||
*
|
||||
* @param[in] ota_data The OTA data partition.
|
||||
* @param[in] s The OTA data select.
|
||||
* @return Returns true on valid, false otherwise.
|
||||
*/
|
||||
bool bootloader_common_ota_select_valid(const esp_ota_select_entry_t *s);
|
||||
|
||||
/**
|
||||
* @brief Returns true if OTADATA is not marked as bootable partition.
|
||||
*
|
||||
* @param[in] s The OTA data select.
|
||||
* @return Returns true if OTADATA invalid, false otherwise.
|
||||
*/
|
||||
bool bootloader_common_ota_select_invalid(const esp_ota_select_entry_t *s);
|
||||
|
||||
/**
|
||||
* @brief Check if the GPIO input is a long hold or a short hold.
|
||||
*
|
||||
@ -91,3 +100,27 @@ bool bootloader_common_label_search(const char *list, char *label);
|
||||
* - ESP_FAIL: An allocation error occurred.
|
||||
*/
|
||||
esp_err_t bootloader_common_get_sha256_of_partition(uint32_t address, uint32_t size, int type, uint8_t *out_sha_256);
|
||||
|
||||
/**
|
||||
* @brief Returns the number of active otadata.
|
||||
*
|
||||
* @param[in] two_otadata Pointer on array from two otadata structures.
|
||||
*
|
||||
* @return The number of active otadata (0 or 1).
|
||||
* - -1: If it does not have active otadata.
|
||||
*/
|
||||
int bootloader_common_get_active_otadata(esp_ota_select_entry_t *two_otadata);
|
||||
|
||||
/**
|
||||
* @brief Returns esp_app_desc structure for app partition. This structure includes app version.
|
||||
*
|
||||
* Returns a description for the requested app partition.
|
||||
* @param[in] partition App partition description.
|
||||
* @param[out] app_desc Structure of info about app.
|
||||
* @return
|
||||
* - ESP_OK: Successful.
|
||||
* - ESP_ERR_INVALID_ARG: The arguments passed are not valid.
|
||||
* - ESP_ERR_NOT_FOUND: app_desc structure is not found. Magic word is incorrect.
|
||||
* - ESP_FAIL: mapping is fail.
|
||||
*/
|
||||
esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc);
|
||||
|
@ -89,6 +89,25 @@ typedef struct {
|
||||
uint32_t data_len;
|
||||
} esp_image_segment_header_t;
|
||||
|
||||
#define ESP_APP_DESC_MAGIC_WORD 0xABCD5432 /*!< The magic word for the esp_app_desc structure that is in DROM. */
|
||||
|
||||
/**
|
||||
* @brief Description about application.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t magic_word; /*!< Magic word ESP_APP_DESC_MAGIC_WORD */
|
||||
uint32_t secure_version; /*!< Secure version */
|
||||
uint32_t reserv1[2]; /*!< --- */
|
||||
char version[32]; /*!< Application version */
|
||||
char project_name[32]; /*!< Project name */
|
||||
char time[16]; /*!< Compile time */
|
||||
char date[16]; /*!< Compile date*/
|
||||
char idf_ver[32]; /*!< Version IDF */
|
||||
uint8_t app_elf_sha256[32]; /*!< sha256 of elf file */
|
||||
uint32_t reserv2[20]; /*!< --- */
|
||||
} esp_app_desc_t;
|
||||
_Static_assert(sizeof(esp_app_desc_t) == 256, "esp_app_desc_t should be 256 bytes");
|
||||
|
||||
#define ESP_IMAGE_MAX_SEGMENTS 16
|
||||
|
||||
/* Structure to hold on-flash image metadata */
|
||||
|
@ -405,7 +405,6 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode);
|
||||
*
|
||||
* For ORIG mode:
|
||||
* Bluetooth modem sleep is enabled in controller start up by default if CONFIG_BTDM_CONTROLLER_MODEM_SLEEP is set and "ORIG mode" is selected. In ORIG modem sleep mode, bluetooth controller will switch off some components and pause to work every now and then, if there is no event to process; and wakeup according to the scheduled interval and resume the work. It can also wakeup earlier upon external request using function "esp_bt_controller_wakeup_request".
|
||||
* Note that currently there is problem in the combination use of bluetooth modem sleep and Dynamic Frequency Scaling(DFS). So do not enable DFS if bluetooth modem sleep is in use.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
|
@ -63,6 +63,7 @@
|
||||
#define CONFIG_MBEDTLS_PEM_WRITE_C 1
|
||||
#define CONFIG_BT_SPP_ENABLED 1
|
||||
#define CONFIG_BT_RESERVE_DRAM 0xdb5c
|
||||
#define CONFIG_APP_COMPILE_TIME_DATE 1
|
||||
#define CONFIG_CXX_EXCEPTIONS 1
|
||||
#define CONFIG_FATFS_FS_LOCK 0
|
||||
#define CONFIG_IP_LOST_TIMER_INTERVAL 120
|
||||
@ -76,6 +77,7 @@
|
||||
#define CONFIG_SPIRAM_SUPPORT 1
|
||||
#define CONFIG_LWIP_MAX_SOCKETS 10
|
||||
#define CONFIG_LWIP_NETIF_LOOPBACK 1
|
||||
#define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT "pthread"
|
||||
#define CONFIG_EMAC_TASK_PRIORITY 20
|
||||
#define CONFIG_TIMER_TASK_STACK_DEPTH 2048
|
||||
#define CONFIG_TCP_MSS 1436
|
||||
@ -120,6 +122,7 @@
|
||||
#define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR 1
|
||||
#define CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER 1
|
||||
#define CONFIG_MB_SERIAL_TASK_STACK_SIZE 2048
|
||||
#define CONFIG_MBEDTLS_PSK_MODES 1
|
||||
#define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO 1
|
||||
#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60
|
||||
#define CONFIG_SPIFFS_USE_MAGIC 1
|
||||
@ -164,9 +167,11 @@
|
||||
#define CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL 1
|
||||
#define CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED 1
|
||||
#define CONFIG_LIBSODIUM_USE_MBEDTLS_SHA 1
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK 1
|
||||
#define CONFIG_SW_COEXIST_PREFERENCE_WIFI 1
|
||||
#define CONFIG_DMA_RX_BUF_NUM 10
|
||||
#define CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED 1
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_PSK 1
|
||||
#define CONFIG_TCP_SYNMAXRTX 6
|
||||
#define CONFIG_MB_UART_RTS 32
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA 1
|
||||
@ -198,7 +203,9 @@
|
||||
#define CONFIG_MB_QUEUE_LENGTH 20
|
||||
#define CONFIG_SW_COEXIST_PREFERENCE_VALUE 0
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1
|
||||
#define CONFIG_OV2640_SUPPORT 1
|
||||
#define CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER 1
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK 1
|
||||
#define CONFIG_PPP_SUPPORT 1
|
||||
#define CONFIG_SPIRAM_SPEED_40M 1
|
||||
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
|
||||
@ -266,8 +273,10 @@
|
||||
#define CONFIG_MBEDTLS_TLS_CLIENT 1
|
||||
#define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI 1
|
||||
#define CONFIG_BT_ENABLED 1
|
||||
#define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY 1
|
||||
#define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1
|
||||
#define CONFIG_MONITOR_BAUD 115200
|
||||
#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT -1
|
||||
#define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1
|
||||
#define CONFIG_TCPIP_LWIP 1
|
||||
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST 1
|
||||
@ -278,6 +287,7 @@
|
||||
#define CONFIG_MBEDTLS_HAVE_TIME 1
|
||||
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY 1
|
||||
#define CONFIG_TCP_QUEUE_OOSEQ 1
|
||||
#define CONFIG_FATFS_ALLOC_PREFER_EXTRAM 1
|
||||
#define CONFIG_GATTS_ENABLE 1
|
||||
#define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE 0
|
||||
#define CONFIG_ADC_CAL_EFUSE_VREF_ENABLE 1
|
||||
@ -287,6 +297,7 @@
|
||||
#define CONFIG_SUPPORT_TERMIOS 1
|
||||
#define CONFIG_CLASSIC_BT_ENABLED 1
|
||||
#define CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK 1
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK 1
|
||||
#define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1
|
||||
#define CONFIG_IDF_TARGET "esp32"
|
||||
#define CONFIG_WL_SECTOR_SIZE_4096 1
|
||||
|
@ -139,6 +139,7 @@ typedef struct {
|
||||
int dma_buf_count; /*!< I2S DMA Buffer Count */
|
||||
int dma_buf_len; /*!< I2S DMA Buffer Length */
|
||||
bool use_apll; /*!< I2S using APLL as main I2S clock, enable it to get accurate clock */
|
||||
bool tx_desc_auto_clear; /*!< I2S auto clear tx descriptor if there is underflow condition (helps in avoiding noise in case of data unavailability) */
|
||||
int fixed_mclk; /*!< I2S using fixed MCLK output. If use_apll = true and fixed_mclk > 0, then the clock output for i2s is fixed and equal to the fixed_mclk value.*/
|
||||
} i2s_config_t;
|
||||
|
||||
|
@ -80,6 +80,19 @@ typedef enum {
|
||||
RMT_CARRIER_LEVEL_MAX
|
||||
} rmt_carrier_level_t;
|
||||
|
||||
typedef enum {
|
||||
RMT_CHANNEL_UNINIT = 0, /*!< RMT channel uninitialized */
|
||||
RMT_CHANNEL_IDLE = 1, /*!< RMT channel status idle */
|
||||
RMT_CHANNEL_BUSY = 2, /*!< RMT channel status busy */
|
||||
} rmt_channel_status_t;
|
||||
|
||||
/**
|
||||
* @brief Data struct of RMT channel status
|
||||
*/
|
||||
typedef struct {
|
||||
rmt_channel_status_t status[RMT_CHANNEL_MAX]; /*!< Store the current status of each channel */
|
||||
} rmt_channel_status_result_t;
|
||||
|
||||
/**
|
||||
* @brief Data struct of RMT TX configure parameters
|
||||
*/
|
||||
@ -496,6 +509,7 @@ esp_err_t rmt_set_idle_level(rmt_channel_t channel, bool idle_out_en, rmt_idle_l
|
||||
* @param channel RMT channel (0-7)
|
||||
*
|
||||
* @param status Pointer to accept channel status.
|
||||
* Please refer to RMT_CHnSTATUS_REG(n=0~7) in `rmt_reg.h` for more details of each field.
|
||||
*
|
||||
* @return
|
||||
* - ESP_ERR_INVALID_ARG Parameter error
|
||||
@ -679,6 +693,19 @@ esp_err_t rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, int intr
|
||||
*/
|
||||
esp_err_t rmt_driver_uninstall(rmt_channel_t channel);
|
||||
|
||||
/**
|
||||
* @brief Get the current status of eight channels.
|
||||
*
|
||||
* @note Do not call this function if it is possible that `rmt_driver_uninstall` will be called at the same time.
|
||||
*
|
||||
* @param[out] channel_status store the current status of each channel
|
||||
*
|
||||
* @return
|
||||
* - ESP_ERR_INVALID_ARG Parameter is NULL
|
||||
* - ESP_OK Success
|
||||
*/
|
||||
esp_err_t rmt_get_channel_status(rmt_channel_status_result_t *channel_status);
|
||||
|
||||
/**
|
||||
* @brief RMT send waveform from rmt_item array.
|
||||
*
|
||||
|
@ -73,7 +73,10 @@ struct spi_slave_transaction_t {
|
||||
size_t length; ///< Total data length, in bits
|
||||
size_t trans_len; ///< Transaction data length, in bits
|
||||
const void *tx_buffer; ///< Pointer to transmit buffer, or NULL for no MOSI phase
|
||||
void *rx_buffer; ///< Pointer to receive buffer, or NULL for no MISO phase
|
||||
void *rx_buffer; /**< Pointer to receive buffer, or NULL for no MISO phase.
|
||||
* When the DMA is anabled, must start at WORD boundary (``rx_buffer%4==0``),
|
||||
* and has length of a multiple of 4 bytes.
|
||||
*/
|
||||
void *user; ///< User-defined variable. Can be used to store eg transaction ID.
|
||||
};
|
||||
|
||||
|
@ -801,7 +801,7 @@ esp_err_t uart_get_collision_flag(uart_port_t uart_num, bool* collision_flag);
|
||||
* light sleep. This function allows setting the threshold value.
|
||||
*
|
||||
* Stop bit and parity bits (if enabled) also contribute to the number of edges.
|
||||
* For example, letter 'a' with ASCII code 97 is encoded as 010001101 on the wire
|
||||
* For example, letter 'a' with ASCII code 97 is encoded as 0100001101 on the wire
|
||||
* (with 8n1 configuration), start and stop bits included. This sequence has 3
|
||||
* positive edges (transitions from 0 to 1). Therefore, to wake up the system
|
||||
* when 'a' is sent, set wakeup_threshold=3.
|
||||
@ -813,7 +813,10 @@ esp_err_t uart_get_collision_flag(uart_port_t uart_num, bool* collision_flag);
|
||||
* correct baud rate all the time, select REF_TICK as UART clock source,
|
||||
* by setting use_ref_tick field in uart_config_t to true.
|
||||
*
|
||||
* @note in ESP32, UART2 does not support light sleep wakeup feature.
|
||||
* @note in ESP32, the wakeup signal can only be input via IO_MUX (i.e.
|
||||
* GPIO3 should be configured as function_1 to wake up UART0,
|
||||
* GPIO9 should be configured as function_5 to wake up UART1), UART2
|
||||
* does not support light sleep wakeup feature.
|
||||
*
|
||||
* @param uart_num UART number
|
||||
* @param wakeup_threshold number of RX edges for light sleep wakeup, value is 3 .. 0x3ff.
|
||||
|
179
tools/sdk/include/esp32-camera/esp_camera.h
Executable file
179
tools/sdk/include/esp32-camera/esp_camera.h
Executable file
@ -0,0 +1,179 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* Example Use
|
||||
*
|
||||
static camera_config_t camera_example_config = {
|
||||
.pin_pwdn = PIN_PWDN,
|
||||
.pin_reset = PIN_RESET,
|
||||
.pin_xclk = PIN_XCLK,
|
||||
.pin_sscb_sda = PIN_SIOD,
|
||||
.pin_sscb_scl = PIN_SIOC,
|
||||
.pin_d7 = PIN_D7,
|
||||
.pin_d6 = PIN_D6,
|
||||
.pin_d5 = PIN_D5,
|
||||
.pin_d4 = PIN_D4,
|
||||
.pin_d3 = PIN_D3,
|
||||
.pin_d2 = PIN_D2,
|
||||
.pin_d1 = PIN_D1,
|
||||
.pin_d0 = PIN_D0,
|
||||
.pin_vsync = PIN_VSYNC,
|
||||
.pin_href = PIN_HREF,
|
||||
.pin_pclk = PIN_PCLK,
|
||||
|
||||
.xclk_freq_hz = 20000000,
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
.pixel_format = PIXFORMAT_JPEG,
|
||||
.frame_size = FRAMESIZE_SVGA,
|
||||
.jpeg_quality = 10,
|
||||
.fb_count = 2
|
||||
};
|
||||
|
||||
esp_err_t camera_example_init(){
|
||||
return esp_camera_init(&camera_example_config);
|
||||
}
|
||||
|
||||
esp_err_t camera_example_capture(){
|
||||
//capture a frame
|
||||
camera_fb_t * fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAG, "Frame buffer could not be acquired");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
//replace this with your own function
|
||||
display_image(fb->width, fb->height, fb->pixformat, fb->buf, fb->len);
|
||||
|
||||
//return the frame buffer back to be reused
|
||||
esp_camera_fb_return(fb);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "driver/ledc.h"
|
||||
#include "sensor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Configuration structure for camera initialization
|
||||
*/
|
||||
typedef struct {
|
||||
int pin_pwdn; /*!< GPIO pin for camera power down line */
|
||||
int pin_reset; /*!< GPIO pin for camera reset line */
|
||||
int pin_xclk; /*!< GPIO pin for camera XCLK line */
|
||||
int pin_sscb_sda; /*!< GPIO pin for camera SDA line */
|
||||
int pin_sscb_scl; /*!< GPIO pin for camera SCL line */
|
||||
int pin_d7; /*!< GPIO pin for camera D7 line */
|
||||
int pin_d6; /*!< GPIO pin for camera D6 line */
|
||||
int pin_d5; /*!< GPIO pin for camera D5 line */
|
||||
int pin_d4; /*!< GPIO pin for camera D4 line */
|
||||
int pin_d3; /*!< GPIO pin for camera D3 line */
|
||||
int pin_d2; /*!< GPIO pin for camera D2 line */
|
||||
int pin_d1; /*!< GPIO pin for camera D1 line */
|
||||
int pin_d0; /*!< GPIO pin for camera D0 line */
|
||||
int pin_vsync; /*!< GPIO pin for camera VSYNC line */
|
||||
int pin_href; /*!< GPIO pin for camera HREF line */
|
||||
int pin_pclk; /*!< GPIO pin for camera PCLK line */
|
||||
|
||||
int xclk_freq_hz; /*!< Frequency of XCLK signal, in Hz. Either 10KHz or 20KHz */
|
||||
|
||||
ledc_timer_t ledc_timer; /*!< LEDC timer to be used for generating XCLK */
|
||||
ledc_channel_t ledc_channel; /*!< LEDC channel to be used for generating XCLK */
|
||||
|
||||
pixformat_t pixel_format; /*!< Format of the pixel data: PIXFORMAT_ + YUV422|GRAYSCALE|RGB565|JPEG */
|
||||
framesize_t frame_size; /*!< Size of the output image: FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA */
|
||||
|
||||
int jpeg_quality; /*!< Quality of JPEG output. 0-63 lower means higher quality */
|
||||
size_t fb_count; /*!< Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed) */
|
||||
} camera_config_t;
|
||||
|
||||
/**
|
||||
* @brief Data structure of camera frame buffer
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t * buf; /*!< Pointer to the pixel data */
|
||||
size_t len; /*!< Length of the buffer in bytes */
|
||||
size_t width; /*!< Width of the buffer in pixels */
|
||||
size_t height; /*!< Height of the buffer in pixels */
|
||||
pixformat_t format; /*!< Format of the pixel data */
|
||||
} camera_fb_t;
|
||||
|
||||
#define ESP_ERR_CAMERA_BASE 0x20000
|
||||
#define ESP_ERR_CAMERA_NOT_DETECTED (ESP_ERR_CAMERA_BASE + 1)
|
||||
#define ESP_ERR_CAMERA_FAILED_TO_SET_FRAME_SIZE (ESP_ERR_CAMERA_BASE + 2)
|
||||
#define ESP_ERR_CAMERA_NOT_SUPPORTED (ESP_ERR_CAMERA_BASE + 3)
|
||||
|
||||
/**
|
||||
* @brief Initialize the camera driver
|
||||
*
|
||||
* @note call camera_probe before calling this function
|
||||
*
|
||||
* This function detects and configures camera over I2C interface,
|
||||
* allocates framebuffer and DMA buffers,
|
||||
* initializes parallel I2S input, and sets up DMA descriptors.
|
||||
*
|
||||
* Currently this function can only be called once and there is
|
||||
* no way to de-initialize this module.
|
||||
*
|
||||
* @param config Camera configuration parameters
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_camera_init(const camera_config_t* config);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize the camera driver
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_STATE if the driver hasn't been initialized yet
|
||||
*/
|
||||
esp_err_t esp_camera_deinit();
|
||||
|
||||
/**
|
||||
* @brief Obtain pointer to a frame buffer.
|
||||
*
|
||||
* @return pointer to the frame buffer
|
||||
*/
|
||||
camera_fb_t* esp_camera_fb_get();
|
||||
|
||||
/**
|
||||
* @brief Return the frame buffer to be reused again.
|
||||
*
|
||||
* @param fb Pointer to the frame buffer
|
||||
*/
|
||||
void esp_camera_fb_return(camera_fb_t * fb);
|
||||
|
||||
/**
|
||||
* @brief Get a pointer to the image sensor control structure
|
||||
*
|
||||
* @return pointer to the sensor
|
||||
*/
|
||||
sensor_t * esp_camera_sensor_get();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "img_converters.h"
|
||||
|
43
tools/sdk/include/esp32-camera/esp_jpg_decode.h
Normal file
43
tools/sdk/include/esp32-camera/esp_jpg_decode.h
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
#ifndef _ESP_JPG_DECODE_H_
|
||||
#define _ESP_JPG_DECODE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
typedef enum {
|
||||
JPG_SCALE_NONE,
|
||||
JPG_SCALE_2X,
|
||||
JPG_SCALE_4X,
|
||||
JPG_SCALE_8X,
|
||||
JPG_SCALE_MAX = JPG_SCALE_8X
|
||||
} jpg_scale_t;
|
||||
|
||||
typedef size_t (* jpg_reader_cb)(void * arg, size_t index, uint8_t *buf, size_t len);
|
||||
typedef bool (* jpg_writer_cb)(void * arg, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t *data);
|
||||
|
||||
esp_err_t esp_jpg_decode(size_t len, jpg_scale_t scale, jpg_reader_cb reader, jpg_writer_cb writer, void * arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_JPG_DECODE_H_ */
|
126
tools/sdk/include/esp32-camera/img_converters.h
Normal file
126
tools/sdk/include/esp32-camera/img_converters.h
Normal file
@ -0,0 +1,126 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
#ifndef _IMG_CONVERTERS_H_
|
||||
#define _IMG_CONVERTERS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_camera.h"
|
||||
|
||||
typedef size_t (* jpg_out_cb)(void * arg, size_t index, const void* data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Convert image buffer to JPEG
|
||||
*
|
||||
* @param src Source buffer in RGB565, RGB888, YUYV or GRAYSCALE format
|
||||
* @param src_len Length in bytes of the source buffer
|
||||
* @param width Width in pixels of the source image
|
||||
* @param height Height in pixels of the source image
|
||||
* @param format Format of the source image
|
||||
* @param quality JPEG quality of the resulting image
|
||||
* @param cp Callback to be called to write the bytes of the output JPEG
|
||||
* @param arg Pointer to be passed to the callback
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool fmt2jpg_cb(uint8_t *src, size_t src_len, uint16_t width, uint16_t height, pixformat_t format, uint8_t quality, jpg_out_cb cb, void * arg);
|
||||
|
||||
/**
|
||||
* @brief Convert camera frame buffer to JPEG
|
||||
*
|
||||
* @param fb Source camera frame buffer
|
||||
* @param quality JPEG quality of the resulting image
|
||||
* @param cp Callback to be called to write the bytes of the output JPEG
|
||||
* @param arg Pointer to be passed to the callback
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool frame2jpg_cb(camera_fb_t * fb, uint8_t quality, jpg_out_cb cb, void * arg);
|
||||
|
||||
/**
|
||||
* @brief Convert image buffer to JPEG buffer
|
||||
*
|
||||
* @param src Source buffer in RGB565, RGB888, YUYV or GRAYSCALE format
|
||||
* @param src_len Length in bytes of the source buffer
|
||||
* @param width Width in pixels of the source image
|
||||
* @param height Height in pixels of the source image
|
||||
* @param format Format of the source image
|
||||
* @param quality JPEG quality of the resulting image
|
||||
* @param out Pointer to be populated with the address of the resulting buffer
|
||||
* @param out_len Pointer to be populated with the length of the output buffer
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool fmt2jpg(uint8_t *src, size_t src_len, uint16_t width, uint16_t height, pixformat_t format, uint8_t quality, uint8_t ** out, size_t * out_len);
|
||||
|
||||
/**
|
||||
* @brief Convert camera frame buffer to JPEG buffer
|
||||
*
|
||||
* @param fb Source camera frame buffer
|
||||
* @param quality JPEG quality of the resulting image
|
||||
* @param out Pointer to be populated with the address of the resulting buffer
|
||||
* @param out_len Pointer to be populated with the length of the output buffer
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool frame2jpg(camera_fb_t * fb, uint8_t quality, uint8_t ** out, size_t * out_len);
|
||||
|
||||
/**
|
||||
* @brief Convert image buffer to BMP buffer
|
||||
*
|
||||
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
|
||||
* @param src_len Length in bytes of the source buffer
|
||||
* @param width Width in pixels of the source image
|
||||
* @param height Height in pixels of the source image
|
||||
* @param format Format of the source image
|
||||
* @param out Pointer to be populated with the address of the resulting buffer
|
||||
* @param out_len Pointer to be populated with the length of the output buffer
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool fmt2bmp(uint8_t *src, size_t src_len, uint16_t width, uint16_t height, pixformat_t format, uint8_t ** out, size_t * out_len);
|
||||
|
||||
/**
|
||||
* @brief Convert camera frame buffer to BMP buffer
|
||||
*
|
||||
* @param fb Source camera frame buffer
|
||||
* @param out Pointer to be populated with the address of the resulting buffer
|
||||
* @param out_len Pointer to be populated with the length of the output buffer
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool frame2bmp(camera_fb_t * fb, uint8_t ** out, size_t * out_len);
|
||||
|
||||
/**
|
||||
* @brief Convert image buffer to RGB888 buffer (used for face detection)
|
||||
*
|
||||
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
|
||||
* @param src_len Length in bytes of the source buffer
|
||||
* @param format Format of the source image
|
||||
* @param rgb_buf Pointer to the output buffer (width * height * 3)
|
||||
*
|
||||
* @return true on success
|
||||
*/
|
||||
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _IMG_CONVERTERS_H_ */
|
127
tools/sdk/include/esp32-camera/sensor.h
Executable file
127
tools/sdk/include/esp32-camera/sensor.h
Executable file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* This file is part of the OpenMV project.
|
||||
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
|
||||
* This work is licensed under the MIT license, see the file LICENSE for details.
|
||||
*
|
||||
* Sensor abstraction layer.
|
||||
*
|
||||
*/
|
||||
#ifndef __SENSOR_H__
|
||||
#define __SENSOR_H__
|
||||
#include <stdint.h>
|
||||
|
||||
#define OV9650_PID (0x96)
|
||||
#define OV2640_PID (0x26)
|
||||
#define OV7725_PID (0x77)
|
||||
|
||||
typedef enum {
|
||||
PIXFORMAT_RGB565, // 2BPP/RGB565
|
||||
PIXFORMAT_YUV422, // 2BPP/YUV422
|
||||
PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE
|
||||
PIXFORMAT_JPEG, // JPEG/COMPRESSED
|
||||
PIXFORMAT_RGB888, // 3BPP/RGB888
|
||||
} pixformat_t;
|
||||
|
||||
typedef enum {
|
||||
FRAMESIZE_QQVGA, // 160x120
|
||||
FRAMESIZE_QQVGA2, // 128x160
|
||||
FRAMESIZE_QCIF, // 176x144
|
||||
FRAMESIZE_HQVGA, // 240x176
|
||||
FRAMESIZE_QVGA, // 320x240
|
||||
FRAMESIZE_CIF, // 400x296
|
||||
FRAMESIZE_VGA, // 640x480
|
||||
FRAMESIZE_SVGA, // 800x600
|
||||
FRAMESIZE_XGA, // 1024x768
|
||||
FRAMESIZE_SXGA, // 1280x1024
|
||||
FRAMESIZE_UXGA, // 1600x1200
|
||||
} framesize_t;
|
||||
|
||||
typedef enum {
|
||||
GAINCEILING_2X,
|
||||
GAINCEILING_4X,
|
||||
GAINCEILING_8X,
|
||||
GAINCEILING_16X,
|
||||
GAINCEILING_32X,
|
||||
GAINCEILING_64X,
|
||||
GAINCEILING_128X,
|
||||
} gainceiling_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t MIDH;
|
||||
uint8_t MIDL;
|
||||
uint8_t PID;
|
||||
uint8_t VER;
|
||||
} sensor_id_t;
|
||||
|
||||
typedef struct {
|
||||
framesize_t framesize;//0 - 10
|
||||
uint8_t quality;//0 - 63
|
||||
int8_t brightness;//-2 - 2
|
||||
int8_t contrast;//-2 - 2
|
||||
int8_t saturation;//-2 - 2
|
||||
uint8_t special_effect;//0 - 6
|
||||
uint8_t wb_mode;//0 - 4
|
||||
uint8_t awb;
|
||||
uint8_t awb_gain;
|
||||
uint8_t aec;
|
||||
uint8_t aec2;
|
||||
int8_t ae_level;//-2 - 2
|
||||
uint16_t aec_value;//0 - 1200
|
||||
uint8_t agc;
|
||||
uint8_t agc_gain;//0 - 30
|
||||
uint8_t gainceiling;//0 - 6
|
||||
uint8_t bpc;
|
||||
uint8_t wpc;
|
||||
uint8_t raw_gma;
|
||||
uint8_t lenc;
|
||||
uint8_t hmirror;
|
||||
uint8_t vflip;
|
||||
uint8_t dcw;
|
||||
uint8_t colorbar;
|
||||
} camera_status_t;
|
||||
|
||||
typedef struct _sensor sensor_t;
|
||||
typedef struct _sensor {
|
||||
sensor_id_t id; // Sensor ID.
|
||||
uint8_t slv_addr; // Sensor I2C slave address.
|
||||
pixformat_t pixformat;
|
||||
camera_status_t status;
|
||||
|
||||
// Sensor function pointers
|
||||
int (*init_status) (sensor_t *sensor);
|
||||
int (*reset) (sensor_t *sensor);
|
||||
int (*set_pixformat) (sensor_t *sensor, pixformat_t pixformat);
|
||||
int (*set_framesize) (sensor_t *sensor, framesize_t framesize);
|
||||
int (*set_contrast) (sensor_t *sensor, int level);
|
||||
int (*set_brightness) (sensor_t *sensor, int level);
|
||||
int (*set_saturation) (sensor_t *sensor, int level);
|
||||
int (*set_gainceiling) (sensor_t *sensor, gainceiling_t gainceiling);
|
||||
int (*set_quality) (sensor_t *sensor, int quality);
|
||||
int (*set_colorbar) (sensor_t *sensor, int enable);
|
||||
int (*set_whitebal) (sensor_t *sensor, int enable);
|
||||
int (*set_gain_ctrl) (sensor_t *sensor, int enable);
|
||||
int (*set_exposure_ctrl) (sensor_t *sensor, int enable);
|
||||
int (*set_hmirror) (sensor_t *sensor, int enable);
|
||||
int (*set_vflip) (sensor_t *sensor, int enable);
|
||||
|
||||
int (*set_aec2) (sensor_t *sensor, int enable);
|
||||
int (*set_awb_gain) (sensor_t *sensor, int enable);
|
||||
int (*set_agc_gain) (sensor_t *sensor, int gain);
|
||||
int (*set_aec_value) (sensor_t *sensor, int gain);
|
||||
|
||||
int (*set_special_effect) (sensor_t *sensor, int effect);
|
||||
int (*set_wb_mode) (sensor_t *sensor, int mode);
|
||||
int (*set_ae_level) (sensor_t *sensor, int level);
|
||||
|
||||
int (*set_dcw) (sensor_t *sensor, int enable);
|
||||
int (*set_bpc) (sensor_t *sensor, int enable);
|
||||
int (*set_wpc) (sensor_t *sensor, int enable);
|
||||
|
||||
int (*set_raw_gma) (sensor_t *sensor, int enable);
|
||||
int (*set_lenc) (sensor_t *sensor, int enable);
|
||||
} sensor_t;
|
||||
|
||||
// Resolution table (in camera.c)
|
||||
extern const int resolution[][2];
|
||||
|
||||
#endif /* __SENSOR_H__ */
|
@ -187,6 +187,11 @@ typedef enum {
|
||||
this event, and add the corresponding scan done handler in this event. */
|
||||
MESH_EVENT_NETWORK_STATE, /**< network state, such as whether current mesh network has a root. */
|
||||
MESH_EVENT_STOP_RECONNECTION, /**< the root stops reconnecting to the router and non-root devices stop reconnecting to their parents. */
|
||||
MESH_EVENT_FIND_NETWORK, /**< when the channel field in mesh configuration is set to zero, mesh stack will perform a
|
||||
full channel scan to find a mesh network that can join, and return the channel value
|
||||
after finding it. */
|
||||
MESH_EVENT_ROUTER_SWITCH, /**< if users specify BSSID of the router in mesh configuration, when the root connects to another
|
||||
router with the same SSID, this event will be posted and the new router information is attached. */
|
||||
MESH_EVENT_MAX,
|
||||
} mesh_event_id_t;
|
||||
|
||||
@ -310,6 +315,14 @@ typedef struct {
|
||||
mesh_addr_t rc_addr; /**< root address specified by users via API esp_mesh_waive_root() */
|
||||
} mesh_event_vote_started_t;
|
||||
|
||||
/**
|
||||
* @brief find a mesh network that this device can join
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t channel; /**< channel number of the new found network */
|
||||
uint8_t router_bssid[6]; /**< router BSSID */
|
||||
} mesh_event_find_network_t;
|
||||
|
||||
/**
|
||||
* @brief IP settings from LwIP stack
|
||||
*/
|
||||
@ -381,6 +394,11 @@ typedef struct {
|
||||
bool is_rootless; /**< whether current mesh network has a root */
|
||||
} mesh_event_network_state_t;
|
||||
|
||||
/**
|
||||
* @brief New router information
|
||||
*/
|
||||
typedef system_event_sta_connected_t mesh_event_router_switch_t;
|
||||
|
||||
/**
|
||||
* @brief Mesh event information
|
||||
*/
|
||||
@ -405,6 +423,8 @@ typedef union {
|
||||
mesh_event_root_fixed_t root_fixed; /**< fixed root */
|
||||
mesh_event_scan_done_t scan_done; /**< scan done */
|
||||
mesh_event_network_state_t network_state; /**< network state, such as whether current mesh network has a root. */
|
||||
mesh_event_find_network_t find_network; /**< network found that can join */
|
||||
mesh_event_router_switch_t router_switch; /**< new router information */
|
||||
} mesh_event_info_t;
|
||||
|
||||
/**
|
||||
@ -447,8 +467,14 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint8_t ssid[32]; /**< SSID */
|
||||
uint8_t ssid_len; /**< length of SSID */
|
||||
uint8_t bssid[6]; /**< BSSID, if router is hidden, this value is mandatory */
|
||||
uint8_t bssid[6]; /**< BSSID, if this value is specified, users should also specify "allow_router_switch". */
|
||||
uint8_t password[64]; /**< password */
|
||||
bool allow_router_switch; /**< if the BSSID is specified and this value is also set, when the router of this specified BSSID
|
||||
fails to be found after "fail" (mesh_attempts_t) times, the whole network is allowed to switch
|
||||
to another router with the same SSID. The new router might also be on a different channel.
|
||||
The default value is false.
|
||||
There is a risk that if the password is different between the new switched router and the previous
|
||||
one, the mesh network could be established but the root will never connect to the new switched router. */
|
||||
} mesh_router_t;
|
||||
|
||||
/**
|
||||
@ -464,6 +490,8 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t channel; /**< channel, the mesh network on */
|
||||
bool allow_channel_switch; /**< if this value is set, when "fail" (mesh_attempts_t) times is reached, device will change to
|
||||
a full channel scan for a network that could join. The default value is false. */
|
||||
mesh_event_cb_t event_cb; /**< mesh event callback */
|
||||
mesh_addr_t mesh_id; /**< mesh network identification */
|
||||
mesh_router_t router; /**< router configuration */
|
||||
@ -1412,6 +1440,23 @@ esp_err_t esp_mesh_disconnect(void);
|
||||
*/
|
||||
esp_err_t esp_mesh_connect(void);
|
||||
|
||||
/**
|
||||
* @brief Cause the root device to add Channel Switch Announcement Element (CSA IE) to beacon
|
||||
* - Set the new channel
|
||||
* - Set how many beacons with CSA IE will be sent before changing a new channel
|
||||
* - Enable the channel switch function
|
||||
*
|
||||
* @attention This API is only called by the root.
|
||||
*
|
||||
* @param[in] new_bssid the new router BSSID if the router changes
|
||||
* @param[in] csa_newchan the new channel number to which the whole network is moving
|
||||
* @param[in] csa_count channel switch period(beacon count), unit is based on beacon interval of its softAP, the default value is 15.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK
|
||||
*/
|
||||
esp_err_t esp_mesh_switch_channel(const uint8_t *new_bssid, int csa_newchan, int csa_count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -156,6 +156,18 @@ esp_err_t esp_phy_load_cal_data_from_nvs(esp_phy_calibration_data_t* out_cal_dat
|
||||
*/
|
||||
esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_data);
|
||||
|
||||
/**
|
||||
* @brief Erase PHY calibration data which is stored in the NVS
|
||||
*
|
||||
* This is a function which can be used to trigger full calibration as a last-resort remedy
|
||||
* if partial calibration is used. It can be called in the application based on some conditions
|
||||
* (e.g. an option provided in some diagnostic mode).
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
* @return others on fail. Please refer to NVS API return value error number.
|
||||
*/
|
||||
esp_err_t esp_phy_erase_cal_data_in_nvs(void);
|
||||
|
||||
/**
|
||||
* @brief Initialize PHY and RF module
|
||||
*
|
||||
@ -214,6 +226,12 @@ esp_err_t esp_modem_sleep_register(modem_sleep_module_t module);
|
||||
*/
|
||||
esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Get the time stamp when PHY/RF was switched on
|
||||
* @return return 0 if PHY/RF is never switched on. Otherwise return time in
|
||||
* microsecond since boot when phy/rf was last switched on
|
||||
*/
|
||||
int64_t esp_phy_rf_get_on_ts(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -46,6 +46,40 @@ typedef struct {
|
||||
void *storage; /**< storage for FreeRTOS queue */
|
||||
} wifi_static_queue_t;
|
||||
|
||||
/**
|
||||
* @brief WiFi log level
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
WIFI_LOG_ERROR = 0, /*enabled by default*/
|
||||
WIFI_LOG_WARNING, /*enabled by default*/
|
||||
WIFI_LOG_INFO, /*enabled by default*/
|
||||
WIFI_LOG_DEBUG, /*can be set in menuconfig*/
|
||||
WIFI_LOG_VERBOSE, /*can be set in menuconfig*/
|
||||
} wifi_log_level_t;
|
||||
|
||||
/**
|
||||
* @brief WiFi log module definition
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
WIFI_LOG_MODULE_ALL = 0, /*all log modules */
|
||||
WIFI_LOG_MODULE_WIFI, /*logs related to WiFi*/
|
||||
WIFI_LOG_MODULE_COEX, /*logs related to WiFi and BT(or BLE) coexist*/
|
||||
WIFI_LOG_MODULE_MESH, /*logs related to Mesh*/
|
||||
} wifi_log_module_t;
|
||||
|
||||
/**
|
||||
* @brief WiFi log submodule definition
|
||||
*
|
||||
*/
|
||||
#define WIFI_LOG_SUBMODULE_ALL (0) /*all log submodules*/
|
||||
#define WIFI_LOG_SUBMODULE_INIT (1) /*logs related to initialization*/
|
||||
#define WIFI_LOG_SUBMODULE_IOCTL (1<<1) /*logs related to API calling*/
|
||||
#define WIFI_LOG_SUBMODULE_CONN (1<<2) /*logs related to connecting*/
|
||||
#define WIFI_LOG_SUBMODULE_SCAN (1<<3) /*logs related to scaning*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialize Wi-Fi Driver
|
||||
* Alloc resource for WiFi driver, such as WiFi control structure, RX/TX buffer,
|
||||
@ -224,6 +258,46 @@ void *wifi_calloc( size_t n, size_t size );
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_update_mac_time( uint32_t time_delta );
|
||||
|
||||
/**
|
||||
* @brief Set current WiFi log level
|
||||
*
|
||||
* @param level Log level.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_FAIL: level is invalid
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_set_log_level(wifi_log_level_t level);
|
||||
|
||||
/**
|
||||
* @brief Set current log module and submodule
|
||||
*
|
||||
* @param module Log module
|
||||
* @param submodule Log submodule
|
||||
* @param enable enable or disable
|
||||
* If module == 0 && enable == 0, all log modules are disabled.
|
||||
* If module == 0 && enable == 1, all log modules are enabled.
|
||||
* If submodule == 0 && enable == 0, all log submodules are disabled.
|
||||
* If submodule == 0 && enable == 1, all log submodules are enabled.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_set_log_mod(wifi_log_module_t module, uint32_t submodule, bool enable);
|
||||
|
||||
/**
|
||||
* @brief Get current WiFi log info
|
||||
*
|
||||
* @param log_level the return log level.
|
||||
* @param log_mod the return log module and submodule
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_log(wifi_log_level_t *log_level, uint32_t *log_mod);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -301,4 +301,11 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
||||
/* Some memory allocation functions are declared here in addition to ff.h, so that
|
||||
they can be used also by external code when LFN feature is disabled.
|
||||
*/
|
||||
void* ff_memalloc (UINT msize);
|
||||
void* ff_memcalloc (UINT num, UINT size);
|
||||
|
||||
|
||||
/*--- End of configuration options ---*/
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 15
|
||||
/* Due to code size & linker layout differences interacting with cache, VFS
|
||||
microbenchmark currently runs slower with PSRAM enabled. */
|
||||
#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME 50000
|
||||
#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM 40000
|
||||
#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME 20000
|
||||
#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM 25000
|
||||
// throughput performance by iperf
|
||||
#define IDF_PERFORMANCE_MIN_TCP_RX_THROUGHPUT 50
|
||||
#define IDF_PERFORMANCE_MIN_TCP_TX_THROUGHPUT 40
|
||||
|
@ -14,6 +14,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include <freertos/FreeRTOSConfig.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -24,11 +27,22 @@ extern "C" {
|
||||
|
||||
/** pthread configuration structure that influences pthread creation */
|
||||
typedef struct {
|
||||
size_t stack_size; ///< the stack size of the pthread
|
||||
size_t prio; ///< the thread's priority
|
||||
bool inherit_cfg; ///< inherit this configuration further
|
||||
size_t stack_size; ///< The stack size of the pthread
|
||||
size_t prio; ///< The thread's priority
|
||||
bool inherit_cfg; ///< Inherit this configuration further
|
||||
const char* thread_name; ///< The thread name.
|
||||
int pin_to_core; ///< The core id to pin the thread to. Has the same value range as xCoreId argument of xTaskCreatePinnedToCore.
|
||||
} esp_pthread_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Creates a default pthread configuration based
|
||||
* on the values set via menuconfig.
|
||||
*
|
||||
* @return
|
||||
* A default configuration structure.
|
||||
*/
|
||||
esp_pthread_cfg_t esp_pthread_get_default_config();
|
||||
|
||||
/**
|
||||
* @brief Configure parameters for creating pthread
|
||||
*
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_APB_CTRL_STRUCT_H_
|
||||
#define _SOC_APB_CTRL_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_CAN_STRUCT_H_
|
||||
#define _SOC_CAN_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_GPIO_SD_STRUCT_H_
|
||||
#define _SOC_GPIO_SD_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_GPIO_STRUCT_H_
|
||||
#define _SOC_GPIO_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_HINF_STRUCT_H_
|
||||
#define _SOC_HINF_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_HOST_STRUCT_H_
|
||||
#define _SOC_HOST_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_I2C_STRUCT_H_
|
||||
#define _SOC_I2C_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_I2S_STRUCT_H_
|
||||
#define _SOC_I2S_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_LEDC_STRUCT_H_
|
||||
#define _SOC_LEDC_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_MCPWM_STRUCT_H__
|
||||
#define _SOC_MCPWM_STRUCT_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_PCNT_STRUCT_H_
|
||||
#define _SOC_PCNT_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -995,6 +995,60 @@
|
||||
#define RMT_STATUS_CH0_M ((RMT_STATUS_CH0_V)<<(RMT_STATUS_CH0_S))
|
||||
#define RMT_STATUS_CH0_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH0_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH0 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel0 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH0 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH0_M ((RMT_APB_MEM_RD_ERR_CH0_V)<<(RMT_APB_MEM_RD_ERR_CH0_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH0_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH0_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH0 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel0 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH0 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH0_M ((RMT_APB_MEM_WR_ERR_CH0_V)<<(RMT_APB_MEM_WR_ERR_CH0_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH0_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH0_S 30
|
||||
/* RMT_MEM_EMPTY_CH0 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel0. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH0 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH0_M ((RMT_MEM_EMPTY_CH0_V)<<(RMT_MEM_EMPTY_CH0_S))
|
||||
#define RMT_MEM_EMPTY_CH0_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH0_S 29
|
||||
/* RMT_MEM_FULL_CH0 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel0 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH0 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH0_M ((RMT_MEM_FULL_CH0_V)<<(RMT_MEM_FULL_CH0_S))
|
||||
#define RMT_MEM_FULL_CH0_V 0x1
|
||||
#define RMT_MEM_FULL_CH0_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH0 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel0 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH0 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH0_M ((RMT_MEM_OWNER_ERR_CH0_V)<<(RMT_MEM_OWNER_ERR_CH0_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH0_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH0_S 27
|
||||
/* RMT_STATE_CH0 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel0 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH0 0x07000000
|
||||
#define RMT_STATE_CH0_M ((RMT_STATE_CH0_V)<<(RMT_STATE_CH0_S))
|
||||
#define RMT_STATE_CH0_V 0x7
|
||||
#define RMT_STATE_CH0_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH0 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel0.*/
|
||||
#define RMT_MEM_RADDR_EX_CH0 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH0_M ((RMT_MEM_RADDR_EX_CH0_V)<<(RMT_MEM_RADDR_EX_CH0_S))
|
||||
#define RMT_MEM_RADDR_EX_CH0_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH0_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH0 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel0.*/
|
||||
#define RMT_MEM_WADDR_EX_CH0 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH0_M ((RMT_MEM_WADDR_EX_CH0_V)<<(RMT_MEM_WADDR_EX_CH0_S))
|
||||
#define RMT_MEM_WADDR_EX_CH0_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH0_S 0
|
||||
|
||||
#define RMT_CH1STATUS_REG (DR_REG_RMT_BASE + 0x0064)
|
||||
/* RMT_STATUS_CH1 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1003,6 +1057,60 @@
|
||||
#define RMT_STATUS_CH1_M ((RMT_STATUS_CH1_V)<<(RMT_STATUS_CH1_S))
|
||||
#define RMT_STATUS_CH1_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH1_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH1 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel1 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH1 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH1_M ((RMT_APB_MEM_RD_ERR_CH1_V)<<(RMT_APB_MEM_RD_ERR_CH1_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH1_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH1_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH1 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel1 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH1 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH1_M ((RMT_APB_MEM_WR_ERR_CH1_V)<<(RMT_APB_MEM_WR_ERR_CH1_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH1_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH1_S 30
|
||||
/* RMT_MEM_EMPTY_CH1 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel1. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH1 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH1_M ((RMT_MEM_EMPTY_CH1_V)<<(RMT_MEM_EMPTY_CH1_S))
|
||||
#define RMT_MEM_EMPTY_CH1_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH1_S 29
|
||||
/* RMT_MEM_FULL_CH1 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel1 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH1 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH1_M ((RMT_MEM_FULL_CH1_V)<<(RMT_MEM_FULL_CH1_S))
|
||||
#define RMT_MEM_FULL_CH1_V 0x1
|
||||
#define RMT_MEM_FULL_CH1_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH1 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel1 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH1 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH1_M ((RMT_MEM_OWNER_ERR_CH1_V)<<(RMT_MEM_OWNER_ERR_CH1_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH1_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH1_S 27
|
||||
/* RMT_STATE_CH1 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel1 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH1 0x07000000
|
||||
#define RMT_STATE_CH1_M ((RMT_STATE_CH1_V)<<(RMT_STATE_CH1_S))
|
||||
#define RMT_STATE_CH1_V 0x7
|
||||
#define RMT_STATE_CH1_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH1 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel1.*/
|
||||
#define RMT_MEM_RADDR_EX_CH1 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH1_M ((RMT_MEM_RADDR_EX_CH1_V)<<(RMT_MEM_RADDR_EX_CH1_S))
|
||||
#define RMT_MEM_RADDR_EX_CH1_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH1_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH1 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel1.*/
|
||||
#define RMT_MEM_WADDR_EX_CH1 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH1_M ((RMT_MEM_WADDR_EX_CH1_V)<<(RMT_MEM_WADDR_EX_CH1_S))
|
||||
#define RMT_MEM_WADDR_EX_CH1_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH1_S 0
|
||||
|
||||
#define RMT_CH2STATUS_REG (DR_REG_RMT_BASE + 0x0068)
|
||||
/* RMT_STATUS_CH2 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1011,6 +1119,60 @@
|
||||
#define RMT_STATUS_CH2_M ((RMT_STATUS_CH2_V)<<(RMT_STATUS_CH2_S))
|
||||
#define RMT_STATUS_CH2_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH2_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH2 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel2 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH2 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH2_M ((RMT_APB_MEM_RD_ERR_CH2_V)<<(RMT_APB_MEM_RD_ERR_CH2_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH2_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH2_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH2 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel2 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH2 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH2_M ((RMT_APB_MEM_WR_ERR_CH2_V)<<(RMT_APB_MEM_WR_ERR_CH2_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH2_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH2_S 30
|
||||
/* RMT_MEM_EMPTY_CH2 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel2. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH2 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH2_M ((RMT_MEM_EMPTY_CH2_V)<<(RMT_MEM_EMPTY_CH2_S))
|
||||
#define RMT_MEM_EMPTY_CH2_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH2_S 29
|
||||
/* RMT_MEM_FULL_CH2 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel2 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH2 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH2_M ((RMT_MEM_FULL_CH2_V)<<(RMT_MEM_FULL_CH2_S))
|
||||
#define RMT_MEM_FULL_CH2_V 0x1
|
||||
#define RMT_MEM_FULL_CH2_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH2 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel2 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH2 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH2_M ((RMT_MEM_OWNER_ERR_CH2_V)<<(RMT_MEM_OWNER_ERR_CH2_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH2_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH2_S 27
|
||||
/* RMT_STATE_CH2 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel2 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH2 0x07000000
|
||||
#define RMT_STATE_CH2_M ((RMT_STATE_CH2_V)<<(RMT_STATE_CH2_S))
|
||||
#define RMT_STATE_CH2_V 0x7
|
||||
#define RMT_STATE_CH2_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH2 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel2.*/
|
||||
#define RMT_MEM_RADDR_EX_CH2 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH2_M ((RMT_MEM_RADDR_EX_CH2_V)<<(RMT_MEM_RADDR_EX_CH2_S))
|
||||
#define RMT_MEM_RADDR_EX_CH2_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH2_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH2 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel2.*/
|
||||
#define RMT_MEM_WADDR_EX_CH2 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH2_M ((RMT_MEM_WADDR_EX_CH2_V)<<(RMT_MEM_WADDR_EX_CH2_S))
|
||||
#define RMT_MEM_WADDR_EX_CH2_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH2_S 0
|
||||
|
||||
#define RMT_CH3STATUS_REG (DR_REG_RMT_BASE + 0x006c)
|
||||
/* RMT_STATUS_CH3 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1019,6 +1181,60 @@
|
||||
#define RMT_STATUS_CH3_M ((RMT_STATUS_CH3_V)<<(RMT_STATUS_CH3_S))
|
||||
#define RMT_STATUS_CH3_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH3_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH3 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel3 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH3 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH3_M ((RMT_APB_MEM_RD_ERR_CH3_V)<<(RMT_APB_MEM_RD_ERR_CH3_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH3_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH3_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH3 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel3 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH3 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH3_M ((RMT_APB_MEM_WR_ERR_CH3_V)<<(RMT_APB_MEM_WR_ERR_CH3_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH3_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH3_S 30
|
||||
/* RMT_MEM_EMPTY_CH3 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel3. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH3 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH3_M ((RMT_MEM_EMPTY_CH3_V)<<(RMT_MEM_EMPTY_CH3_S))
|
||||
#define RMT_MEM_EMPTY_CH3_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH3_S 29
|
||||
/* RMT_MEM_FULL_CH3 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel3 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH3 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH3_M ((RMT_MEM_FULL_CH3_V)<<(RMT_MEM_FULL_CH3_S))
|
||||
#define RMT_MEM_FULL_CH3_V 0x1
|
||||
#define RMT_MEM_FULL_CH3_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH3 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel3 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH3 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH3_M ((RMT_MEM_OWNER_ERR_CH3_V)<<(RMT_MEM_OWNER_ERR_CH3_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH3_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH3_S 27
|
||||
/* RMT_STATE_CH3 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel3 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH3 0x07000000
|
||||
#define RMT_STATE_CH3_M ((RMT_STATE_CH3_V)<<(RMT_STATE_CH3_S))
|
||||
#define RMT_STATE_CH3_V 0x7
|
||||
#define RMT_STATE_CH3_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH3 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel3.*/
|
||||
#define RMT_MEM_RADDR_EX_CH3 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH3_M ((RMT_MEM_RADDR_EX_CH3_V)<<(RMT_MEM_RADDR_EX_CH3_S))
|
||||
#define RMT_MEM_RADDR_EX_CH3_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH3_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH3 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel3.*/
|
||||
#define RMT_MEM_WADDR_EX_CH3 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH3_M ((RMT_MEM_WADDR_EX_CH3_V)<<(RMT_MEM_WADDR_EX_CH3_S))
|
||||
#define RMT_MEM_WADDR_EX_CH3_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH3_S 0
|
||||
|
||||
#define RMT_CH4STATUS_REG (DR_REG_RMT_BASE + 0x0070)
|
||||
/* RMT_STATUS_CH4 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1027,6 +1243,60 @@
|
||||
#define RMT_STATUS_CH4_M ((RMT_STATUS_CH4_V)<<(RMT_STATUS_CH4_S))
|
||||
#define RMT_STATUS_CH4_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH4_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH4 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel4 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH4 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH4_M ((RMT_APB_MEM_RD_ERR_CH4_V)<<(RMT_APB_MEM_RD_ERR_CH4_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH4_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH4_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH4 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel4 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH4 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH4_M ((RMT_APB_MEM_WR_ERR_CH4_V)<<(RMT_APB_MEM_WR_ERR_CH4_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH4_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH4_S 30
|
||||
/* RMT_MEM_EMPTY_CH4 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel4. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH4 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH4_M ((RMT_MEM_EMPTY_CH4_V)<<(RMT_MEM_EMPTY_CH4_S))
|
||||
#define RMT_MEM_EMPTY_CH4_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH4_S 29
|
||||
/* RMT_MEM_FULL_CH4 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel4 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH4 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH4_M ((RMT_MEM_FULL_CH4_V)<<(RMT_MEM_FULL_CH4_S))
|
||||
#define RMT_MEM_FULL_CH4_V 0x1
|
||||
#define RMT_MEM_FULL_CH4_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH4 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel4 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH4 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH4_M ((RMT_MEM_OWNER_ERR_CH4_V)<<(RMT_MEM_OWNER_ERR_CH4_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH4_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH4_S 27
|
||||
/* RMT_STATE_CH4 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel4 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH4 0x07000000
|
||||
#define RMT_STATE_CH4_M ((RMT_STATE_CH4_V)<<(RMT_STATE_CH4_S))
|
||||
#define RMT_STATE_CH4_V 0x7
|
||||
#define RMT_STATE_CH4_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH4 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel4.*/
|
||||
#define RMT_MEM_RADDR_EX_CH4 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH4_M ((RMT_MEM_RADDR_EX_CH4_V)<<(RMT_MEM_RADDR_EX_CH4_S))
|
||||
#define RMT_MEM_RADDR_EX_CH4_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH4_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH4 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel4.*/
|
||||
#define RMT_MEM_WADDR_EX_CH4 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH4_M ((RMT_MEM_WADDR_EX_CH4_V)<<(RMT_MEM_WADDR_EX_CH4_S))
|
||||
#define RMT_MEM_WADDR_EX_CH4_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH4_S 0
|
||||
|
||||
#define RMT_CH5STATUS_REG (DR_REG_RMT_BASE + 0x0074)
|
||||
/* RMT_STATUS_CH5 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1035,6 +1305,60 @@
|
||||
#define RMT_STATUS_CH5_M ((RMT_STATUS_CH5_V)<<(RMT_STATUS_CH5_S))
|
||||
#define RMT_STATUS_CH5_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH5_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH5 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel5 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH5 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH5_M ((RMT_APB_MEM_RD_ERR_CH5_V)<<(RMT_APB_MEM_RD_ERR_CH5_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH5_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH5_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH5 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel5 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH5 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH5_M ((RMT_APB_MEM_WR_ERR_CH5_V)<<(RMT_APB_MEM_WR_ERR_CH5_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH5_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH5_S 30
|
||||
/* RMT_MEM_EMPTY_CH5 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel5. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH5 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH5_M ((RMT_MEM_EMPTY_CH5_V)<<(RMT_MEM_EMPTY_CH5_S))
|
||||
#define RMT_MEM_EMPTY_CH5_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH5_S 29
|
||||
/* RMT_MEM_FULL_CH5 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel5 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH5 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH5_M ((RMT_MEM_FULL_CH5_V)<<(RMT_MEM_FULL_CH5_S))
|
||||
#define RMT_MEM_FULL_CH5_V 0x1
|
||||
#define RMT_MEM_FULL_CH5_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH5 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel5 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH5 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH5_M ((RMT_MEM_OWNER_ERR_CH5_V)<<(RMT_MEM_OWNER_ERR_CH5_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH5_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH5_S 27
|
||||
/* RMT_STATE_CH5 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel5 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH5 0x07000000
|
||||
#define RMT_STATE_CH5_M ((RMT_STATE_CH5_V)<<(RMT_STATE_CH5_S))
|
||||
#define RMT_STATE_CH5_V 0x7
|
||||
#define RMT_STATE_CH5_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH5 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel5.*/
|
||||
#define RMT_MEM_RADDR_EX_CH5 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH5_M ((RMT_MEM_RADDR_EX_CH5_V)<<(RMT_MEM_RADDR_EX_CH5_S))
|
||||
#define RMT_MEM_RADDR_EX_CH5_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH5_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH5 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel5.*/
|
||||
#define RMT_MEM_WADDR_EX_CH5 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH5_M ((RMT_MEM_WADDR_EX_CH5_V)<<(RMT_MEM_WADDR_EX_CH5_S))
|
||||
#define RMT_MEM_WADDR_EX_CH5_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH5_S 0
|
||||
|
||||
#define RMT_CH6STATUS_REG (DR_REG_RMT_BASE + 0x0078)
|
||||
/* RMT_STATUS_CH6 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1043,6 +1367,60 @@
|
||||
#define RMT_STATUS_CH6_M ((RMT_STATUS_CH6_V)<<(RMT_STATUS_CH6_S))
|
||||
#define RMT_STATUS_CH6_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH6_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH6 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel6 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH6 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH6_M ((RMT_APB_MEM_RD_ERR_CH6_V)<<(RMT_APB_MEM_RD_ERR_CH6_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH6_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH6_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH6 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel6 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH6 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH6_M ((RMT_APB_MEM_WR_ERR_CH6_V)<<(RMT_APB_MEM_WR_ERR_CH6_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH6_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH6_S 30
|
||||
/* RMT_MEM_EMPTY_CH6 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel6. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH6 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH6_M ((RMT_MEM_EMPTY_CH6_V)<<(RMT_MEM_EMPTY_CH6_S))
|
||||
#define RMT_MEM_EMPTY_CH6_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH6_S 29
|
||||
/* RMT_MEM_FULL_CH6 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel6 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH6 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH6_M ((RMT_MEM_FULL_CH6_V)<<(RMT_MEM_FULL_CH6_S))
|
||||
#define RMT_MEM_FULL_CH6_V 0x1
|
||||
#define RMT_MEM_FULL_CH6_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH6 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel6 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH6 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH6_M ((RMT_MEM_OWNER_ERR_CH6_V)<<(RMT_MEM_OWNER_ERR_CH6_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH6_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH6_S 27
|
||||
/* RMT_STATE_CH6 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel6 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH6 0x07000000
|
||||
#define RMT_STATE_CH6_M ((RMT_STATE_CH6_V)<<(RMT_STATE_CH6_S))
|
||||
#define RMT_STATE_CH6_V 0x7
|
||||
#define RMT_STATE_CH6_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH6 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel6.*/
|
||||
#define RMT_MEM_RADDR_EX_CH6 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH6_M ((RMT_MEM_RADDR_EX_CH6_V)<<(RMT_MEM_RADDR_EX_CH6_S))
|
||||
#define RMT_MEM_RADDR_EX_CH6_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH6_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH6 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel6.*/
|
||||
#define RMT_MEM_WADDR_EX_CH6 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH6_M ((RMT_MEM_WADDR_EX_CH6_V)<<(RMT_MEM_WADDR_EX_CH6_S))
|
||||
#define RMT_MEM_WADDR_EX_CH6_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH6_S 0
|
||||
|
||||
#define RMT_CH7STATUS_REG (DR_REG_RMT_BASE + 0x007c)
|
||||
/* RMT_STATUS_CH7 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
@ -1051,6 +1429,60 @@
|
||||
#define RMT_STATUS_CH7_M ((RMT_STATUS_CH7_V)<<(RMT_STATUS_CH7_S))
|
||||
#define RMT_STATUS_CH7_V 0xFFFFFFFF
|
||||
#define RMT_STATUS_CH7_S 0
|
||||
/* RMT_APB_MEM_RD_ERR_CH7 : RO ;bitpos:[31] ;default: 1'b0 ; */
|
||||
/*description: The apb read memory status bit for channel7 turns to
|
||||
high level when the apb read address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_RD_ERR_CH7 (BIT(31))
|
||||
#define RMT_APB_MEM_RD_ERR_CH7_M ((RMT_APB_MEM_RD_ERR_CH7_V)<<(RMT_APB_MEM_RD_ERR_CH7_S))
|
||||
#define RMT_APB_MEM_RD_ERR_CH7_V 0x1
|
||||
#define RMT_APB_MEM_RD_ERR_CH7_S 31
|
||||
/* RMT_APB_MEM_WR_ERR_CH7 : RO ;bitpos:[30] ;default: 1'b0 ; */
|
||||
/*description: The apb write memory status bit for channel7 turns to
|
||||
high level when the apb write address exceeds the configuration range.*/
|
||||
#define RMT_APB_MEM_WR_ERR_CH7 (BIT(30))
|
||||
#define RMT_APB_MEM_WR_ERR_CH7_M ((RMT_APB_MEM_WR_ERR_CH7_V)<<(RMT_APB_MEM_WR_ERR_CH7_S))
|
||||
#define RMT_APB_MEM_WR_ERR_CH7_V 0x1
|
||||
#define RMT_APB_MEM_WR_ERR_CH7_S 30
|
||||
/* RMT_MEM_EMPTY_CH7 : RO ;bitpos:[29] ;default: 1'b0 ; */
|
||||
/*description: The memory empty status bit for channel7. in acyclic mode,
|
||||
this bit turns to high level when mem_raddr_ex is greater than or equal to the configured range.*/
|
||||
#define RMT_MEM_EMPTY_CH7 (BIT(29))
|
||||
#define RMT_MEM_EMPTY_CH7_M ((RMT_MEM_EMPTY_CH7_V)<<(RMT_MEM_EMPTY_CH7_S))
|
||||
#define RMT_MEM_EMPTY_CH7_V 0x1
|
||||
#define RMT_MEM_EMPTY_CH7_S 29
|
||||
/* RMT_MEM_FULL_CH7 : RO ;bitpos:[28] ;default: 1'b0 ; */
|
||||
/*description: The memory full status bit for channel7 turns to high level
|
||||
when mem_waddr_ex is greater than or equal to the configuration range.*/
|
||||
#define RMT_MEM_FULL_CH7 (BIT(28))
|
||||
#define RMT_MEM_FULL_CH7_M ((RMT_MEM_FULL_CH7_V)<<(RMT_MEM_FULL_CH7_S))
|
||||
#define RMT_MEM_FULL_CH7_V 0x1
|
||||
#define RMT_MEM_FULL_CH7_S 28
|
||||
/* RMT_MEM_OWNER_ERR_CH7 : RO ;bitpos:[27] ;default: 1'b0 ; */
|
||||
/*description: When channel7 is configured for receive mode, this bit will turn to high level
|
||||
if rmt_mem_owner register is not set to 1.*/
|
||||
#define RMT_MEM_OWNER_ERR_CH7 (BIT(27))
|
||||
#define RMT_MEM_OWNER_ERR_CH7_M ((RMT_MEM_OWNER_ERR_CH7_V)<<(RMT_MEM_OWNER_ERR_CH7_S))
|
||||
#define RMT_MEM_OWNER_ERR_CH7_V 0x1
|
||||
#define RMT_MEM_OWNER_ERR_CH7_S 27
|
||||
/* RMT_STATE_CH7 : RO ;bitpos:[26:24] ;default: 3'h0 ; */
|
||||
/*description: The channel7 state machine status register.
|
||||
3'h0 : idle, 3'h1 : send, 3'h2 : read memory, 3'h3 : receive, 3'h4 : wait.*/
|
||||
#define RMT_STATE_CH7 0x07000000
|
||||
#define RMT_STATE_CH7_M ((RMT_STATE_CH7_V)<<(RMT_STATE_CH7_S))
|
||||
#define RMT_STATE_CH7_V 0x7
|
||||
#define RMT_STATE_CH7_S 24
|
||||
/* RMT_MEM_RADDR_EX_CH7 : RO ;bitpos:[21:12] ;default: 10'h0 ; */
|
||||
/*description: The current memory write address of channel7.*/
|
||||
#define RMT_MEM_RADDR_EX_CH7 0x003ff000
|
||||
#define RMT_MEM_RADDR_EX_CH7_M ((RMT_MEM_RADDR_EX_CH7_V)<<(RMT_MEM_RADDR_EX_CH7_S))
|
||||
#define RMT_MEM_RADDR_EX_CH7_V 0x3ff
|
||||
#define RMT_MEM_RADDR_EX_CH7_S 12
|
||||
/* RMT_MEM_WADDR_EX_CH7 : RO ;bitpos:[9:0] ;default: 10'h0 ; */
|
||||
/*description: The current memory read address of channel7.*/
|
||||
#define RMT_MEM_WADDR_EX_CH7 0x000003ff
|
||||
#define RMT_MEM_WADDR_EX_CH7_M ((RMT_MEM_WADDR_EX_CH7_V)<<(RMT_MEM_WADDR_EX_CH7_S))
|
||||
#define RMT_MEM_WADDR_EX_CH7_V 0x3ff
|
||||
#define RMT_MEM_WADDR_EX_CH7_S 0
|
||||
|
||||
#define RMT_CH0ADDR_REG (DR_REG_RMT_BASE + 0x0080)
|
||||
/* RMT_APB_MEM_ADDR_CH0 : RO ;bitpos:[31:0] ;default: 32'h0 ; */
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_RMT_STRUCT_H_
|
||||
#define _SOC_RMT_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_RTC_CNTL_STRUCT_H_
|
||||
#define _SOC_RTC_CNTL_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_RTC_IO_STRUCT_H_
|
||||
#define _SOC_RTC_IO_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_SENS_STRUCT_H_
|
||||
#define _SOC_SENS_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_SLC_STRUCT_H_
|
||||
#define _SOC_SLC_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -286,6 +286,8 @@
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_IROM_LOW 0x400D0000
|
||||
#define SOC_IROM_HIGH 0x40400000
|
||||
#define SOC_IROM_MASK_LOW 0x40000000
|
||||
#define SOC_IROM_MASK_HIGH 0x40070000
|
||||
#define SOC_CACHE_PRO_LOW 0x40070000
|
||||
#define SOC_CACHE_PRO_HIGH 0x40078000
|
||||
#define SOC_CACHE_APP_LOW 0x40078000
|
||||
|
@ -144,6 +144,11 @@ inline static bool IRAM_ATTR esp_ptr_dma_capable(const void *p)
|
||||
return (intptr_t)p >= SOC_DMA_LOW && (intptr_t)p < SOC_DMA_HIGH;
|
||||
}
|
||||
|
||||
inline static bool IRAM_ATTR esp_ptr_word_aligned(const void *p)
|
||||
{
|
||||
return ((intptr_t)p) % 4 == 0;
|
||||
}
|
||||
|
||||
inline static bool IRAM_ATTR esp_ptr_executable(const void *p)
|
||||
{
|
||||
intptr_t ip = (intptr_t) p;
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_SPI_STRUCT_H_
|
||||
#define _SOC_SPI_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_SYSCON_STRUCT_H_
|
||||
#define _SOC_SYSCON_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_TIMG_STRUCT_H_
|
||||
#define _SOC_TIMG_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_UART_STRUCT_H_
|
||||
#define _SOC_UART_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef _SOC_UHCI_STRUCT_H_
|
||||
#define _SOC_UHCI_STRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -898,6 +898,9 @@ esp_err_t ulp_run(uint32_t entry_point);
|
||||
* i.e. period number 0. ULP program code can use SLEEP instruction to select
|
||||
* which of the SENS_ULP_CP_SLEEP_CYCx_REG should be used for subsequent wakeups.
|
||||
*
|
||||
* However, please note that SLEEP instruction issued (from ULP program) while the system
|
||||
* is in deep sleep mode does not have effect, and sleep cycle count 0 is used.
|
||||
*
|
||||
* @param period_index wakeup period setting number (0 - 4)
|
||||
* @param period_us wakeup period, us
|
||||
* @note The ULP FSM requires two clock cycles to wakeup before being able to run the program.
|
||||
|
@ -285,6 +285,9 @@ SECTIONS
|
||||
{
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
|
||||
*(.rodata_desc .rodata_desc.*) /* Should be the first. App version info. DO NOT PUT ANYTHING BEFORE IT! */
|
||||
*(.rodata_custom_desc .rodata_custom_desc.*) /* Should be the second. Custom app version info. DO NOT PUT ANYTHING BEFORE IT! */
|
||||
|
||||
*(EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libsoc.a:rtc_clk.* *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .rodata EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libsoc.a:rtc_clk.* *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .rodata.*)
|
||||
|
||||
*(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user