Commit Graph

2432 Commits

Author SHA1 Message Date
Paulus H.J. Schulinck
89e0601a39 Update I2CTarget.c
Correction of the timeout value range needed to set the timeout to 'forever'.
The line 162 checks timeout for a value of 0 while the function definition defaults timeout to -1. In the current version of the code timeout is only checked for a value of 0 or in the 'else if' part for a value of > 0. So, values of <0 will not be taken in to account.  That is the reason of my modification.
2022-10-03 13:09:40 +01:00
Paulus H.J. Schulinck
041766351c Update I2CTarget.c
Correction in function request() doc function signature.
(after speaking with @jepler on Discord).

(@jepler: 'Circuitpython always has floats enabled')
2022-10-01 22:23:17 +01:00
Paulus H.J. Schulinck
d66eeaab26 Update I2CTarget.c
Modification of the doc text of function request().

1) The timout parameter is a keyword-only argument; so Added '*,' in the function signature;
2) for parameter timeout an integer is expected, not a float.
2022-10-01 21:56:07 +01: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
Jeff Epler
907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05: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
d59774d750
don't use regcomp to check hostname validity 2022-09-28 15:11:55 -05:00
Jeff Epler
dbd7ce9fdc
restore checking hostname format on esp32 where it was checked before 2022-09-28 14:38:13 -05:00
Jeff Epler
bc63f9370a
comment why it's this way 2022-09-28 14:38:11 -05:00
Jeff Epler
ff7731491e
Implement enough of socketpool to do ntp and non-https requests 2022-09-28 10:06:34 -05:00
Jeff Epler
a7a1bd7880
Implement DNS resolution
```
>>> s = socketpool.SocketPool(wifi.radio)
>>> s.getaddrinfo("google.com", 80)
[(0, 0, 0, '', ('142.250.81.206', 80))]
```
2022-09-28 10:06:33 -05:00
Jeff Epler
6c3cdceb45
Implement scan, connect, ping
My pings go out, and then they come back

```py
import os
import wifi
import ipaddress

wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
```
2022-09-28 10:06:33 -05:00
Jeff Epler
346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Jeff Epler
b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
Jeff Epler
4e96667d50
Manual fix for oddball cases 2022-09-27 15:19:32 -05:00
Jeff Epler
c415c13517
mend broken doc block
Since black_bindings.py will pass each contiguous
"//|"-block to black independently, they must each be a fully
formed Python item.
2022-09-27 15:19:31 -05:00
Jeff Epler
da4f2db1df
Add missing type annotations
These are treated as warnings by extract_pyi, so they don't stop
the build process.
2022-09-27 09:10:55 -05:00
Dan Halbert
a7b10d41b4
Merge pull request #6522 from jepler/must-be-int
Improve argument checking & reduce strings to translate
2022-09-25 17:55:56 -04:00
Dan Halbert
c291a02bcc
Merge pull request #6943 from snkYmkrct/main
Support for opening a file by name in MP3Decoder
2022-09-25 17:53:51 -04:00
snkYmkrct
d7ea1c39c6 Minor update to MP3Decoder documentation 2022-09-25 13:34:50 +02:00
snkYmkrct
ee6bd09438 Rename method, and remove redundant checks 2022-09-25 10:42:49 +02:00
Neradoc
5346b89b08 don't use @property in docs, just document as a property 2022-09-25 07:18:18 +02:00
Neradoc
2dbcd760fc usb_cdc.Serial.readinto has no nbytes parameter 2022-09-25 05:06:45 +02:00
snkYmkrct
a7406ec098 Support for opening a file by name in MP3Decoder 2022-09-23 19:20:44 +02:00
Jeff Epler
4f75d09e86
Get rid of an unneeded message 2022-09-22 11:56:57 -05:00
Jeff Epler
8227903b61
Use validation functions 2022-09-22 08:39:34 -05:00
Jeff Epler
ef35ca1d3e
vectorio: Simplify argument checking of x/y values 2022-09-22 08:39:33 -05:00
Jeff Epler
267ec1dc4f
unify some 'must/should be an int' messages 2022-09-22 08:39:32 -05:00
Dan Halbert
e045415f59
Merge pull request #6247 from s-ol/descriptor-override
Add supervisor.set_usb_identification(manufacturer, product, vid, pid) function
2022-09-21 09:20:55 -04:00
snkYmkrct
9c5abb6d7a Change the examples in documentation 2022-09-21 12:52:17 +02:00
snkYmkrct
bb40b5c98e Correction 2022-09-21 08:24:01 +02:00
snkYmkrct
129c5de670 Made requested changes in the documentation 2022-09-21 08:24:01 +02:00
snkYmkrct
21551a82e3 Change to allow WaveFile and MP3Decoder to accept a file path 2022-09-21 08:24:01 +02:00
Dan Halbert
9aca092900 squeeze the usb identification code; manufacturer was being copied to product 2022-09-20 20:23:17 -04:00
Dan Halbert
c567b43441 add CIRCUITPY_USB_IDENTIFICATION to turn off on smallest builds 2022-09-20 14:32:38 -04:00
Dan Halbert
adf15faa8f merge from main; throw NotImplementedError if CIRCUITPY_USB not set 2022-09-20 13:18:32 -04:00
Dan Halbert
6f8fe1b3e1 touch up analogbufio ValueError msg; consolidate with another message 2022-09-16 11:17:13 -04:00
Dan Halbert
8a568d18b5
Merge pull request #6757 from latkinso42/adcdma
analogbufio
2022-09-16 08:32:24 -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
7914870f9a
Merge pull request #6908 from dhalbert/nrf-busio-none-empty-uart-read
nrf: return None when UART.read() reads nothing
2022-09-15 22:12:06 -04:00
Dan Halbert
6bb47038d5 Merge remote-tracking branch 'adafruit/main' into adcdma 2022-09-15 20:42:51 -04:00
Dan Halbert
3abfd212ec nrf: return None when UART.read() reads nothing 2022-09-15 19:40:02 -04:00
Dan Halbert
60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
TimonPeng
1cc4d63c52 Fix bindings typing 2022-09-16 00:02:17 +08:00
Dan Halbert
87d120678c
Merge pull request #6890 from jepler/fontio
Give fontio its own enable
2022-09-14 14:22:46 -04:00
Alec Delaney
129e38096e Add information to aesio 2022-09-12 21:15:07 -04:00
Alec Delaney
b90a3160d4 Add information on canio 2022-09-12 21:09:07 -04:00
Alec Delaney
a7c7d1428a Add information for countio 2022-09-12 20:46:29 -04:00
Alec Delaney
fcdb988fa1 Add information for audioio 2022-09-12 20:36:51 -04:00