Commit Graph

2536 Commits

Author SHA1 Message Date
Scott Shawcroft 6b3ae630a9
Improve time alarm doc
Fixes #7406
2023-01-04 14:16:35 -05:00
Dan Halbert 03b43b7b3f complete rework for microcontroller.cpu.frequency and wifi.radio MAC addresses 2023-01-02 11:45:58 -05: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
Scott Shawcroft c16b42e972
Tweak arg checking and comments 2022-12-20 11:00:13 -05:00
Scott Shawcroft f8ac1d9261
Rework the coproc API
It is now a generic `memorymap` API and an ESP specific `espulp` module.

Fixes #7218. Fixes #3234. Fixes #7300.
2022-12-19 14:08:38 -05:00
Jeff Epler 297657ea9a
Refactor so that all sites of name lookup failure result in gaierror 2022-12-14 14:45:32 -06:00
Jeff Epler 5ac622a30d
get rid of nearly-empty getenv.c file 2022-12-13 13:13:01 -06:00
Jeff Epler 3459fe322b
Withdraw the _environ module
This existed solely for testing, so expose it a different way during
the unix coverage build

Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Jeff Epler a05829528b
_environ: update documentation 2022-12-08 13:36:48 -06:00
Jeff Epler ef2bfdb5db
dotenv becomes settings.toml 2022-12-08 12:44:20 -06:00
s-ol 99b8564e8f Add VfsFat.readonly property for getting current state
Previously the only other way of determining whether the Vfs has been mounted
read-write or read-only appears to be to attempt a write operation and detect a
possible OSError.

It wasn't possible for the user code to keep track of the state of the state
since the boot VM has to decide whether to (re)mount read-write or read-only,
but can't (easily) pass this information on to the runtime VM.
2022-12-08 14:45:24 +01:00
Scott Shawcroft 4c064c263e
Merge pull request #7294 from tannewt/analogbufio_rework
Rework the analogbufio API.
2022-12-02 14:53:16 -08:00
Scott Shawcroft d6c3dfb461
Merge pull request #7297 from jepler/chain-exception-doc
Implement the chain= argument of traceback.print_exception
2022-12-02 14:53:03 -08:00
Scott Shawcroft f7504ff857
Tweaks based on review comments 2022-12-02 10:19:31 -08:00
Jeff Epler b83c42e41a
Implement the chain= argument of traceback.print_exception 2022-12-02 10:50:31 -06:00
Scott Shawcroft 9e104c04ae
Merge pull request #7215 from FoamyGuy/set_root_group
displayio.show() API change
2022-12-02 08:45:20 -08:00
Scott Shawcroft 255e997345
Rework the analogbufio API.
* read() is now readinto() and takes the buffer to write into.
* readinto() returns the number of valid samples.
* readinto() can be interrupted by ctrl-c.
* readinto() API doesn't support signed numbers because it never did.
* sample_rate is now required in the constructor because supported
  values will vary per-port.
* 16 bit values are full range. 12 bit samples from RP2040 are stretched
  in the same way they are for AnalogIn.

Fixes #7226
2022-12-01 17:46:07 -08:00
Dan Halbert 082b0d1aed
Merge pull request #7191 from jepler/fastpixelmap
Add a fast PixelMap-like class
2022-12-01 11:43:00 -05:00
foamyguy 0563487433 get slicing 2022-11-30 19:16:20 -06:00
Jeff Epler 530e5a1df2
Use standard validation function 2022-11-30 14:39:51 -06:00
Jeff Epler c46e219795
Having an input-only pin is rare, save a string on other ports 2022-11-30 14:39:49 -06:00
Jeff Epler d39d146352
Merge some messages 2022-11-30 14:39:47 -06:00
Jeff Epler f67bca94c4
On python3 log(0) raises math domain error, not zerodivisionerror 2022-11-30 14:39:33 -06:00
Jeff Epler 2b01c139f5
use a standard validator function 2022-11-30 12:06:20 -06:00
Jeff Epler 7c9cd567a0
If uart is disabled, no pins will work; show NotImplementedError instead 2022-11-30 12:06:18 -06:00
Jeff Epler 8658e7a954
re-use length validator 2022-11-30 12:06:18 -06:00
Jeff Epler ac999098ee
merge a message 2022-11-30 12:06:18 -06:00
Jeff Epler 6ac2022093
merge a message 2022-11-30 12:06:16 -06:00
Jeff Epler 284ac21f51
merge a message 2022-11-30 12:06:16 -06:00
Dan Halbert 1bcfff3716
Merge pull request #7272 from tannewt/picow_mdns
Add MDNS support to Pico W
2022-11-29 10:09:24 -05:00
MicroDev 8a9d841da9
Merge pull request #7275 from jshimbo/main
supervisor.ticks_ms() documentation has an error
2022-11-29 14:34:24 +05:30
MicroDev e93af31b63
Merge pull request #7269 from jepler/socketpool-gaierror
Add SocketPool.gaierror
2022-11-29 14:33:12 +05:30
Scott Shawcroft 81afe05811
Merge pull request #7265 from jepler/wifi-monitor-docs
Fix documentation of wifi.Monitor
2022-11-28 16:23:40 -08:00
Scott Shawcroft c13ca95da1
Add MDNS support to Pico W
This adds both cpy-MAC.local and circuitpython.local support.

Fixes #7214
2022-11-28 16:15:28 -08:00
Jeff Epler aef55b7e41
Add SocketPool.gaierror
gaierror(-2) is raised in the failure case of getaddrinfo. This is
compatible with cpython's socket module.

Typical session:
```
>>> import socketpool
>>> import wifi
>>> socket = socketpool.SocketPool(wifi.radio)
>>> try: socket.getaddrinfo("boo", 0)
... except socket.gaierror as e: ee = e
...
>>> type(ee)
<class 'gaierror'>
>>> ee.errno == socket.EAI_NONAME
True
>>> ee.strerror
'Name or service not known'
>>> raise ee
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <module>
gaierror: (-2, 'Name or service not known')
```

Closes: #6941
2022-11-28 16:57:44 -06:00
Scott Shawcroft ad2d190507
Merge pull request #7247 from tannewt/picow_web_workflow
Enable* web workflow for Pico W
2022-11-28 14:19:42 -08:00
Jeff Epler e1c025d6dd
Fix documentation of wifi.Monitor
Its methods & properties were incorrectly documented as being directly
in 'wifi'
2022-11-28 13:30:08 -06:00
foamyguy 57d7f7f2ad move to _pixelmap 2022-11-24 09:07:08 -06:00
Jeffrey Shimbo c0b57ff8c5
Typo in docs for supervisor.ticks_ms()
https://docs.circuitpython.org/en/latest/shared-bindings/supervisor/index.html#supervisor.ticks_ms
ticks_add() helper function has an error
2022-11-24 06:05:46 -08:00
Dan Halbert 17be447c4b correct Radio.connect() and .start_ap() signatures; clean up some code 2022-11-22 17:11:03 -05:00
Scott Shawcroft dc20390588
Fix stubs 2022-11-22 09:04:12 -08:00
foamyguy 19f1119994 Merge branch 'main' into fastpixelmap
# Conflicts:
#	shared-module/adafruit_pixelbuf/PixelBuf.c
2022-11-21 20:25:58 -06: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
s-ol 40d35e9eaa Don't block in I2CTarget.request(-1)
Partially reverts #6985
Closes #7241
2022-11-20 16:08:00 +01:00
foamyguy ef3398422a allow set_root_group for FrameBufferDisplay instead of show() 2022-11-19 11:41:48 -06:00
foamyguy e3cae22297 allow set_root_group for EPaperDisplay instead of show() 2022-11-18 17:34:03 -06:00
foamyguy 403e3ef430 change to CIRCUITPYTHON_TERMINAL. change internal API to use set_root_group 2022-11-18 16:53:18 -06:00
MicroDev f637332de6
Merge pull request #7209 from jepler/code-optimize-pixelbuf
Save code space by packing rgbw values into C union
2022-11-18 14:46:55 +05:30
Scott Shawcroft 866ff5bd21
Merge pull request #7197 from FoamyGuy/vectorio_hidden
implement self hidden property for vectorio shapes
2022-11-16 12:56:10 -08:00