34 Commits

Author SHA1 Message Date
Gordon Williams
57222f0915 More ESP32C3 ifdefs - C3 now builds but crashes as soon as it starts 2024-05-09 13:39:40 +01:00
Gordon Williams
4327ebd34e Tidying up error messages (no trailing '.' or '\n'), making almost-similar error messages the same
Used the following to try and find issues:

find . -name "*.c" | xargs -I{} grep -h jsExceptionHere {} | sed -e "s/^[^\"]*\"/\"/" | sort | uniq -c
2023-10-06 10:47:58 +01:00
Gordon Williams
012d3ddffd tweak 2023-05-12 10:26:43 +01:00
Christoph Willing
5530410d7a
More efficient arithmentic. Avoid meory leak
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-12 19:16:50 +10:00
Christoph Willing
ac9fc38bde
Use JsvIterator for array
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-12 18:16:55 +10:00
Christoph Willing
7f6f9303f6 Add function deepSleepExt1 for EXP32
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-12 11:19:56 +10:00
Christoph Willing
b63826b739 Test validity of wakeup pin for ESP32 deep sleep
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-11 08:42:11 +10:00
Christoph Willing
0d64aa258b
Add function getWakeupCause for ESP32
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-10 19:31:23 +10:00
Christoph Willing
2458fffa39
Add function deepSleepExt0
Signed-off-by: Christoph Willing <chris.willing@linux.com>
2023-05-09 13:05:19 +10:00
Gordon Williams
82d0077263 removing tabs in ESP32 code 2023-05-03 14:16:57 +01:00
Gordon Williams
e994a281db ESP32: partition table updated in EspruinoBuildTools to ensure bootloader doesn't mistake js_code/storage for an otadata partition
ESP32: Add ESP32.setOTAValid(false) to allow the current partition to be marked as invalid (causing 'factory' to be booted into)
2023-01-20 15:13:40 +00:00
Gordon Williams
891029bfde ESP32: Bluetooth LE tweaks - central mode connects, scans, reads, writes and notifies
Bluetooth: fix for incorrect Bluetooth task strings shown in some errors
Tried to move common code in jsble_exec_pending into jsble_exec_pending_common
2022-10-27 15:28:28 +01:00
qucchia
c5bb94bf7a Limit documentation comments to 80 characters (#2244) 2022-07-27 15:32:19 +02:00
Gordon Williams
9237f6d0ee fix ESP8266/32 build regressions 2019-11-12 16:34:40 +00:00
Gordon Williams
e230148625 improve docs making 2019-11-07 16:12:27 +00:00
jumjum123
46eceda19c Added minHeap to ESP32.getState
This value should help to see low level of free heap
2018-06-08 15:01:30 +02:00
Gordon Williams
fb2c99c97d Merge branch 'master' into ESP32-v3.0 2018-06-01 14:36:10 +01:00
jumjum123
0054b39c00 ESP32.py
- added variables_mode in config.
build_platform_config.py
- added define for variables_mode
jsvar.h
- added jsVarsSize;  //size of jsVars for option malloc
- added support of malloc jsVars in jsvInit
jsvar.c
- added definition jsVars for variables_mode_malloc
jshardwareESP32.h
- new file with functions to set/get enable status of BLE and Wifi
jshardwareESP32.c
- new file with functions to set/get enable status of BLE and Wifi
ESP32.make
- added jshardware.c to SOURCES
main.c
- added handling for Wifi enabled
- added calculation for jsVars
- initialise jsVars based on calculation
jshardware.c
- used new API call to get Serial Number, even if Wifi is not enabled
- initialises BLE, if BLE is enabled (in NVS storage)
bluetooth.c
- check if BLE is enabled before initialising
jswrap_esp32.h
- defines functions to enable BLE and/or Wifi
jswrap_esp32.c
- wrapper for functions to enable BLE/Wifi, remove code from Flash, to avoid overflow in jsVars
- added status for BLE/Wifi to ESP32.getStatus
esp32_gap_func.c
- get mac adress even if Wifi is not enabled

 Changes to be committed:
	modified:   boards/ESP32.py
	modified:   make/family/ESP32.make
	modified:   scripts/build_platform_config.py
	modified:   src/jsvar.c
	modified:   src/jsvar.h
	modified:   targets/esp32/BLE/esp32_gap_func.c
	modified:   targets/esp32/bluetooth.c
	modified:   targets/esp32/jshardware.c
	new file:   targets/esp32/jshardwareESP32.c
	new file:   targets/esp32/jshardwareESP32.h
	modified:   targets/esp32/jswrap_esp32.c
	modified:   targets/esp32/jswrap_esp32.h
	modified:   targets/esp32/main.c
2018-06-01 12:23:00 +02:00
Gordon Williams
8c97aeee68 Added E.reboot() to allow hard reboots from software (fix #1429) 2018-05-22 09:01:46 +01:00
wilberforce
883000cf81 update esp-idf to v3.0. BLE support - thanks to @jumjum. 2500 vars. Erase flash before flashing 2018-05-13 13:54:02 +12:00
wilberforce
761d8cebee intial esp-idf 3.0 build 2018-04-30 21:44:19 +12:00
Gordon Williams
19dab6aae6 fix the deep sleep PR :( 2018-02-13 15:02:04 +00:00
Janos Waldhauser
6a81927613 Renamed from ESP32.deepsleep to ESP32.deepSleep.
Changed the ESP32.deepSleep parameter from milliseconds to microseconds.
2018-02-13 12:49:59 +01:00
Janos Waldhauser
896c61dad2 Removed the debug printf. 2018-02-13 09:35:30 +01:00
Janos Waldhauser
66333f68b8 Deepsleep for ESP32
Only timer based wakeup is working.

ESP32.deepsleep(time_in_milliseconds)
2018-02-12 14:04:25 +01:00
wilberforce
821afc6210 remove ESP_LOG calls 2017-04-04 18:39:24 +12:00
wilberforce
1eca8b436b update to eso-idf v2.0-rc1 2017-04-01 14:34:10 +13:00
Gordon Williams
002938f4ad Add E.neopixelWrite for all platforms (fix #1023) 2017-02-24 18:22:14 +00:00
Juergen Marsch
8e38a5aae2 - Added suport for ADC(pin32-39)
please have in mind, ADC do not work linear.
  Espressif will change this later
- added support for DAC(pin 25-26)
- changed interrupt handling for GPIO and UART to virtual interrupts
Changes to be committed:
	modified:   Makefile
	modified:   targets/esp32/jshardware.c
	new file:   targets/esp32/jshardwareAnalog.c
	new file:   targets/esp32/jshardwareAnalog.h
	modified:   targets/esp32/jshardwareUart.c
	modified:   targets/esp32/jswrap_esp32.c
	modified:   targets/esp32/main.c
2016-12-13 18:58:57 +01:00
Rhys.Williams
fea4f6c3b5 add SDK version as a string 2016-12-05 17:28:09 +13:00
Rhys.Williams
c17b486042 Updates for ESP-idf SDK 1.0 2016-12-05 16:44:04 +13:00
kolban
2e770d2928 Addition of ESP32.reboot(); Addition of more docs. 2016-10-15 19:12:06 -05:00
kolban
ea902eed4c Addition of ESP32.setLogLevel 2016-10-14 10:52:47 -05:00
kolban
565285410b Initial files for the ESP32 environment. 2016-10-09 22:53:20 -05:00