Commit Graph

2490 Commits

Author SHA1 Message Date
Dan Halbert b3ca6fd011
Merge pull request #6995 from dhalbert/missing-support-matrix-modules
add missing native modules to support matrix
2022-10-04 20:49:29 -04:00
Dan Halbert ed87579a65 add missing native modules to support matrix 2022-10-04 19:22:18 -04:00
Dan Halbert 1c2d2c9be4
Merge pull request #6980 from MicroDev1/supervisor
Implement certain supervisor functions as properties
2022-10-04 08:54:11 -04:00
MicroDev 4fd15acf77
implement suggested change
pass brightness value directly

Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-10-04 08:28:48 +05:30
Dan Halbert 6dc03ae3ce fix some dotenv parsing 2022-10-03 21:56:11 -04:00
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
microDev 17ed2a6898
implement certain supervisor functions as properties
- disable_ble_workflow
- set_next_stack_limit
- set_rgb_status_brightness
2022-10-01 23:44:22 +05:30
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
Isaac Benitez 71d649613f Updated utime() to take a 2-tuple instead of a plain int 2022-09-22 00:56:44 -07: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
Isaac Benitez 5a21c30ab2 Added utime() to the os librady 2022-09-18 18:43:27 -07: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
Alec Delaney 5a1223fea8 Add info for rotaryio 2022-09-12 20:07:37 -04:00
Jeff Epler 56112e00a1 Give fontio its own enable
.. the default is intended to be the equivalent of the original,
implementing `DISPLAYIO && TERMINALIO`.

This is a possible alternative to #6889, if I understand the intent.
2022-09-11 08:09:14 -05:00
Lee Atkinson f279a2dbb2
Merge branch 'adafruit:main' into adcdma 2022-09-08 11:46:01 -04:00
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
latkinso42 c1f57c6ceb Pushing for resolution 2022-09-07 18:53:35 -04:00
latkinso42 a87d3bd89e Bad quotes 2022-09-06 19:40:20 -04:00
latkinso42 51dab921ea Bad object reference 2022-09-06 19:09:00 -04:00
latkinso42 25078a24a3 Attempt to fix Build-Docs and Pre-Commit 2022-09-06 18:58:57 -04:00
latkinso42 a1856ea3e9 Renaming module from adcbuffer to analogbufio 2022-09-05 12:11:49 -04:00
latkinso42 d7a1db5b87 Changes per review 2022-09-04 15:57:59 -04:00
latkinso42 6fe2ea4513 Merging back with updated main files 2022-09-02 15:51:45 -04:00
Alec Delaney 85f0206fa4 Document socketpool.SocketPool.__init__() 2022-09-01 19:44:08 -04:00
MicroDev b1371ceb62
Merge pull request #6846 from tekktrik/dev/fix-uart-docs
Fix UART documentation
2022-09-01 13:08:34 +05:30
Dan Halbert 2fa671c0f8 avoid status bar updates immediately after hard restart 2022-08-30 22:33:29 -04:00
Dan Halbert 52080e24eb status bar control 2022-08-30 15:23:44 -04:00
thetazero 1a40757cdd
Change unpopulated to always 0 2022-08-30 11:48:17 -04:00
Alec Delaney 0d8dab7381
Update write() function definition 2022-08-30 11:18:06 -04:00
Alec Delaney bf9f329a61
Fix UART.readline docstring 2022-08-30 11:12:47 -04:00
thetazero 92c77013bf
Lint 2022-08-30 10:37:48 -04:00
thetazero f5286b4e79
Improve os.stat docs 2022-08-29 13:01:11 -07:00
Dan Halbert 98cc46e784 Merge pull request #6834 from DavePutz/issue_6565
Make PulseIn object long-lived
2022-08-28 19:00:49 -04:00
root 44a5ca2f85 Make pulsein object long-lived 2022-08-28 12:07:26 -05:00
root 09dd2294f6 Make Pulsein long-lived 2022-08-28 12:00:48 -05:00
Lee Atkinson 04af01a672 Pin Validation fixed/readmultiple return fixed 2022-08-27 14:47:12 -04:00
Lee Atkinson 7cd969e236 Fixing document triple quotes 2022-08-25 17:09:50 -04:00
Lee Atkinson 532ae2a39d Fixing Document issues 2022-08-25 11:57:07 -04:00
Dan Halbert aa5f892a11
Merge pull request #6810 from maximkulkin/usb-hid-get-last-report-doc
shared-bindings/usb_hid: Fix docs for Device.get_last_received_report()
2022-08-25 07:55:59 -04:00
MicroDev 48967ed725
Merge pull request #6802 from dhalbert/remove-last_received_report-property
remove usb_hid.Device.last_received_report
2022-08-25 12:19:07 +05:30
Lee Atkinson 37b6079c05 Merge branch 'adcdma' of https://github.com/latkinso42/circuitpython into adcdma
Reconciling remote updates
2022-08-24 21:46:28 -04:00
Lee Atkinson 55c0404d85
Merge branch 'adafruit:main' into adcdma 2022-08-24 21:07:12 -04:00
Alec Delaney c395e0d217
Fix type annotation in adafruit_bus_device.SPIDevice.__init__() 2022-08-24 20:48:32 -04:00
Maxim Kulkin 76ce46a530 shared-bindings/usb_hid: Fix docs for Device.get_last_received_report()
Update documentation for Device.get_last_received_report() fixing
type signature and adding note on "consume" behavior.
2022-08-24 17:59:14 -04:00
Lee Atkinson 6fd08483e2 Tidying code for PR/ Minor Issues 2022-08-24 17:41:51 -04:00
Dan Halbert fa5fcb612d remove usb_hid.Device.last_received_report 2022-08-24 08:56:48 -04:00
Jeff Epler e920c977d4
hashlib: fix the 'digest_size' property
Closes: #6796
2022-08-23 14:57:26 -05:00
Lee Atkinson 57c9d9cad5
Merge branch 'adafruit:main' into adcdma 2022-08-23 08:04:23 -04:00
root fc21b30762 Make rotaryio object long-lived 2022-08-21 15:09:27 -05:00
Lee Atkinson f5655dd48c Fixing Build errors/ DMA Xfer Rate 2022-08-21 11:44:40 -04:00
gamblor21 f134f86291 Two small fixes, remove hardcoded height and non-scale issues 2022-08-19 15:13:38 -05:00
Lee Atkinson 68671399d1 More formating 2022-08-19 10:51:13 -04:00
Lee Atkinson d3c3c9eac4 Tidy a few things 2022-08-18 19:10:16 -04:00
Lee Atkinson f91af513b7 Introduced odule adcbuffer / removed analogio/AnalogFastIn 2022-08-18 16:23:17 -04:00