- 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
The first idea was to move util timer task to 2nd cpu later, but it turned out taskhandling slows down a lot
Therefore it had to be moved
Move init of timer into main loop
Add a bitfield for usage of pins for soft pwm
Add handling of soft pwm pins to jshPinSetState
Add handling of soft PWM to jshPinAnalogOutput if soft:true is set in options
Set time for util timer to a min of 30 usecs
Extended to support both SPI channel (HSPI and VSPI)
Todo:
More testing with other SPI based hardware
Testing with two or more devices on same SPI channel (using seperate CE pins)
Input from SPI device
Find a faster solution. Each byte has a lot of overhead in Espruino.
2. added README_flash.txt to folder target/esp32
3. added README_flash.txt to zip file created in $(ESP_ZIP):.... in Makefile
4. added header and source file for PWM. ESP32 does not support a general PWM driver(yet).
Therefore driver/ledc is used.
5 channel can be used for simple DAC, using default frequency of 5000Hz
3 more channel are available for different frequency
5. connect jshardwarePWM functions to standard calls in jshardware
6. implemented jshSetOutputValue in jshardware
7. moved targets/esp32/rtosutil.c from RTOS to standard part of ESP32
targets/esp32/jswrap_rtos.c is added only if var RTOS is defined
- this works without errors, but is not tested with Espruino commands
Added new task to main, to seperate Espruino function from interrupt service routine
- otherwise we get resets
Fixed some headers in esp32 relevant files
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
This reverts commit 3d464618227d8d6f5040bff6c8e41a447a6d6f25, reversing
changes made to 1d8fd4aa72e99a875eb7efe70c3d4700dd0d27b1.
merge was done with "old changes"
- added wrapper to use functions around tasks and queues. rtosutils is
c-level, jswrap_rtos wraps utils to Espruino
- added option for rtos (RTOS=1) to makefile
- adding a task for reading uart and writing to a queue
- use RTOS-option to switch between old polling and new queue based
input
- docu for the changes