Commit Graph

310 Commits

Author SHA1 Message Date
Dan Halbert 17be447c4b correct Radio.connect() and .start_ap() signatures; clean up some code 2022-11-22 17:11:03 -05:00
Scott Shawcroft c3a96a63c0
Enable* web workflow for Pico W
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.

Progress on #7214
2022-11-21 16:24:05 -08:00
Jeff Epler 4e0f8e7fcd
Interrupt on UART 'break'
Tested and working with the CH9102F USB converter on Adafruit's
Feather ESP32 V2 (& tio as the software on the host computer)

Closes: #7233
2022-11-19 10:57:21 -06:00
Scott Shawcroft 8e4e84c58b
Match channel number, not timer number 2022-11-15 16:51:47 -08:00
Scott Shawcroft 93ee54a2fb
Fix PWM status LED never_reset
It doesn't need never reset because the status LED is only active
when user code isn't.

This also fixes PWM never reset on espressif so that deinit will
undo it.

Fixes #6223
2022-11-15 16:14:31 -08:00
MicroDev 512cda8b73
enable `microcontroller.cpu.temperature` on esp32s3 2022-11-12 10:03:00 +05:30
Jeff Epler 452ebe27ae
socketpool: make socket objects selectable
.. which will lead to them being usable in async contexts, pending
relevant changes in asyncio
2022-11-05 12:05:19 -05:00
Dan Halbert ded134c346 store wake_alarm in a static object 2022-10-29 16:26:36 -04:00
Dan Halbert 9307b62ad5 wip 2022-10-27 22:42:04 -04:00
Dan Halbert 5ebdf281cb
Merge pull request #7125 from dhalbert/esp-pin-alarm-fix
Fix setup of Espressif PinAlarms
2022-10-26 15:24:58 -04:00
Dan Halbert 56d8b9451f don't wait for pulls in PinAlarm 2022-10-25 20:42:08 -04:00
Georg Bøe 032bf63f2d Raise error with positive code in recv_into for espressif 2022-10-25 22:53:01 +02:00
microDev 8f0a674a1b
coproc module enhancements
- add light and pretend-to-deep sleep support
- check coproc running status
2022-10-22 19:08:49 +05:30
microDev 83b54d003d
implement more checks in coproc module
- check memory address range
- check firmware size at an earlier stage
2022-10-22 19:05:48 +05:30
microDev b33a2b45dc
add coproc alarm 2022-10-20 18:38:20 +05:30
microDev 5232e3f6c3
add coproc module 2022-10-20 09:09:44 +05:30
microDev e7b25dbf73
improve `dualbank` errors 2022-10-15 13:20:10 +05:30
Dan Halbert 7e4b2a09eb
Merge pull request #7000 from MicroDev1/storage-extend
Add Storage Extension Support
2022-10-13 10:05:55 -04:00
microDev 728fea4ca4
add storage extension python api 2022-10-13 09:53:33 +05:30
Jeff Epler c98174eea5
Add support for SSL client certificate (load_cert_chain)
Tested with badssl.com:

 1. Get client certificates from https://badssl.com/download/
 2. Convert public portion with `openssl x509 -in badssl.com-client.pem -out CIRCUITPY/cert.pem`
 3. Convert private portion with `openssl rsa -in badssl.com-client.pem -out CIRCUITPY/privkey.pem` and the password `badssl.com`
 4. Put wifi settings in CIRCUITPY/.env
 5. Run the below Python script:

```py
import os
import wifi
import socketpool
import ssl
import adafruit_requests

TEXT_URL = "https://client.badssl.com/"
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))

pool = socketpool.SocketPool(wifi.radio)
context = ssl.create_default_context()
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} without certificate (should fail)")
response = requests.get(TEXT_URL)
print(f"{response.status_code=}, should be 400 Bad Request")
input("hit enter to continue\r")

print("Loading client certificate")
context.load_cert_chain("/cert.pem", "privkey.pem")
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} with certificate (should succeed)")
response = requests.get(TEXT_URL)
print(f"{response.status_code=}, should be 200 OK")
```
2022-10-10 15:10:53 -05:00
Dan Halbert 21c0c4c1a6 update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00
Jeff Epler 09023abcd2
Update espressif function prototype to match 2022-10-05 14:56:25 -05:00
Jeff Epler dcb650c513 pico w: add ssl module
Note: at this time, the ssl module on pico_w never verifies the server
certificate. This means it does not actually provide a higher security
level than regular socket / http protocols.
2022-10-05 13:12:43 -04:00
Dan Halbert f9e655da47
Merge pull request #6962 from dhalbert/espressif-deep-sleep-hold-pins
Espressif: do not hold pins during deep sleep if not necessary
2022-09-30 22:20:44 -04:00
Dan Halbert 9d1b12066d Espressif: do not hold pins during deep sleep if not necessary 2022-09-29 20:11:48 -04:00
Dan Halbert db065a299f
Merge pull request #6933 from jepler/🥧🐮
Implement a useful subset of `wifi` and `socketpool` modules on 🥧🐮
2022-09-28 18:09:24 -04:00
Jeff Epler 346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Dan Halbert de80db681f
Merge pull request #6915 from dhalbert/ringbuf-cleanup
ringbuf cleanup
2022-09-25 17:50:21 -04:00
Jeff Epler 5bbbca4d44
lock and unlock i2c bus around any ops that might access it 2022-09-22 17:03:05 -05:00
Dan Halbert ea15a9118a ringbuf cleanup 2022-09-21 10:03:05 -04:00
MicroDev 4a69dfa50c
Merge pull request #6907 from dhalbert/preserve-pins-on-deep-sleep
allow preserving pin state during deep sleep
2022-09-16 17:52:04 +05:30
Dan Halbert 60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
Dan Halbert d0d10179c2 fix logic in pwmout_reset() 2022-09-12 17:03:45 -04:00
microDev 8cd4b9fc04 fix espressif run modes 2022-09-10 18:08:09 +05:30
Dan Halbert dd37c81136
Merge pull request #6847 from dhalbert/status-bar-control
Allow enabling and disabling of status bar
2022-09-08 10:48:36 -04:00
Dan Halbert 52080e24eb status bar control 2022-08-30 15:23:44 -04:00
Jeff Epler 2c6f57be5e
Update ports/espressif/common-hal/esp32_camera/Camera.c
Co-authored-by: Mark <56205165+gamblor21@users.noreply.github.com>
2022-08-28 16:46:50 -05:00
Jeff Epler dc27fb967d error at runtime if no psram actually reserved 2022-08-26 09:27:50 -05:00
Jeff Epler 9f22e75e5e error if camera is configured but no psram 2022-08-26 09:27:50 -05:00
Dan Halbert 2bc8d73776 Fix ESP32 touch; rework common code a bit 2022-08-16 20:04:27 -04:00
Scott Shawcroft df1435ae94
Audit all boards with LED pins defined
Add them as MICROPY_HW_LED_STATUS so that we can share reset code
for them. They aren't actually used for the status if another RGB
option is available. (But maybe they should be.)

Fixes #6717
2022-08-11 14:41:20 -07:00
Scott Shawcroft f9d724c09e
Fix retries after successful connection.
We may have set retries to 0 to enforce a timeout but the connect
succeeded. When it succeeds, we want to allow retries later in
case we lose signal briefly. (The callback will do this too but
the connect function will override it after.)

Also, remove extra code from websocket that is leftover from
debugging.
2022-08-10 15:24:08 -07:00
Dan Halbert af64faae1e switch back one I2C message 2022-08-10 12:06:43 -04:00
Scott Shawcroft 554063a817
Merge branch 'main' into espressif-camera-2 2022-08-09 14:07:14 -07:00
Dan Halbert 84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00
Jeff Epler 98202c8568
Allow changing camera settings that require reinit
These can only be changed in a group, though any items to keep
unchanged can be unspecified or specified as None.
2022-08-04 15:12:11 -05:00
Jeff Epler 8bdbe0355a
Add more getters 2022-08-04 15:12:02 -05:00
Jeff Epler 258f72640a
Implement a pile of getters & setters 2022-08-04 15:11:57 -05:00
Jeff Epler f54c7adddc
Must treat NO_PIN cast to uint8_t the same as NO_PIN
Otherwise, deinitializing a camera with e.g., the powerdown
pin unspecified results in an assertion failure in a debug build.
2022-08-04 15:11:54 -05:00
Jeff Epler 1d1e139379
fix taking multiple pictures 2022-08-04 15:11:53 -05:00
Jeff Epler 5db6db0128
add esp32-camera
This uses the esp32-camera code instead of our own homebrewed camera code.
In theory it supports esp32, esp32-s2 and esp32-s3, as long as they have
PSRAM.

This is very basic and doesn't support changing any camera parameters,
including switching resolution or pixelformat.

This is tested on the Kaluga (ESP32-S2) and ESP32-S3-Eye boards.

First, reserve some PSRAM by putting this line in `CIRCUITPY/_env`:
```
CIRCUITPY_RESERVED_PSRAM=524288
```
and hard-reset the board for it to take effect.

Now, the following script will take a very low-resolution jpeg file and print
it in the REPL in escape coded form:

```python
import board
import esp32_camera

c = esp32_camera.Camera(
    data_pins=board.CAMERA_DATA,
    external_clock_pin=board.CAMERA_XCLK,
    pixel_clock_pin=board.CAMERA_PCLK,
    vsync_pin=board.CAMERA_VSYNC,
    href_pin=board.CAMERA_HREF,
    pixel_format=esp32_camera.PixelFormat.JPEG,
    i2c=board.I2C(),
    external_clock_frequency=20_000_000)

m = c.take()
if m is not None:
    print(bytes(m))
```

Then on desktop open a python repl and run something like
```python
>>> with open("my.jpg", "wb") as f: f.write(<BIG PASTE FROM REPL>)
```
and open my.jpg in a viewer.
2022-08-04 15:11:50 -05:00
Jeff Epler 82be75adb5 Add ability to reserve psram
.. the primary user of which will be the camera, since the framebuffers
must be allocated via esp-idf allocation function and never from the
gc heap.

A board can have a default value, and the value can also be set in the
/.env file using the key CIRCUITPY_RESERVED_PSRAM with the value being
the reserved size in bytes.

Co-authored-by: Dan Halbert <halbert@adafruit.com>
2022-08-03 16:19:40 -05:00
Scott Shawcroft 74e841d835
Read fuses to know what flash and ram pins to never reset 2022-08-02 12:01:42 -07:00
Scott Shawcroft 9661d3256c
Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
Scott Shawcroft 312e298890
Fix other ESP builds and arduino_nano_33_iot 2022-07-29 11:02:35 -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 c4c15206e7
Merge pull request #6608 from tannewt/web_workflow_port
Allow for dynamic reconfigure including port
2022-07-28 12:59:31 -07:00
Scott Shawcroft 931757f4a9
Improve web workflow responsiveness
1. Run the socket select task at the same priority as CP. This is
  needed because it queues up the background work. Without it, CP
  needed to sleep to let the lower priority task go.
2. Close the active socket on disconnect. This prevents looping
  over a disconnected but not closed socket.

Fixes #6610. Fixes #6613
2022-07-26 15:29:49 -07:00
Scott Shawcroft 6d6234443d
Merge remote-tracking branch 'adafruit/main' into web_workflow_port 2022-07-25 15:57:58 -07:00
Aria Burrell 868a03ff57 Fixed empty characteristic issue with bleio+nimble.
- Based on espressif/nimble's blecent example code. Confirms that the characteristic is not empty before trying to catalogue its descriptors.
- Running ble_gattc_disc_all_dscs on empty (no length) characteristics fails with the (not-very-informative) BLE_HS_EINVAL error if this check is not performed.
2022-07-17 04:50:50 -06:00
Scott Shawcroft 78b4159448
Allow for dynamic reconfigure including port 2022-07-15 16:33:12 -07:00
Jeff Epler 4e6fa55cba
Merge pull request #6591 from tannewt/web_workflow_ticks
Add socket select task to wake CP
2022-07-15 18:30:43 -05:00
Scott Shawcroft 6e7fdcc24b
Add wait for MDNS hostname to be set 2022-07-15 13:48:19 -07:00
Scott Shawcroft 145cce93da
Merge pull request #6596 from Neradoc/ble-name-in-dotenv
Setup default BLE name in dotenv
2022-07-14 15:46:28 -07:00
Jeff Epler dcc27a8c88
Need to ensure wifi radio is set enabled again on esp32
.. otherwise, nothing set it enabled on the second soft reboot.
2022-07-14 15:09:26 -05:00
Jeff Epler 72f5537027
esp32: don't fully reset the wifi device
.. this makes reconnecting without a full reset not work.

Because this works on other generations of the esp32 (c2, c3, etc),
apply this behavior only to esp32.

After this change, it's possible to connect multiple times to wifi in
different runs of code.py or the repl after soft rebooting.
2022-07-14 15:01:15 -05:00
Neradoc 5ca6d8953d use available constants instead of testing errors for length 2022-07-14 11:55:53 +02:00
Neradoc 50a9beda04 Retrieve the BLE name from dotenv if available
Format:
CIRCUITPY_BLE_NAME = My BLE Board

- the length is limited to 31 characters
- for the NRF version it repeatedly truncates the name if it's too long
- the ESP version defaults to "nimble" if the name is too long
2022-07-14 11:55:53 +02: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
Scott Shawcroft ac460dd1e1
Merge branch 'main' into esp32 2022-07-13 15:30:53 -07:00
Jeff Epler 5c6ee20ca5
on esp32 need to initialize nvs before starting wifi
Also, change error handling so that the esp-idf error number
is shown in the traceback in the case of an error.

This allows scanning & connecting to work. I didn't try requests yet.
2022-07-13 11:57:38 -05:00
Scott Shawcroft 23bbb19138
Merge remote-tracking branch 'adafruit/main' into websocket_serial 2022-07-12 13:15:38 -07:00
Tod Kurt a658007673
Update ports/espressif/common-hal/wifi/Radio.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-07-09 22:17:26 -07:00
Tod Kurt 22e061ba35
Update ports/espressif/common-hal/wifi/Radio.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-07-09 22:17:18 -07:00
Tod Kurt 98692150ac
Update ports/espressif/common-hal/wifi/Radio.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-07-09 22:17:12 -07:00
Tod Kurt f464ec3047
Update ports/espressif/common-hal/wifi/Radio.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-07-09 22:17:02 -07:00
Dan Halbert 2c7ad7a39f make translate and pre-commit formatting fixes 2022-07-08 16:53:53 -04:00
Dan Halbert c316b950c7 merge from adafruit/main 2022-07-08 15:42:19 -04:00
Dan Halbert 76e32dcf93 remove need for CIRCUITPY_ESP_PSRAM 2022-07-08 14:54:55 -04:00
Tod Kurt d3e1d1b104 Fix #6559 2022-07-07 19:42:11 -07:00
Dan Halbert 4e88d795e1 Thonny causing crash emitglue.c:199: 2022-07-06 23:01:19 -04:00
Scott Shawcroft 07b2697ae3
WIP websocket to serial 2022-07-01 16:57:10 -07:00
Dan Halbert 8814ee03f1
Merge pull request #6542 from todbot/wifi-tx-power
Add wifi.radio.tx_power
2022-07-01 14:09:08 -04:00
Scott Shawcroft 7589e53fea
WIP websocket accept and hashlib 2022-07-01 10:18:33 -07:00
Dan Halbert 8bb369cac5 refactor debug UART to console UART; get working on ESP32 2022-06-30 23:16:46 -04:00
Tod Kurt 698d563dcf adust wifi.radio.tx_power to be x4 (in db) as mentioned in #6540 2022-06-30 15:33:03 -07:00
Tod Kurt 2a563cc8ba first cut at wifi.radio.tx_power 2022-06-30 15:10:16 -07:00
Dan Halbert b0efd130c9 ESP32 REPL working through debug UART 2022-06-29 23:19:36 -04:00
Scott Shawcroft 3be3e89d82
Merge branch 'main' into cp_webserver 2022-06-29 14:01:32 -07:00
Scott Shawcroft 8dc8265275
Fix auto-wifi created crash
The wifi event_handler runs on the other core so we need to be
careful when calling into CP APIs.

Fixes #6503
2022-06-29 11:53:10 -07:00
Dan Halbert 780c4963cb wip; change never-ever reset pin mechanism 2022-06-28 23:06:49 -04:00
Dan Halbert ca64950503 wip fixes 2022-06-28 18:32:08 -04:00
Scott Shawcroft 41039445c9
Clean up and add docs 2022-06-27 13:39:09 -07:00
Scott Shawcroft 3cd05291d0
Static files + welcome page 2022-06-27 13:39:09 -07:00
Scott Shawcroft 7543dd9af0
CORS works and autoreload too 2022-06-27 13:39:08 -07:00
Scott Shawcroft 92593aa7a1
Fix bind, remove hard coded ip 2022-06-27 13:34:13 -07:00
Scott Shawcroft 4f0a7aedfd
WIP adding devices.json and auth 2022-06-27 13:34:13 -07:00
Scott Shawcroft 32478345f8
more tweaks 2022-06-27 13:34:13 -07:00
Scott Shawcroft 0882cbf823
web server kinda works 2022-06-27 13:34:13 -07:00
Scott Shawcroft 61d0f7947b
WIP doesn't flush response before closing 2022-06-27 13:34:13 -07:00
Scott Shawcroft 301f3e0456
Start of web server 2022-06-27 13:34:13 -07:00
Dan Halbert 55784c93de wip; compiles 2022-06-26 21:22:22 -04:00
Scott Shawcroft 0c418e98b1
Merge remote-tracking branch 'adafruit/main' into auto_wifi 2022-06-13 15:44:43 -07:00
Scott Shawcroft dc794f91c0
Speed up auto-wifi with wrong password
This adds basic timeout support to connect by preventing subsequent
retries if over time. The first connect may still take more than
the timeout.
2022-06-13 15:38:19 -07:00
Scott Shawcroft b191075ab8
Better length checks 2022-06-13 09:18:42 -07:00
Scott Shawcroft 39b8c2c94e
Merge pull request #6453 from KurtE/ESP32_UART
ESP32 USE uart_param_config
2022-06-13 08:56:32 -07: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
Scott Shawcroft 2baf476530
Merge pull request #6463 from adafruit/7.3.x
Catch main up to 7.3.x
2022-06-06 11:58:05 -07:00
Scott Shawcroft be67067809
Merge remote-tracking branch 'adafruit/main' into translate_header 2022-06-03 15:18:18 -07:00
gamblor21 40e890323b Add DNS optional to set IP 2022-06-01 20:13:51 -05:00
KurtE 14ab3c7375 ESP32 USE uart_param_config
Use this function instead of several individual configuration functions
to configure such things as Baud rate, transfer size, stop bits,
parity...

This function also resets both the RX and TX Hardware Fifo
reset functions are called to setup the hardware.
2022-06-01 17:09:44 -07:00
gamblor21 4f6d4e2284 Doc fix and add set for DNS 2022-05-31 22:13:18 -05:00
gamblor21 90fe20a153 Adding manual IP address set 2022-05-27 15:33:54 -05:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Dan Halbert b143314b22 Espressif: fix allocation of multiple Incremental Encoders 2022-05-24 22:37:24 -04:00
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Scott Shawcroft 3e85cfe26b
Fix ESP and HCI build 2022-05-12 15:23:26 -07:00
Scott Shawcroft 269d51d023
Add two stage reset for BLE
This lets the BLE stack run through the wait period after a VM run
when it may be waiting for more writes due to an auto-reload.

User BLE functionality will have their events stopped. Scanning and
advertising is also stopped.
2022-05-12 13:20:44 -07:00
Dan Halbert 0f3eb9f46e espressif: check properly for pull values 2022-05-04 22:51:27 -04:00
Michael Wisslead e63a327107 Bound PulseIn start indexes to maxlen. 2022-04-28 02:28:34 +00:00
Dan Halbert 4eeaf41edc test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04:00
Dan Halbert d5deddcaf5
Merge pull request #6207 from domdfcoding/esp32-rotaryio
Add espressif rotaryio divisor support.
2022-04-06 21:35:02 -04:00
Dominic Davis-Foster f297e872d6
Account for divisor when overriding position. 2022-04-06 18:13:59 +01:00
Dan Halbert 99dc4029dc Espressif: disable pull-up on AnalogIn creation 2022-04-06 11:33:56 -04:00
Dominic Davis-Foster 319ca8560c
Always configure the second PCNT channel. 2022-03-31 20:00:34 +01:00
Dan Halbert ec5c9507b9
Merge pull request #6187 from prplz/espressif-uart-workflow-fixes
Espressif: Fix interrupts in UART workflow
2022-03-30 21:18:02 -04:00
Dominic Davis-Foster 6d025a239e
Add espressif rotaryio divisor support. 2022-03-28 09:04:02 +01:00
Michael Himing f96cd7361d Fix esp32s2 build 2022-03-27 10:09:23 +11:00
Jeff Epler 35aa32bec0
Merge pull request #6193 from tannewt/fix_empty_mdns
Fix MDNS crash on S2
2022-03-26 15:05:17 -05:00
Michael Himing 686012426d Espressif: Fix interrupts in UART workflow 2022-03-25 16:20:04 +11:00
Scott Shawcroft 8642dc4aa7
Fix MDNS crash on S2
Fixes #6186
2022-03-23 17:17:48 -07:00
Scott Shawcroft 380a7087d4
Fix 3-wire SPI on ESP
Simplifying the checks fixed it.

Fixes #6141
2022-03-23 14:53:46 -07:00
Scott Shawcroft 6dd9db31b3
Add USB to Serial/JTAG support for REPL
Adds Adafruit QT Py C3 board that uses it. Also revamps size
check script to work for S3 and C3 as well.

Fixes #6030
2022-03-21 14:03:57 -07:00
Scott Shawcroft 92d946fcac
Guard against NULL result 2022-03-21 10:15:46 -07:00
Scott Shawcroft 6f0d62d85e
Formatting and shrink build size on C3 2022-03-18 12:05:54 -07:00
Jeff Epler e9d81c2826
Add mdns module
This allows for CircuitPython to resolve a .local domain and find
other devices with MDNS services.

First step for #6174
2022-03-17 18:16:16 -07:00
Scott Shawcroft 96dd11a198
Update ESP-IDF to fix PinAlarm
Fixes #5973
2022-03-11 14:40:49 -08:00
Dan Halbert 1c8f671f0a
Merge pull request #6118 from pewpew-game/parallel-reset-optional
paralleldisplay: reset and read pins should be optional
2022-03-08 09:34:25 -05:00
Michael Himing bc1dade304 Espressif: Fix i2c pullup detection 2022-03-08 16:39:24 +11:00
Radomir Dopieralski b5ad78715c
Update ports/espressif/common-hal/paralleldisplay/ParallelBus.h
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-03-05 21:48:00 +01:00
Radomir Dopieralski f477848ac1 paralleldisplay: reset and read pins should be optional
The ``reset`` and ``read`` pins should be optional, but the espressif
code had several places where it assumed they are not, and a bug that
caused a crash on ``release_displays`` if they were made optional.

The bug was caused by the fields for storing pin numbers being set
to ``NO_PIN``, which has value of -1, while the fields have type
``uint8_t``.  That set the actual value to 255, and a subsequent
comparison to ``NO_PIN`` returned false.
2022-03-05 18:54:12 +01:00
Scott Shawcroft c4fb5f7df1
Allow ESP boards to customize how a pin is reset
This allows board code to override the default pull up reset state.

It is useful for pins that are already externally connected, pulled
or otherwise used by the board.

Fixes #5931
2022-02-17 16:32:29 -08:00
Dan Halbert fe6e03f504
Merge pull request #6013 from tannewt/esp_ble_gatt_client
Add S3 GATT client support
2022-02-17 16:02:11 -05:00
Scott Shawcroft 65af10cd23
Tweak I2C and TFT power pin defaults
This should set the power to on by default without preventing the
user code from repeatedly using it.

Fixes #5903
2022-02-14 16:19:56 -08:00
anecdata 5742a12497 input validation consistent with esp-idf is moved to common-hal 2022-02-13 22:14:45 -06:00
anecdata b559a0ee2a new kwarg: wifi.radio.start_ap(max_connections=) 2022-02-12 13:34:57 -06:00
Scott Shawcroft 8958e7ef08
Add S3 GATT client support
This allows you to connect to GATT services on the other device.
It also adds connection initiation (GAP central).

More progress on #5926
2022-02-10 11:31:57 -08:00
Scott Shawcroft c9b494b79f
Merge pull request #6006 from DavePutz/issue_5980
Correct ping timeout for espressif
2022-02-10 10:18:14 -08:00
root 6563f71545 Correct ping timeout for espressif 2022-02-09 15:58:25 -06:00