Commit Graph

22 Commits

Author SHA1 Message Date
Bill Sideris 5869af395e
Wifi fully seperate from web-workflow 2023-09-05 22:39:41 +03:00
Scott Shawcroft 2686beab36
Basic USB host support and keyboard workflow
Connects up read, write and ctrl_transfer to TinyUSB. USB Host
support is available on iMX RT and RP2040.

Fixes #6527 (imx) and fixes #5986 (rp2).
2023-07-10 14:22:21 -07:00
Ted Hess 9c45551880 Do not enable web_workflow background callbacks if wifi is not enabled/connected 2023-05-11 17:01:53 -04:00
Ted Hess 9825b7fbb7 Web Workflow sockets and threads handling improvements.
Fixes polling thread looping forever hangs preventing new connections.
Don't lose listening sockets on mp resets and re-init.
Keep better separation of "system" and "user" sockets.
Track socket states to prevent re-use of sockets before closed.
Close REST socket when transaction completes. No post-init.
Remove unnecessary state flags.
2023-04-05 13:50:42 -04:00
Dan Halbert 05d2013b45
Merge pull request #6778 from tannewt/fix_s2_bootloop
Guard against workflow background happening early
2022-08-18 07:18:57 -04:00
Scott Shawcroft 704ecc34fb
Guard against workflow background happening early
Fixes #6756 because the ringbuf size is zero and the empty check
does % which leads to division by zero error.
2022-08-17 15:44:07 -07:00
Scott Shawcroft b7a2a3d724
Fix arm builds 2022-08-17 13:52:13 -07:00
Scott Shawcroft 9a5f00a093
Remove upload button and fix mkdir parents 2022-08-17 11:31:11 -07:00
Scott Shawcroft d6344812e8
Lots of web workflow, C3 and title bar fixes
* Fixes #6221 - C3 hang on `import wifi`. Enabling the WiFi PHY was
  disabling USB. Now boards that use it set CONFIG_ESP_PHY_ENABLE_USB
  explicitly.
* Fixes #6655 - Allows pasting into the web serial page. Fixes reading
  more than 0xf bytes at a time.
* Fixes #6653 - Fixes web socket encoding of payloads >125 bytes. Can
  happen when printing a long string.
* Fixes C3 responsiveness when waiting for key to enter REPL. (It
  now correctly stops sleeping.)
* Disables title bar updates when in raw REPL. Related to #6548.
* Adds version to title bar.
2022-07-28 16:06:56 -07:00
Scott Shawcroft e9dd254127
Add socket select task to wake CP
This fixes the web workflow on boards without a display.

Fixes #6552
2022-07-13 17:35:35 -07:00
Dan Halbert 2c7ad7a39f make translate and pre-commit formatting fixes 2022-07-08 16:53:53 -04:00
Dan Halbert d869b441f4 further ESP32 sdkconfig fixes; add CIRCUITPY_STATUS_BAR 2022-07-08 15:27:00 -04:00
Dan Halbert 4e88d795e1 Thonny causing crash emitglue.c:199: 2022-07-06 23:01:19 -04:00
Scott Shawcroft 6446010753
Wi-Fi autoconnect and title bar status
This adds support for CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD
in `/.env`. When both are defined, CircuitPython will attempt to
connect to the network even when user code isn't running. If the
user code attempts to a network with the same SSID, it will return
immediately. Connecting to another SSID will disconnect from the
auto-connected network. If the user code initiates the connection,
then it will be shutdown after user code exits. (Should match <8
behavior.)

This PR also reworks the default displayio terminal. It now supports
a title bar TileGrid in addition to the (newly renamed) scroll area.
The default title bar is the top row of the display and is positioned
to the right of the Blinka logo when it is enabled. The scroll area
is now below the Blinka logo.

The Wi-Fi auto-connect code now uses the title bar to show its
state including the IP address when connected. It does this through
the "standard" OSC control sequence `ESC ] 0 ; <s> ESC \` where <s>
is the title bar string. This is commonly supported by terminals
so it should work over USB and UART as well.

Related to #6174
2022-06-09 14:55:54 -07:00
Timon a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
Jeff Epler 63fbf98186
Enable -Wmissing-prototypes for atmel-samd 2021-11-09 20:05:00 -06:00
Dan Halbert e308a9ec11 working! PinAlarm not implemented yet. 2020-11-27 16:03:37 -05:00
Dan Halbert ef0830bfe2 merge from upstream + wip 2020-11-25 17:52:06 -05:00
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 a0f1ec3c4a wip 2020-11-22 19:10:09 -05:00
Dan Halbert 39e1f52e28 wip; not compiling yet 2020-11-19 17:47:12 -05:00
Scott Shawcroft 9a4efed8cb
Start tweaking the workflow to sleep 2020-10-27 17:55:03 -07:00