Commit Graph

425 Commits

Author SHA1 Message Date
Dan Halbert ef0830bfe2 merge from upstream + wip 2020-11-25 17:52:06 -05:00
Dan Halbert 9dbea36eac changed alarm.time API 2020-11-25 15:09:27 -05:00
Lucian Copeland a854da35d3 Fix masking issue causing pin claim problems 2020-11-25 12:14:56 -05:00
Lucian Copeland c9bc877683 Merge remote-tracking branch 'upstream/main' into esp-spi-pinclaim 2020-11-25 10:43:35 -05:00
Scott Shawcroft 9a692c3222
Exit faster on recv when TLS connection closed
When a TLS connection is closed by the server it usually sends a
notice. We see this incoming byte with lwip_ioctl and try to read
it. The read returns 0 but we keep trying anyway. Now, we quit
trying when we get zero back. If the connection was still alive
it'd either read a byte or delay until a byte could be read.
2020-11-24 18:14:22 -08:00
Scott Shawcroft 4ac11c8d31
Update wifi.Radio.connect doc
Now it includes bssid info.
2020-11-24 17:54:39 -08:00
hierophect 510f464234
Merge branch 'main' into esp32s2-udp 2020-11-24 18:28:10 -05:00
Scott Shawcroft 669f17e5bf
Merge pull request #3678 from microDev1/nvm-s2
ESP32S2: Support for NVM
2020-11-24 14:45:35 -08:00
Lucian Copeland 59458a9013 Add pin claiming to SPI construct 2020-11-24 16:46:11 -05:00
hierophect d0e75e635a
Merge pull request #3714 from microDev1/ps2io-S2
ESP32S2: Support for PS/2-IO
2020-11-24 14:56:09 -05:00
Lucian Copeland 0c5e0954db Add closed socket identification 2020-11-24 14:51:06 -05:00
Lucian Copeland 1031fe2992 correct submodule 2020-11-24 14:46:43 -05:00
Jeff Epler 0836abba41
Merge pull request #3720 from tannewt/more_wifi_retry
Retry connection when getting NOT_AUTHED
2020-11-24 09:54:54 -06:00
microDev bbe13490b5
Merge branch 'main' into nvm-s2 2020-11-24 12:24:48 +05:30
microDev 6ff24410eb
use values pointer directly 2020-11-24 11:44:11 +05:30
microDev 9dd1783da5
Merge branch 'main' into ps2io-S2 2020-11-24 11:11:11 +05:30
Dan Halbert 7a45afc549 working, but need to avoid deep sleeping too fast before USB ready 2020-11-23 22:44:53 -05:00
Dan Halbert ebdc48ae22
Merge pull request #3745 from kattni/magtag-pin-update
Add pin names from silk
2020-11-23 19:48:12 -05:00
Lucian Copeland 1c9f33a372 Replace reset with mux change 2020-11-23 19:01:30 -05:00
Lucian Copeland 86694262b8 Merge remote-tracking branch 'upstream/main' into esp32-pin-reset 2020-11-23 18:58:46 -05:00
Lucian Copeland 8ffd973e22 Merge remote-tracking branch 'upstream/main' into esp32s2-udp 2020-11-23 18:40:14 -05:00
Scott Shawcroft a80bf22211
Merge pull request #3727 from BennyE/wifi-full-scan
esp32s2: Do a full scan when channel/BSSID are not given
2020-11-23 15:19:57 -08:00
Scott Shawcroft c67f5892ff
Merge pull request #3704 from microDev1/frequencyio-S2
ESP32S2: Support for FrequencyIO
2020-11-23 14:59:27 -08:00
Kattni Rembor 7928a0d454 Blank lines to group aliases. 2020-11-23 16:02:45 -05:00
Kattni Rembor 3730862362 Update to match silk rev 1 2020-11-23 15:56:36 -05:00
Kattni Rembor efda912437 Add pin names from silk 2020-11-23 15:53:28 -05:00
Dan Halbert 3abee9b256 compiles; maybe ready to test, or almost 2020-11-22 21:52:37 -05:00
Dan Halbert 25591a3f8a Merge branch 'esp32s2-common-hal-mcu-delay-us' into sleep 2020-11-22 21:01:49 -05:00
Dan Halbert a0f1ec3c4a wip 2020-11-22 19:10:09 -05:00
Dan Halbert f62ea25331 ESP32S2: common_hal_mcu_delay_us() now calls mp_hal_delay_us() 2020-11-22 19:08:27 -05:00
microDev f3b5ca5f01
replace goto with conditional break 2020-11-22 19:20:21 +05:30
microDev 048ca2a570
get multiple touchpad working 2020-11-22 18:54:18 +05:30
Dan Halbert 75559f35cc wip: ResetReason to microcontroller.cpu 2020-11-21 23:29:52 -05:00
Dan Halbert e4c66990e2 compiles 2020-11-20 23:33:39 -05:00
BennyE 2773f534c9
Update ports/esp32s2/common-hal/wifi/Radio.c
adding suggested changes
2020-11-20 09:40:32 +01:00
BennyE 6760cdf678 Let connect() choose strongest AP if channel and BSSID are not given 2020-11-20 00:11:17 +01:00
Dan Halbert 39e1f52e28 wip; not compiling yet 2020-11-19 17:47:12 -05:00
BennyE 17a8bafe05 Choose best AP in range if no channel/bssid given 2020-11-19 23:39:48 +01:00
Dan Halbert 649c930536 wip 2020-11-19 15:43:39 -05:00
microDev a25b27520d
update nvm implementation 2020-11-20 00:22:00 +05:30
microDev bc9036f353
use pointer to get nvs handle 2020-11-20 00:15:30 +05:30
Jeff Epler dd108b755d esp32s2: initialize event loop ane netif only once
deinitting these seems to cause problems.
2020-11-19 11:36:02 -06:00
microDev 040eaa0443
re-organize and clean-up 2020-11-19 15:30:15 +05:30
microDev b56645808c
fix crash on user code exit 2020-11-19 11:44:22 +05:30
Dan Halbert 5bb3c321e9 merge from main 2020-11-19 00:29:14 -05:00
Dan Halbert 682054a216 WIP: redo API; not compiled yet 2020-11-19 00:23:27 -05:00
Scott Shawcroft 081aec4429
Retry connection when getting NOT_AUTHED
I saw it once with a correct password. Retrying may still fail
but at least it'll try first.
2020-11-18 16:39:34 -08:00
Jeff Epler 83d790ad8f esp32s2: don't delete the event loop
.. it seems to make the esp-idf grumpy.
2020-11-18 17:45:42 -06:00
microDev 0d3e81f969
update interrupt handling 2020-11-18 22:22:42 +05:30
microDev bab41afce7
ps2io implementation for esp32s2 2020-11-18 12:34:56 +05:30
microDev c457d373e1
update init_timer & frequency calculation 2020-11-18 12:24:48 +05:30
microDev ff987e7496
add timer peripheral 2020-11-18 12:16:14 +05:30
Jeff Epler 9206925bf8 esp32s2: port_get_raw_ticks: Use a more efficient, monotonic routine
While trying to debug #3572, I noticed that I would frequently break in
the midst of gettimeofday and that the routine get_adjusted_boot_time
had to take and release locks.  Furthermore, we don't want "adjusted"
boot time, which could go forwards or backwards depending on the
adjustment (such as setting the clock used by gettimeofday() to the network
time)
2020-11-17 17:45:41 -06:00
Jeff Epler 1bc770c3dc esp32s2: PulseIn: Fix supervisor tick enabling
Before, there were two problems:
 * Even if a pulsein was never constructed, supervisor_disable_tick
   would occur during restart.  This could cancel out a supervisor_enable_tick
   from someplace else, with unexpected results.
 * If two or more pulseins were constructed, each one would enable ticks,
   but only the last one deinited (or the reset routine) would disable,
   leaving ticks running indefinitely.

In my testing, it seemed that this led to the board sometimes stopping when
it should have auto-reloaded.
2020-11-17 17:45:41 -06:00
Scott Shawcroft e2b5ae2d77
Merge pull request #3689 from jepler/issue-3688
esp32s2: wifi: fix several debug-build errors
2020-11-17 13:26:43 -08:00
Lucian Copeland 0bbdf05936 Implement recvfrom_into and sendto for UDP 2020-11-17 16:11:04 -05:00
Scott Shawcroft 66fb095069
Merge pull request #3667 from microDev1/watchdog-s2
ESP32S2: Support for WatchDog
2020-11-16 15:01:54 -08:00
Scott Shawcroft f4fd236605
Merge pull request #3698 from BennyE/disablesoftap
esp32s2: Set station mode early to avoid SoftAP on startup
2020-11-16 14:51:57 -08:00
Scott Shawcroft f8eed1f74c
Merge pull request #3691 from jepler/issue-3424
esp32s2: Update esp-idf submodule to include fix for #3424
2020-11-16 14:21:13 -08:00
microDev 0686cde226
update internal nvm size 2020-11-17 01:19:12 +05:30
microDev 18e463cca5
add pcnt overflow handler & clean-up 2020-11-16 23:32:22 +05:30
Dan Halbert ffff02c053 Merge remote-tracking branch 'adafruit/main' into sleep 2020-11-16 12:06:11 -05:00
Dan Halbert bb77f1d130 wip: initial code changes, starting from @tannewt's sleepio branch 2020-11-16 11:56:20 -05:00
microDev f2824f6a68
update frequency measurement 2020-11-16 12:55:55 +05:30
microDev 2bec02738f
move interrupt handler to iram 2020-11-16 11:44:11 +05:30
BennyE d4ab00f734 Set station mode early to avoid SoftAP on startup 2020-11-16 00:31:06 +01:00
microDev c4917cdabd
frequencyio implementation for esp32s2 2020-11-16 00:11:00 +05:30
Jeff Epler 231e3d362d esp32s2: Update esp-idf submodule to include fix for #3424
This re-points the submodule to my personal fork of esp-idf.
Users may need to `git submodule sync` in their existing trees when
this change occurs.

Adds just the following commit in esp-idf:
  > esp_crt_bundle: Allow verify_callback to correct BADCERT_BAD_MD
2020-11-14 10:16:39 -06:00
microDev 146adca060
Add watchdog mode raise 2020-11-14 11:41:14 +05:30
Scott Shawcroft 8d4296f964
Add board.DISPLAY to MagTag. Fix luma computation
* Initialize the EPaper display on the MagTag at start.
* Tweak the display send to take a const buffer.
* Correct Luma math
  * Multiply the blue component, not add.
  * Add all of the components together before dividing. This
    reduces the impact of truncated division.
2020-11-13 18:57:52 -08:00
Jeff Epler 0f7081781e esp32s2: wifi: fix several debug-build errors
Closes #3688

With this change, I don't get the ESP_ERROR_CHECK failed repeatedly
running code that imports wifi.  (I'm not getting a successful connection
but that's probably my own fault, such as a secrets problem)
2020-11-12 20:40:45 -06:00
microDev ff41180237
pcnt reset on reload 2020-11-12 16:30:30 +05:30
Scott Shawcroft a47dea4922
Merge pull request #3671 from FoamyGuy/um_feathers2_board_spi_i2c
board.SPI() and board.I2C() for UnexpectedMaker Feather S2
2020-11-11 17:22:23 -08:00
microDev 35ef6c687f
nvm implementation for esp32s2 2020-11-11 23:11:12 +05:30
foamyguy 118ca7cff4 adding default uart pins 2020-11-11 06:56:57 -06:00
microDev f9842566d8
Add default pin definitions 2020-11-11 10:22:48 +05:30
foamyguy 8373146c56 newline end of file 2020-11-10 15:29:17 -06:00
Scott Shawcroft ddb3590944
Merge pull request #3647 from DavePutz/issue3579
Issue3579 - Check for CTRL-C During sleep on esp32s2
2020-11-10 13:09:57 -08:00
foamyguy 1192eebcdf adding spi and i2c to board for um feather s2 2020-11-10 14:12:44 -06:00
Lucian Copeland 21ca1b8c2b Merge remote-tracking branch 'upstream/main' into esp32s2-udp 2020-11-10 14:59:32 -05:00
Lucian Copeland d16d27a449 Merge remote-tracking branch 'tannewt/esp32s2_udp' into esp32s2-udp 2020-11-10 14:51:36 -05:00
Scott Shawcroft 75a977febd
Merge pull request #3668 from jepler/esp32s2-stack-size
esp32s2: Correct port_stack_get_top()
2020-11-10 10:56:12 -08:00
root fe7ed99939 Split out extern declare to ports/esp32s2/supervisor/esp_port.h 2020-11-10 12:45:39 -06:00
root 44425b8d94 Requested review changes made 2020-11-10 11:32:59 -06:00
Jeff Epler 2d8ebfcf63 esp32s2: Correct port_stack_get_top()
Closes #3649
2020-11-10 10:42:53 -06:00
microDev 6c59836c5d
watchdog implementation for esp32s2 2020-11-10 16:32:46 +05:30
Scott Shawcroft 61bf0e99c6
Merge pull request #3653 from tannewt/magtag
Rebrand EInk Portal to MagTag
2020-11-09 16:00:09 -08:00
Scott Shawcroft d1f15d314b
Rename to include display details 2020-11-09 15:03:22 -08:00
microDev 7ba2c5772c
Update license 2020-11-08 11:18:05 +05:30
microDev 55e0e2c4ba
Update rotaryio implementation 2020-11-08 11:12:32 +05:30
microDev 479567059e
Merge branch 'main' into rotaryio-S2 2020-11-08 00:00:01 +05:30
Scott Shawcroft b2e83952c0
Rebrand EInk Portal to MagTag 2020-11-06 15:27:16 -08:00
Scott Shawcroft 01c7a06dcc
Merge pull request #3615 from microDev1/CountIO-S2
ESP32S2: Support for CountIO
2020-11-06 12:29:13 -08:00
root d948e6570f Changes to handle Ctrl-C during sleep 2020-11-05 21:27:21 -06:00
microDev ac8a0faa0d
update peripherals_pcnt_init() 2020-11-06 01:42:20 +05:30
Dan Halbert 81bb92bdd2
Merge pull request #3639 from tannewt/fix_recv
Rework socketpool.Socket.recv to return sooner
2020-11-05 14:11:13 -05:00
root c2aa54ae66 Check for Ctrl-C during sleeps 2020-11-05 11:10:40 -06:00
microDev d8ef9a127b
rename pcnt_handler to pcnt 2020-11-05 10:10:39 +05:30
microDev fe6bfde590
move pcnt handler 2020-11-04 21:20:24 +05:30
Lucian Copeland 472a5a99ec Add API reset to reset_pin_number 2020-11-03 16:31:53 -05:00