230 Commits

Author SHA1 Message Date
Gordon Williams
b6a256fe77 nRF52: Now create exception if advertising calls fail (but ignore when in IRQ)
nRF52: Add setAdvertising({},{scannable:false}) for disabling scan response
            nRF52: Add note about connectable:false requiring >=100ms intervals
2019-04-04 19:24:37 +01:00
spyptev
bfa85429fb Change ESP32 neopixel to use all available RMT buffers
Also simplify neopixel_bits init, some debug in interrupt usage and in call with zero size buffer.
2019-02-20 02:04:06 +03:00
spyptev
c8872c98f7 Change name of neopixel_half variable to neopixel_bufpart to make next commit more well-understandable 2019-02-20 00:37:49 +03:00
Gordon Williams
e56d91b044 Added active option to NRF.setScan/findDevices/requestDevices to allow scan response packets to be requested 2019-02-11 09:35:54 +00:00
Gordon Williams
eeb9ec8dd5 nRF52: Add docs for properties that weren't documented before
nRF52: Add ability to connect to device with passkey authentication
2019-01-31 14:23:26 +00:00
wilberforce
9b3cca7f55 restore wifi settings from Storage .wificfg 2018-12-15 12:40:09 +13:00
jumjum123
d58f2f6e03 Changed assignment of data pin.
No information from Espressif about the difference.
Anyway it works with my 8*8 led matrix

 Changes to be committed:
	modified:   targets/esp32/esp32_neopixel.c
2018-12-12 13:03:35 +01:00
Gordon Williams
96a87dd77a
Merge pull request #1582 from espruino/ESP32-V3.1
esp32: fix conect issues
2018-12-10 10:24:37 +00:00
wilberforce
d0077bf498 add debug to wifi events 2018-12-08 13:44:15 +13:00
Gordon Williams
9ece84c680
Merge pull request #1579 from espruino/ESP32-V3.1
ESP32: Make wifi connect more robust
2018-12-03 08:23:22 +00:00
wilberforce
589ef6fe79 Make wifi connect more robust 2018-12-03 18:52:06 +13:00
Gordon Williams
1df02202a1
Merge pull request #1533 from espruino/ESP32-V3.1
Esp32 v3.1
2018-11-12 10:35:02 +00:00
jbgagnon
9de4b65bb6 * update micro-seconds also when update time 2018-10-25 16:07:01 +02:00
wilberforce
abc22a33aa skdconfig changes 2018-10-23 21:31:32 +13:00
jumjum123
c4006351cd Changed include to shorter path (esp_partition.c)
Changes to be committed:
	modified:   targets/esp32/main.c
2018-10-15 11:46:17 +02:00
jumjum123
dd55b3dd74 changes SET_PERI_REG_MASK to DPORT_SET_PERI_REG_MASK
and CLEAR_PERI_REG_MASK to DPORT_CLEAR_PERI_REG_MASK
older syntax has been replaced in V3.1

Changes to be committed:
	modified:   targets/esp32/esp32_neopixel.c
2018-10-15 11:40:10 +02:00
jumjum123
32358355b1 Added subdirectory in targets/esp32 with files and information around upgrade to esp-idf V3.1
Changes to be committed:
	new file:   targets/esp32/Changes_V3.1/partitions_espruino.csv
	new file:   targets/esp32/Changes_V3.1/sdkconfig
2018-10-15 11:28:00 +02:00
Gordon Williams
5d76771c11 Massive bluetooth name refactoring, potentially to help with #1445 2018-09-03 17:07:23 +01:00
Gordon Williams
66d3905968 minor refactor to make connection types more obvious 2018-07-12 17:34:21 +01:00
Gordon Williams
3583ef52cd Add options argument to NRF.connect and BluetoothDevice.gatt.connect, allowing a connection interval to be specified 2018-07-12 10:51:29 +01:00
jumjum123
c5684284ea Fixed problems around Advertising. There are still some, ....
Added patch from Rob Blanckaert
Added set Encrypton to gatts connect handler

esp32_gatts_func.h
- added a bool for connected from a client in gatts_service_inst
esp32_gatts_func.c
- added include for esp_gap_ble_api.h
- added function to check if a client is connected
- added patches from Rob Blanckaert ( https://github.com/basicer/Espruino/tree/ESP32-v3.0 ) to gatts_write_value_handler
- added esp_ble_set_encryption to gatts_connect_handler
- added handling of connected flag, see esp32_gatts_func.h
- fixed startAdvertising, started only if no client is connected
- added permissions to UART decriptor, patch from Rob Blanckaert
- set connected to false in initialisation
2018-06-15 11:22:09 +02:00
jumjum123
5dda6ae105 Added set console initialized
To get Serial1.setConsole(true) running
2018-06-10 18:32:00 +02: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
jumjum123
6b99663402 added buffer handling for Bluetooth serial print
esp32_gatts_func.c
- send notification with buffer, replaced gatts_sendNotification to copy character to buffer first
  send on buffer full or latest on 10msec later
bluetooth.h
- added definition GATT_MTU_SIZE_DEFAULT
- added definition BLE_NUS_MAX_DATA_LEN
2018-06-08 13:25:31 +02:00
jumjum123
9d6b6ea7b6 Added init security and implementation for jsble_xxxxx_connection
esp32_gap_func.c
- support event ESP_GAP_BLE_SEC_REQ_EVT
- restructured addAdvertisingDeviceName restructured
- added function addAdvertisingUart
- added handling of UART in bluetooth_gap_getAdvertisingData
- added function gap_init_security
esp32_gap_func.h
- added definition for gap_init_security();
bluetooth.c
- added call of gap_initSecurity in jsble_init
- added implementation for jsble_has_connection()
- added implementation for jsble_has_central_connection()
- added implementation jsble_has_simple_connection()
2018-06-08 12:40:51 +02:00
Gordon Williams
fb2c99c97d Merge branch 'master' into ESP32-v3.0 2018-06-01 14:36:10 +01:00
Gordon Williams
6ddb231172 minor refactoring to allow differing JsVar sizes to be used at boot 2018-06-01 14:35:32 +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
Gordon Williams
dfac6037c7 ESP32: Fix accidental initialisation of UART3 when switching to Telnet (fix #1362) 2018-05-14 14:07:25 +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
c5921bd803 update require("Flash").getFree(); addresses 2018-05-12 09:51:43 +12:00
Rhys Williams
cfc7233590 check build with debug off in esp-idf libs 2018-05-06 21:05:54 +12:00
Rhys Williams
eb1f01e981 update constant to #define 2018-05-06 17:16:00 +12:00
wilberforce
761d8cebee intial esp-idf 3.0 build 2018-04-30 21:44:19 +12:00
wilberforce
c362e78da5
ESP32: Fix jshFlashGetMemMapAddress offset
The romdata_jscode point is mapped by the MMU to the real address of the jscode partition. The offset from the start of flash for the code areas is 0x100000 so this has be removed in the direct access of memory case.
2018-02-15 12:43:30 +13:00
Gordon Williams
71d19a91cc try and memory map full flash memory on ESP32 2018-02-14 10:02:19 +00:00
Gordon Williams
2f6be6a19d Merge branch 'flash_storage' 2018-02-13 15:13:29 +00: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
Gordon Williams
3e08b0138e Added to allow remapping of addresses for ESP8266/ESP32 without loads of code duplication 2018-02-13 10:04:35 +00: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
Gordon Williams
a5269f2a5e http://forum.espruino.com/conversations/314330/#comment14003516 2017-12-12 11:38:58 +00:00
wilberforce
b060c5f9ff
ESP32 jshGetSystemTime() make interrupt tolerant
Pull @jumjum changes from ESP32 branch into master
2017-12-09 09:26:12 +13:00
wilberforce
54240e92f7 update ESP32 Branch to UDP, copy UDP code from linux 2017-08-31 10:53:25 +12:00
wilberforce
fd590f08ba update ESP32 Branch to UDP, copy UDP code from linux 2017-08-31 10:49:10 +12:00
jumjum123
1b3f15a195 Move util timer from its own task into espruino task
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
2017-08-09 16:02:11 +02:00
jumjum123
5efd80b3f8 extension to README
- some more customizing in menuconfig
- how to add espruino partitions
2017-07-25 17:08:48 +02:00
jumjum123
1f0f4fd7b4 upated to actual Espruino
changes in make to get compiled with actual esp-idf
switched from esp-idf specific pulse to Espruino driven (util timer)
2017-07-25 16:19:29 +02:00