Commit Graph

454 Commits

Author SHA1 Message Date
Dan Halbert 465d1c673e wip 2023-08-03 23:29:00 -04:00
Dan Halbert 0d4bc8c163 initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
Dan Halbert 955d2723d0 RP2040 SleepMemory 2023-05-21 19:05:25 -04:00
Dan Halbert f2bfced407
Merge pull request #7976 from anecdata/ap_ipv4_picow
Allow Access Point static IPv4 on the raspberrypi port
2023-05-16 18:45:22 -04:00
Bill Sideris 95c1d849d3
Just 500
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-05-16 04:47:44 +03:00
Bill Sideris ed31c7dc8f
Await down on stop_station 2023-05-15 22:38:59 +03:00
anecdata 4ac7e7643a
netutils dhcp server 2023-05-14 17:44:27 -05:00
anecdata 6dd2e86727
remove dhcp calls 2023-05-14 14:52:49 -05:00
anecdata cd41fb101a
oops 2023-05-13 22:55:08 -05:00
anecdata 8196366c94 initial 2023-05-13 22:06:16 -05:00
anecdata 29bf64decb raspberrypi common-hal f(x)s Not Implemented 2023-05-08 22:41:33 -05:00
Scott Shawcroft 750615f2da
Merge pull request #7430 from Lanzaa/rp2040_cpu_frequency
Add frequency setting for RP2040 boards.
2023-05-02 09:52:28 -07:00
Scott Shawcroft 488dca565f
Merge pull request #7922 from tannewt/dvi320
Take in framebuffer resolution, not output res
2023-05-02 09:22:51 -07:00
Scott Shawcroft 0aa71ed6e6
Tweak the picodvi docs and arg checking 2023-05-01 11:30:04 -07:00
Scott Shawcroft b08714bb8f
Take in framebuffer resolution, not output res
Fixes #7911
2023-04-28 17:13:17 -07:00
Scott Shawcroft 8104b824e0
Standardize CPU temp and voltage. Add autogen warning 2023-04-28 16:19:43 -07:00
Scott Shawcroft 0f9fb33371
Merge branch 'main' into rp2040_cpu_frequency 2023-04-19 17:05:58 -07:00
Scott Shawcroft e2ab7a4751
Change voltage. Refine docs 2023-04-19 17:04:54 -07:00
Scott Shawcroft 66edcf5d03
Add PicoDVI support
PicoDVI in CP support 640x480 and 800x480 on Feather DVI, Pico and
Pico W. 1 and 2 bit grayscale are full resolution. 8 and 16 bit
color are half resolution.

Memory layout is modified to give the top most 4k of ram to the
second core. Its MPU is used to prevent flash access after startup.

The port saved word is moved to a watchdog scratch register so that
it doesn't get overwritten by other things in RAM.

Right align status bar and scroll area. This normally gives a few
pixels of padding on the left hand side and improves the odds it is
readable in a case. Fixes #7562

Fixes c stack checking. The length was correct but the top was being
set to the current stack pointer instead of the correct top.
Fixes #7643

This makes Bitmap subscr raise IndexError instead of ValueError
when the index arguments are wrong.
2023-04-19 15:14:02 -07: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 5c429320a8 Add wifi.radio.connected, wifi.radio.ap_active 2023-03-31 17:57:53 -04:00
Gregory Neverov 173bc198c6 don't set tcp_err callback for listen sockets 2023-03-29 11:49:32 -07:00
hathach 8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
Jeff Epler e05f0ba3b2
Revert "Correctly raise OS error in socketpool_socket_recv_into()"
This reverts commit 7e6e824d56.

Fixes #7770

The change in #7623 needs to be revered; the raise-site added in #7632
is the correct one and the one in socketpool needs to be reverted.

This is not affecting 8.0.x because #7623 was not back-ported to there
before we realized it was not a full fix.

Both #7770 and #7606 should be re-tested. I didn't test.
2023-03-22 14:32:06 -05:00
hathach fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Dan Halbert 859a48723f
Merge pull request #7633 from tannewt/fix_imx_pwm
Fix `pwmio` on iMX RT.
2023-02-28 14:11:06 -05:00
Dan Halbert f9831b3bbc
Merge pull request #7639 from adafruit/8.0.x
Merge 8.0.x up to main
2023-02-24 19:32:09 -05:00
Scott Shawcroft 1acf65ee22
Fix `pwmio` on iMX RT.
It now handles deinit, never_reset and sharing tracking. PWM
now runs in the WAIT state as well during a time.sleep().

_reset_ok() was removed because it was called in one spot right
before deinit().

Some PWMOut were also switched to a bitmap for use instead of
reference count. That way init and deinit are idempotent.

Fixes #6589. Fixes #4841. Fixes #4541.
2023-02-22 11:22:39 -08:00
Jeff Epler de9233f84a
raspberrypi: SSLSocket: raise OSError when appropriate
Rather than returning the negative error value.

This is intended to close #7606, though I did not test with mqtt.
Instead, I created a simple standalone test program:
```python
import wifi, socketpool, ssl, time
#wifi.radio.connect(<omitted>)
import socketpool
socket = socketpool.SocketPool(wifi.radio)
ctx = ssl.create_default_context()

b = bytearray(8)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sss = ctx.wrap_socket(s, server_hostname='example.com')
sss.connect(('example.com', 443))
sss.setblocking(False)
r = sss.recv_into(b)
print(r, b)  # prints 4294967285 which is -11 as unsigned
sss.close()
```

Before the change, r was the out of range value 4294967285. After the
change, the recv_into call raises OSError instead.

This is comparable to the behavior on standard Python, though an
SSLWantReadError is raised instead.

The original (mis)behavior seems to match what was uncovered deep inside
minimqtt by adding logging:
```
370.578: DEBUG - PKT: _sock_exact_recv: recv_len = 4294967285
```
2023-02-22 10:07:48 -06:00
root 7e6e824d56 Correctly raise OS error in socketpool_socket_recv_into() 2023-02-21 13:38:29 -06:00
MicroDev 508f2015b6
Merge pull request #7605 from Neradoc/pico-uart-in-use-error
Tweak the UART in use message on RP2040
2023-02-18 08:35:52 +05:30
Neradoc 13716c9c30 tweak the UART in use message on RP2040 2023-02-17 23:29:44 +01:00
Dan Halbert bbadc00599
Merge pull request #7577 from dhalbert/safemode-py
Implement safemode.py
2023-02-16 14:15:20 -05:00
MicroDev 32d86c3ea3
Merge pull request #7580 from adafruit/8.0.x
Merge 8.0.x up to main
2023-02-15 09:16:51 +05:30
Gregory Neverov 98b61279e4 Add function common_hal_busio_uart_never_reset for rp2 2023-02-14 09:05:24 -08:00
Dan Halbert d8231f1588 Implement safemode.py 2023-02-13 18:26:38 -05:00
Jeff Epler b9f689adf4 Use lowest drive level for PIO 2023-02-08 16:18:58 -06:00
Gregory Neverov 77c6daf4b8 don't throw exception 2023-02-01 16:33:22 -08:00
Dan Halbert 13338df9f1
Merge pull request #7462 from tannewt/fix_rp2_reset_reason
Tweak RP2040 reset reason
2023-01-19 21:10:57 -05:00
Scott Shawcroft 82a313065e
Tweak RP2040 reset reason
Watchdogs are used to reboot out of the bootloader. There is a
scratch register for user watchdogs. So use sdk functions to better
distinguish these.

Related to #7346
2023-01-17 16:12:08 -08:00
Scott Shawcroft 683e393878
Add comments for MDNS code 2023-01-17 14:07:30 -08:00
Colin B bfba1e4100 Change common_hal_mcu_processor_set_frequency to void
* Add warning about setting RP2040 frequency
2023-01-16 21:26:13 -08:00
Scott Shawcroft ee2fe993dd
Fix repeated MDNS use on Pico W 2023-01-12 14:56:06 -08:00
Scott Shawcroft 5c517b7e5a
Handle MDNS deinited better. 2023-01-12 11:24:20 -08:00
Scott Shawcroft 78c2fa5b28
Merge pull request #7437 from dhalbert/improve-type-checking-error-msgs
Improve type validation error messages, especially for pins
2023-01-11 10:54:22 -08:00
Jeff Epler e817563ca0
Update cyw43-driver, fix no-password wifi
Now, open wifi works on Pico W, so this closes #7438.

For the web workflow it's now OK to either
 * specify an empty password string (as before)
 * not have the CIRCUITPY_WIFI_PASSWORD key at all (new functionality)
2023-01-10 15:07:17 -06:00
Dan Halbert a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
Colin B a84a8855ed Add frequency setting for RP2040 boards. 2023-01-07 17:41:37 -08:00
Dan Halbert a3adcf0e1a clarify read-only mac address; reuse translate msgs 2023-01-02 10:13:20 -05:00
Jeff Epler 928fb0a9c4
Make the "name or service not known" message translatable 2022-12-26 13:58:31 -06:00