Commit Graph

2044 Commits

Author SHA1 Message Date
Scott Shawcroft d2860b58b0
Check background pending before sleep
There is a race between when we run background tasks and when we
sleep. If an interrupt happens between the two, then we may delay
executing the background task. On some ports we checked this for
TinyUSB already. On iMX RT, we didn't which caused USB issues.
This PR makes it more generic for all background tasks including
USB.

Fixes #5086 and maybe others.
2021-08-19 12:18:13 -07:00
Jeff Epler 2b64318a57 Update all implementations of common_hal_busio_spi_read to honor write_value
(nrf, rp2040, and cxd56)

.. as well as a misleading comment that said that read always output
zeros.

Closes: #3447
2021-08-18 10:20:40 -05:00
gamblor21 e5dc722176 Fix for int type and pin validation 2021-08-17 19:16:26 -05:00
gamblor21 168ed355b1 Made check function generic 2021-08-17 17:55:26 -05:00
microDev 1c4a6c3667
atexit module refinements
- add test for atexit module
- add callback to gc collection
- fix callback memory allocation
- execute callback on both code and repl exit
2021-08-16 21:37:32 +05:30
foamyguy 6bd8a1d669 ensure bitmap type in argument 2021-08-16 09:10:29 -05:00
foamyguy 029150ac3b validate initial point is in-bounds 2021-08-15 19:46:20 -05:00
Dan Halbert 3dc2b4c2d3 at least original functionality with new API 2021-08-14 12:36:40 -04:00
Dan Halbert 4f8ff12afa wip 2021-08-14 12:36:40 -04:00
Dan Halbert ffb9ecfeca
Merge pull request #5139 from tannewt/onewireio
Move OneWire to `onewireio`
2021-08-13 18:10:04 -04:00
foamyguy 4d8494f1cd fix stubs 2021-08-13 10:42:21 -05:00
foamyguy c1e164e1ff rename to boundary_fill and clean up comments 2021-08-13 09:52:51 -05:00
foamyguy 0bbb0f1d06 Merge branch 'adafruit_main' into bitmaptools_paint_fill 2021-08-13 09:49:24 -05:00
microDev 78f073c457
Merge pull request #5138 from jepler/refresh-defaults
Displayio: change refresh minimum_frames_per_second default to 0
2021-08-13 09:35:50 +05:30
Scott Shawcroft 7e55905d95
Fix up onewireio docs and other notes
Not all of the notes were marked correctly.
2021-08-12 11:15:04 -07:00
Jeff Epler a89f1c806f
Update Display.c 2021-08-12 12:50:38 -05:00
Scott Shawcroft de796e2304
Move OneWire to `onewireio` from `busio`
This will allow finer grained inclusion in 8.0.0

Fixes #5135
2021-08-12 10:47:14 -07:00
Jeff Epler e8df829714 Displayio: change refresh minimum_frames_per_second default to 0
Closes: #5133
2021-08-12 12:00:07 -05:00
Scott Shawcroft d294692c4e
Merge pull request #5100 from tannewt/fix_cp_irremote
Switch SAMD21 ticks to PER event
2021-08-12 09:52:29 -07:00
James Carr 670d295db5 Update the __init__ documentation for EPaperDisplay.
The unknown parameter `single_byte_bounds` was removed.
The missing parameters `set_current_column_command` and `set_current_row_command` were added.
2021-08-12 14:05:17 +01:00
Scott Shawcroft 0c1d6cef75
Merge remote-tracking branch 'adafruit/main' into fix_cp_irremote 2021-08-11 13:43:59 -07:00
Scott Shawcroft 083960ce90
Fix SAMD51 builds and Prox Trinkey
Adds CIRCUITPY_BUSIO_UART to disable UART by raising ValueError
that no pins work.
2021-08-11 11:53:26 -07:00
gamblor21 e18ceea9ba Check for duplicate pins in rows and columns 2021-08-10 18:18:21 -05:00
microDev 93c9d59960
Merge branch 'main' into getpass 2021-08-10 01:00:10 +05:30
microDev 3495cc1ff6
Merge pull request #5110 from jepler/format-exception
Implement `traceback.format_exception`
2021-08-10 00:47:18 +05:30
Kattni c87d90ec4b
Merge pull request #5090 from WarriorOfWire/draw_protocol
Draw protocol
2021-08-09 15:04:36 -04:00
microDev 32ee06b293
fix crash when traceback object is supplied 2021-08-09 22:53:23 +05:30
Jeff Epler 9a932a5a48 traceback: Implement format_exception 2021-08-09 08:27:28 -05:00
microDev 51f8603783
add getpass module 2021-08-09 17:50:28 +05:30
foamyguy 158048e56b trying to make lists 2021-08-08 14:33:07 -05:00
foamyguy bcfec10552 starting bitmaptools.paint_fill 2021-08-08 09:31:09 -05:00
Kenny a1fff320fb add location property to vectorshape and all composed shapes 2021-08-08 00:14:53 -07:00
microDev 063e3946d6
Merge pull request #5094 from jepler/quirc
Add qrio: Decode QR codes with quirc lib
2021-08-07 09:30:20 +05:30
Scott Shawcroft be2342f32f
Merge pull request #5072 from microDev1/traceback
Add traceback module
2021-08-06 12:10:17 -07:00
Jeff Epler 67551c1ac0 qrio: Split QRInfo & PixelPolicy to their own .c/.h files 2021-08-06 09:53:17 -05:00
Jeff Epler 8e201d519e better document constructor arguments 2021-08-05 15:04:28 -05:00
Jeff Epler 0fbe56c915 Better Document PixelPolicy and the pixel_policy argument 2021-08-05 12:27:49 -05:00
Jeff Epler e5a57d2399 Fix function name in prototype 2021-08-05 12:24:12 -05:00
Jeff Epler 46ac717538 Rename qrinfo -> QRInfo 2021-08-05 12:24:12 -05:00
Jeff Epler 14f1d95d2d qrio: Fix handling of 1-arg decode() 2021-08-05 12:24:12 -05:00
microDev 870f26bfc4
traceback module refinements 2021-08-05 20:11:15 +05:30
Kenny 6be952d3ba found more documentation dependencies that needed updating 2021-08-05 00:13:10 -07:00
Kenny 85bf3d074f stub checker does not approve of shared vectorshape properties 2021-08-04 23:55:03 -07:00
Jeff Epler bd903f2f03 Add qrio: Decode QR codes with quirc lib 2021-08-04 09:16:00 -05:00
microDev fb0f2583db
update traceback module 2021-08-04 12:22:21 +05:30
microDev 193a8d2e67
add traceback object 2021-08-04 12:10:57 +05:30
Scott Shawcroft 713c8e7b3f
Fix builds without the ble workflow 2021-08-03 14:36:41 -07:00
Kenny 48ea81e2f1
Vexing pedantry
Spaces deleted from phone
Eternal chore, lint
2021-08-03 11:25:31 -07:00
Kenny 739ef92fc9
Update __init__.h
More random spaces. Why isn’t this in a pre-commit check
2021-08-03 09:20:02 -07:00
Kenny 464281b881
Stub comma 2021-08-03 08:08:11 -07:00
Kenny 8607cdd783 vectorio: add draw protocol
* Removes VectorShape from user python interactions
* Re-integrates vectorio with displayio behind draw protocol implementations
* Implements draw protocol with VectorShape
* Composes VectorShape behaviors into Rectangle, Circle and Polygon
* Fixes terrible pixel garbage being left behind
* Improves redraw performance (heuristically) by tracking dirty area separately from current area.

Known Issues:
It does not work with transposed views.
2021-08-02 20:19:54 -07:00
Scott Shawcroft 1e225610cc
Add ability to disable BLE workflow
Call `supervisor.disable_ble_workflow()` and the BLE workflow will
be disabled until the chip is reset.

This also includes a couple fixes:
1. Terminals can now be deinit by setting the tilegrid to NULL. This
  prevents using the tilegrid before display is init.
2. Fix BLE serial send amount when sending more than a single packet.

Fixes #5049
2021-08-02 18:37:19 -07:00
Kenny 0afd863224 vectorio: palettes don't color dirty rectangles
This is a breaking change with previous palette semantic with respect to python code that uses vectorio.
Displayio has breaking changes in cpy 7 for Group's removal of max_size parameter so this is as good a
time as any to break everything.

Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.

New:
To color vectorio shapes correctly you pass in a palette with length >= 1. Palette[0] will be the color of the shape.

Also improves pixels per second when skipping areas that aren't covered by the shape.
2021-07-31 16:32:01 -07:00
microDev a3998d0626
add atexit module 2021-07-30 09:32:28 +05:30
Dan Halbert e9369d50e1
Merge pull request #5067 from tannewt/pulseout_switch
Switch to pin, frequency and duty_cycle PulseOut
2021-07-28 14:58:06 -04:00
microDev f371c0a609
add traceback module 2021-07-28 18:06:23 +05:30
Dan Halbert b0fb709d83 more gamepad removal 2021-07-26 23:34:25 -04:00
Dan Halbert 901a6c27c0 remove gamepad; deprecate gamepadshift 2021-07-26 22:15:09 -04:00
Scott Shawcroft 412eb87080
Switch to pin, frequency and duty_cycle PulseOut
Passing in a PWMOut still works but is deprecated. It will be
removed in CircuitPython 8.0.0

This also switches STM32 timer indices and channel indices to
0-based in our pin data rather than `- 1` everywhere. The latter is
more bug prone.

Most of the way for #3264

Tested on Metro M0, Metro M4, Feather S2, Feather nRF52840, Feather
STM32F4 and Arduino RP2040.
2021-07-26 18:35:49 -07:00
Christian Walther 0bdff4fd5f Remove addressed TODO comments 2021-07-23 21:00:00 +02:00
microDev e790ff7327
Merge pull request #5036 from tannewt/esp_oserror0
Remove OSError(0) and old network modules
2021-07-23 11:00:56 +05:30
Scott Shawcroft beda1f7998
Merge pull request #5037 from hierophect/getprevtraceback
Add supervisor.get_previous_traceback() function.
2021-07-22 17:00:14 -07:00
Scott Shawcroft 779b5c1850
Merge pull request #5040 from lesamouraipourpre/max-size
Remove the max_size parameter from displayio.Group
2021-07-22 16:56:14 -07:00
Scott Shawcroft 2cb25622d0
Comment where -2 value comes from 2021-07-22 16:38:48 -07:00
James Carr 45fd6dd68c Remove the max_size parameter from displayio.Group
max_size has been ignored for a while with the intention of removing it in 7.0
2021-07-22 19:41:45 +01:00
Lucian Copeland ace04ef600 Formatting fixes 2021-07-22 12:57:10 -04:00
Christian Walther cf97793af8 Add supervisor.get_previous_traceback() function.
Useful for #1084.
2021-07-22 12:23:55 -04:00
Scott Shawcroft f84cb94819
Remove OSError(0) and old network modules
The newer modules are `socketpool` and `ssl`.

Fixes #3924, related to #2021, closes #1880, closes #2273, closes #2274
2021-07-21 17:33:40 -07:00
Jeff Epler 7dfb999391 _typing: ulab.ndarray is moving 2021-07-20 19:49:43 -05:00
Dan Halbert d2f2afe57b
Merge pull request #4925 from microDev1/update-run-mode
Add RunMode.UF2 and update esp32s2 run-modes
2021-07-19 16:37:46 -04:00
Jeff Epler 7896bf7fa3 fix stubs 2021-07-19 10:35:17 -05:00
Jeff Epler 1bbe7282e0 OnDiskBitmap: Allow a filename to be passed to the constructor
.. eventually we'll phase out the old way of constructing with an
open file, but this allows for compatibility between 6.x and 7.0.
2021-07-19 10:08:40 -05:00
microDev 40b085746a
Merge pull request #5006 from tannewt/scanentry_match_all
ScanEntry.matches() kwarg all -> match_all
2021-07-18 09:45:58 +05:30
microDev 9ac607dffa
update run-mode
- add microcontroller.RunMode.UF2
- add UF2, NORMAL and BOOTLOADER run-modes to esp32s2
2021-07-18 00:00:58 +05:30
Dan Halbert 1d1b80f4c1
Merge pull request #5011 from dhalbert/keypad-eventqueue-typos
Correct type name for EventQueue; EventQueue.overflowed not accessible
2021-07-16 18:07:19 -04:00
Dan Halbert e785ddfd6f Correct type name for EventQueue; EventQueue.overflowed not accessible 2021-07-16 14:51:58 -04:00
Kattni Rembor c21e16162c Remove _ from common_hal__adafruit_pixelbuf. 2021-07-16 14:08:39 -04:00
Kattni Rembor dc2907ac1b Rename _pixelbuf to adafruit_pixelbuf, alias. 2021-07-16 13:31:40 -04:00
Scott Shawcroft 448597b4a0
ScanEntry.matches() kwarg all -> match_all
Related to #3007
2021-07-15 14:36:57 -07:00
Dan Halbert 698a392cf1
Merge pull request #4762 from Neradoc/small-timestamps-if-epoch-2000
time.localtime: low timestamps when epoch is 2000
2021-07-15 15:08:09 -04:00
Lucian Copeland e3bc800bbc
Merge pull request #4999 from hierophect/esp-timer-leak
ESP32S2: Fix PWM timer leak and variable frequency conflicts
2021-07-14 13:29:56 -04:00
Lucian Copeland c504a85ecc Add shared bindings check for invalid frequency 2021-07-13 18:22:43 -04:00
microDev 916bd92b0c
update native_uart implementation 2021-07-13 08:56:18 +05:30
microDev fc975d6147
Merge branch 'adafruit:main' into add_uart_subclassing 2021-07-13 08:53:37 +05:30
Scott Shawcroft 9fdecacec7
Merge pull request #4903 from jepler/split-type-objects
Split type objects
2021-07-12 16:37:55 -07:00
Kattni Rembor 4579bf9b12 Rename rainbow to rainbowio 2021-07-12 14:40:01 -04:00
Jeff Epler 52540a9830 Rename EXTENDED_FIELDS -> MP_TYPE_EXTENDED_FIELDS 2021-07-12 06:57:59 -05:00
Jeff Epler 1600f11545 Merge remote-tracking branch 'origin/main' into supervisor-ticks 2021-07-11 15:12:55 -05:00
Jeff Epler 7302bc09a7 rename the type flag to EXTENDED for consistency 2021-07-09 14:59:37 -05:00
Kattni Rembor 825a706135 Turn off MIDI on one build, fix name. 2021-07-08 17:31:10 -04:00
Kattni Rembor 289575a811 Adding rainbow module. 2021-07-08 15:55:13 -04:00
James Carr 2e068d0384
Minor docs fix in TileGrid.c 2021-07-07 22:30:30 +01:00
Jeff Epler 317483785f Fix esp32 build errors 2021-07-07 09:07:00 -05:00
Jeff Epler 21e2dfaee2 Fix type checking against struct time 2021-07-07 08:43:18 -05:00
Jeff Epler d37f8a1a5a milestone: a selection of builds succeed 2021-07-06 10:57:44 -05:00
Jeff Epler df56ba207f WIP 2021-07-06 09:25:56 -05:00
Dan Halbert c7ffc2c10b
Merge pull request #4957 from tannewt/ble_serial
Add serial over BLE
2021-07-01 23:05:18 -04:00
Dan Halbert 7f39779f45
Merge pull request #4931 from jepler/struct-time-construct
Allow construction of struct_time from another struct_time
2021-06-30 22:59:46 -04:00
Scott Shawcroft 54cadb96ec
Merge pull request #4952 from jepler/colorconverter-bgr
ColorConverter: Add "BGR" color modes.
2021-06-30 10:19:25 -07:00
Jeff Epler d83a21b984 ColorConverter: Add "BGR" color modes.
The BGR565_SWAPPED mode is needed for OV2640 cameras.
2021-06-30 10:29:31 -05:00
dmcomm ae8ea915d7
Fix pulseio.PulseIn __len__() documentation 2021-06-29 13:38:12 +01:00
microDev fd681ca70a
minor fix for struct_time docs 2021-06-29 08:11:16 +05:30
Jeff Epler 3dcd603e39 time: Fix and better document time.struct_time constructor
INCOMPATIBLE CHANGE: struct_time(1,2,3,4,5,6,7,8,9) is now _rejected_
just as on standad Python.

This incorrect constructor was added by me in #2327; I assumed
without even checking that the `struct_time` constructor was also
compatible with the `namedtuple` constructor, but it is not and has
always been rejected by standard Python (checked 2.7 and 3.9)

This commit restores the specific error message that we used for this
purpose, which was removed in the previous commit either out of laziness
or out of trying to reduce unneeded error strings. In this case, the
alternate string is too misleading (it refers to arguments, not to
sequence elements) so let's put the better message back.
2021-06-28 19:28:00 -05:00
Scott Shawcroft 8a5a7457ab
Merge pull request #4928 from 2bndy5/fix-bus-device-docs
update busio & adafruit_bus_device docs
2021-06-28 15:38:24 -07:00
Dan Halbert ae5080955e
Merge pull request #4938 from dhalbert/displayio.Display-doc-fixes
Fix displayio.Display __init__() signature documentation
2021-06-28 10:35:17 -04:00
Dan Halbert 259d5b9e7d Fix displayio.Display __init__() signature documentation 2021-06-28 09:32:50 -04:00
Jeff Epler 78b20441c1 supervisor: Add a function to get "wrapping" milliseconds
As discussed in #3410, this is a micropython-compatible (though
differently named) function that allows creation of useful time
and deadline functions in pure python.
2021-06-27 20:41:39 -05:00
Jeff Epler cac71a33fc time: Allow constructing a struct_time from another struct_time
Closes: #4917
2021-06-26 20:25:24 -05:00
Brendan 9ff9259d1c fix interlinking in busio docs 2021-06-26 01:50:28 -07:00
Brendan 02c70336ff
fix I2CDevice docs 2021-06-25 23:38:08 -07:00
Brendan dc02f97640
fix SPIDevice docs 2021-06-25 23:35:30 -07:00
Scott Shawcroft 3177973843
Add BLE serial service 2021-06-25 15:00:10 -07:00
Scott Shawcroft d67fb852a1
Merge pull request #3454 from cwalther/setnextcode
Add supervisor.set_next_code_file()
2021-06-25 11:00:53 -07:00
Scott Shawcroft dc76306cfa
Enable a BLE workflow
nRF CircuitPython boards will now provide the file transfer
service defined here: https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer

USB capable boards will only advertise if previously bonded to a
device or if the reset button is pressed during the fast blue
flashes on start up. When pressed, the board will restart again but
the blue period will not flash.

Boards without USB will always advertise.

When previously bonded, the advertisement is private so that no
other peers can connect. If advertising publicly, the tx power is
lowered to reduce the likelihood of bonding from a distance.

This PR also fixes issues with loading identities of bonded peers
so that our address can now be resolved and we can resolve others'
addresses when scanning.
2021-06-24 12:59:14 -07:00
Dan Halbert 36472a0a8b
Correct doc in EventQueue.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2021-06-23 19:23:56 -04:00
Dan Halbert 2e67d6708d check_for_deinit() more places in scanners 2021-06-23 15:42:31 -04:00
Dan Halbert 4f538b6c09 remove pressed() and get_states_into() 2021-06-23 15:10:38 -04:00
Dan Halbert 7774b18895 Add reset() to scanners. Clear .overflow on EventQueue.clear(). 2021-06-23 15:04:09 -04:00
Dan Halbert acf90fbb43 many renamings; add overflowed flag to EventQuque 2021-06-23 09:57:15 -04:00
Dan Halbert f052dc4d8b ShiftRegisterKeys: allow specifying sense of latch 2021-06-21 19:50:05 -04:00
Dan Halbert 8c74b4a5f2 fix some typos 2021-06-21 17:47:12 -04:00
Dan Halbert 51c547a5b9 add generic arg validation routines; add interval args to keypad 2021-06-21 12:13:39 -04:00
Dan Halbert a718d33157 fix doc typos 2021-06-21 09:04:26 -04:00
Dan Halbert ed41acd879 merge from upstream to fix translations 2021-06-21 08:26:44 -04:00
Dan Halbert 154e91ab85 add EventQueue.store_next() to allow reusing event objects 2021-06-21 08:18:06 -04:00
Lucian Copeland cf9741bd3a Merge remote-tracking branch 'upstream/main' into setnextcode 2021-06-20 15:25:37 -04:00
Jeff Epler 198e3aded7 imagecapture: Fix doc markup, update docs for data_pins
Closes: #4896
2021-06-18 12:40:35 -05:00
Dan Halbert 8cd7e774e7 add KeyMatrix columns_to_anodes arg 2021-06-18 12:03:47 -04:00
Dan Halbert af66931f71 Added keypad.ShiftRegisterKeys 2021-06-17 20:51:45 -04:00
Dan Halbert a152bd3b72 add .num_keys and .store_states() to Keys and KeyMatrix 2021-06-17 12:02:54 -04:00
Dan Halbert cd31136c30 factor out keypad.EventQueue 2021-06-16 15:55:54 -04:00
Dan Halbert 1803a6a71d both Keys and KeyMatrix work 2021-06-15 11:15:09 -04:00
Dan Halbert 350652ee21 Keys works; more testing to do 2021-06-14 22:59:17 -04:00
Dan Halbert 32eec85230 compiles 2021-06-14 20:54:43 -04:00
Dan Halbert 627c426259 wip 2021-06-14 16:00:15 -04:00
Jeff Epler 268717e427 ParallelImageCapture: Switch to taking a list of pins
.. adopting validate_pins from RGBMatrix into shared-bindings

.. updating other platforms for API change
2021-06-10 11:15:18 -05:00
Dan Halbert c6e2237ac7 fix non-longint builds 2021-06-10 09:05:19 -04:00
Dan Halbert 01a8a95b2c fix signed/unsigned compilation problem 2021-06-10 01:14:16 -04:00
Dan Halbert d3d9e0a487 add debouncing 2021-06-10 00:07:23 -04:00
Dan Halbert 7d23206018 Inital keypad work: Keys working: one pin per key
keypad.Buttons and keypad.State

Buttons -> Keys; further work

wip

wip

wip: compiles

about to try

keypad.Keys working
2021-06-08 20:27:31 -04:00
EmergReanimator f2e3231c46 resolves #4153: Fixed build issue when CIRCUITPY_USB is off 2021-06-04 10:12:50 +02:00
Jeff Epler d888238dfe
Update __init__.c
some small typos
2021-06-01 19:15:51 -05:00
Scott Shawcroft a94b8cf972
Merge pull request #4823 from jepler/ondiskbitmap-palette
OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
2021-06-01 13:18:51 -07:00
Jeff Epler 193f8b7264 Fixes needed after micropython merges
.. this branch was old and stale, it turns out
2021-05-28 11:13:55 -05:00
Jeff Epler 9df8f235b1 OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
Before, when an OnDiskBitmap was a paletted bitmap type, the palette
was internal to the OnDiskBitmap, and it internally performed the palette
conversion itself.  When using with a tilegrid, a ColorConverter() object
always had to be passed.

Now, an OnDiskBitmap has a "pixel_shader" property.  If the bitmap is
a paletted bitmap type, it is a (modifiable) Palette object.  Otherwise,
it is a ColorConverter() object as before. This allows palette effects
to be applied to paletted OnDiskBitmaps.

Code that used to say:
```python
face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter())
```
must be updated to say:
```python
face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
```

Compatible code for 6.x and 7.x can say
```python
face = displayio.TileGrid(odb, pixel_shader=getattr(odb, 'pixel_shader', ColorConverter())
```
2021-05-28 10:53:21 -05:00
Dan Halbert e7f82f864a fix check of usb_hid.Device out_report_length 2021-05-27 21:29:38 -04:00
Jonny Bergdahl 38177aff33 Removed 'raw' from error message 'raw in' 2021-05-22 12:36:28 +02:00
Scott Shawcroft 20946d97a1
Merge pull request #4743 from tannewt/simplify_status_led
Simplify the status LED to save power
2021-05-21 10:55:11 -07:00
Scott Shawcroft 22e8b20907
Merge pull request #4792 from Neradoc/nera-fix-IPv4Address
Fix ipaddress.IPv4Address from returning invalid values
2021-05-21 10:47:41 -07:00
Neradoc 9fa7fb7092 fix ipaddress.IPv4Address from returning invalid values 2021-05-20 23:17:56 +02:00
Scott Shawcroft 561ffec693
Merge remote-tracking branch 'adafruit/main' into simplify_status_led 2021-05-20 13:46:42 -07:00
Dan Halbert f5aa55c247
Merge pull request #4606 from hierophect/sleep-revamp
Internal API revisions to sleep
2021-05-20 16:00:52 -04:00
Scott Shawcroft 5643355e90
Merge remote-tracking branch 'adafruit/main' into simplify_status_led 2021-05-20 08:35:15 -07:00
Scott Shawcroft ee7a701487
Switch to start_advertising arg 2021-05-19 12:21:48 -07:00
gabewillen 806b39fb22
Update Adapter.c
Added support for setting transmitter power
2021-05-19 11:55:01 -07:00
gabewillen 7dee378ade
Update Adapter.h
Added support for setting transmitter power
2021-05-19 11:55:01 -07:00
Lucian Copeland 633d83cc3e Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-17 18:57:10 -04:00
Limor "Ladyada" Fried 9752162508
Merge pull request #4765 from dhalbert/rotary-trinkey-rev-c-pins
Update various Trinkey pins and add _pixelbuf
2021-05-15 11:52:33 -04:00
Dan Halbert 1e2a945782 Make busio.SPI be NotImplementedError on proxlight to save space 2021-05-14 21:52:54 -04:00
Scott Shawcroft 689ec86225
Merge pull request #4754 from dhalbert/fix-endpoint-checking
Fix endpoint checking; Clean up safe mode printing
2021-05-14 11:25:01 -07:00
Neradoc 3e5ec403fb time.localtime: low timestamps are ok if epoch is 2000 2021-05-14 12:20:49 +02:00
Dan Halbert fa6c06fb38 count in/out endpoints; allow more usb modules on low-endpoint boards 2021-05-13 21:59:02 -04:00
Scott Shawcroft 1a0b4193b7
Simplify the status LED to save power
This also removes the need to pin share because we don't use the
status LED while user code is running.

The status flashes fallback to the HW_STATUS LED if no RGB LED is
present. Each status has a unique blink pattern as well.

One caveat is the REPL state. In order to not pin share, we set the
RGB color once. PWM and single color will be shutoff immediately but
DotStars and NeoPixels will hold the color until the user overrides
it.

Fixes #4133
2021-05-13 14:41:20 -07:00
Lucian Copeland 295103bb31 Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-13 16:22:12 -04:00
Scott Shawcroft 35ee4add63
Merge pull request #4388 from hierophect/stm-alarm
STM32: Alarms and sleep
2021-05-13 10:27:51 -07:00
Lucian Copeland 0d3c5222d8 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-05-10 17:30:33 -04:00
James Carr 106429a5e6
Update __init__.c
Minor typo.
2021-05-10 21:13:05 +01:00
Jeff Epler 5e06c91244
Merge pull request #4716 from tyomitch/main
s/Circuit Python/CircuitPython/g
2021-05-08 08:47:29 -05:00
Jeff Epler 446169e078
Merge pull request #4720 from tannewt/merge_1.13
Merge in MicroPython 1.13
2021-05-08 08:46:03 -05:00
Scott Shawcroft 5c736835de
Fix esp32s2 builds after AP changes 2021-05-07 10:03:02 -07:00
Dan Halbert c6b9885573
Merge pull request #4721 from dhalbert/update-xtensa-cache-id
update github actions xtensa cache id; fix a typo
2021-05-06 16:48:20 -04:00
Dan Halbert 0773e355a7 update github actions xtensa cache id; fix a typo 2021-05-06 15:10:45 -04:00
Scott Shawcroft 42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13 2021-05-06 11:17:53 -07:00
Dan Halbert ebf9dcb47a
Merge pull request #4689 from dhalbert/dynamic-usb-descriptors
Dynamic USB descriptors
2021-05-06 13:51:38 -04:00
Scott Shawcroft 71d2536725
Build fixes thanks to jepler 2021-05-06 09:04:56 -07:00
Artyom Skrobov 908d83d1f2 s/Circuit Python/CircuitPython/g
Some comments and messages used the non-standard spelling
2021-05-06 16:22:35 +03:00
Scott Shawcroft 3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod 2021-05-05 17:51:52 -07:00
Dan Halbert 8f9c9dd45f doc error 2021-05-05 13:41:44 -04:00
Dan Halbert fc8e1c4c2e address review comments 2021-05-05 12:35:12 -04:00
Scott Shawcroft 30c7aa8fc9
Merge pull request #4650 from anecdata/ap
wifi.radio Access Point modes
2021-05-05 08:47:55 -07:00
Scott Shawcroft f0bb26d70f
Merge MicroPython 1.13 into CircuitPython 2021-05-04 18:06:33 -07:00
Dan Halbert adc3d7d55e update Python API according to review comments 2021-05-03 22:29:02 -04:00
Dan Halbert d2b558993e merge from main, including MicroPython 1.12 merge 2021-05-03 20:56:04 -04:00
Dan Halbert 5b5de4b92e fix sHID report doc and API 2021-05-03 20:53:31 -04:00
Dan Halbert cae31d6762 remove PWMOut from pulseio 2021-05-01 09:31:11 -04:00
microDev eebcd2eeaf
remove unsupported authmodes 2021-04-30 22:11:32 +05:30
microDev 6640db9555
make authmode settable 2021-04-30 21:35:02 +05:30
Dan Halbert be7b2b00a8 uncrustify with newer version of uncrustify 2021-04-30 10:40:12 -04:00
Dan Halbert cc95b71d64 fix type annotations 2021-04-30 09:40:40 -04:00
microDev 7c845818b3
Merge branch 'main' into ap 2021-04-30 17:11:22 +05:30
Dan Halbert b8b20faa20 doc fixes 2021-04-29 23:51:39 -04:00
Mark 5ef9b10669
Merge pull request #4685 from microDev1/authmode
Add AuthMode class
2021-04-29 22:12:58 -05:00
Dan Halbert 71a8cadb09 working! 2021-04-29 22:26:38 -04:00
Jeff Epler 52589691b8
Merge pull request #4651 from lesamouraipourpre/minor-docs-fixes
Minor docs fixes in displayio.Bitmap
2021-04-29 08:12:47 -05:00
microDev 1b972c51c3
add authmode class 2021-04-29 18:42:36 +05:30
Dan Halbert f06d54524d merge from adafruit 2021-04-28 23:48:26 -04:00
Lucian Copeland 9feef41c82 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-28 15:10:55 -04:00
Dan Halbert 587aedd14f rework storage allocation 2021-04-28 13:00:44 -04:00
Dan Halbert d4d96bb25f
Merge pull request #4236 from jun2sak/nrf52-sleep
sleep and wakeup for nrf52
2021-04-28 12:11:31 -04:00
Dan Halbert f98a54628b wip: compiles 2021-04-27 14:37:36 -04:00
Scott Shawcroft 17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Dan Halbert 7a40b4daec very much WIP 2021-04-26 23:54:01 -04:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
anecdata a1e2afadce AP ip_info, gateway, & subnet 2021-04-26 00:22:51 -05:00
Dan Halbert c26e49c2e6 wip: starting to try to compile 2021-04-25 23:17:41 -04:00
anecdata f20a53177b add authmode to start_ap() 2021-04-25 18:20:18 -05:00
anecdata 6f6c0cff81 embellish rtd comments. channel _should_ default to 1 behind the scenes since 0 is out of range, but just to be sure, default channel to 1 2021-04-25 14:30:45 -05:00
Dan Halbert 9d1fcc3b14 merge from main 2021-04-25 10:27:52 -04:00
Dan Halbert aea3c4d3ab wip 2021-04-25 10:23:59 -04:00
jun2sak 7accb8b173 modify copyright notice. 2021-04-25 19:57:21 +09:00
anecdata dc3c47d396 ap channel param 2021-04-25 00:22:08 -05:00
anecdata de01814cce call start and stop (oops) 2021-04-24 20:38:04 -05:00
anecdata 354b442867 fixes 2021-04-24 19:36:11 -05:00
anecdata 2e52c0ae62 set all wifi modes; add sta start & sta/ap stop 2021-04-24 16:41:41 -05:00
Dan Halbert 2ba2574ebf
Merge pull request #4619 from tyomitch/microbit
[build] Allow USB to be set to 0
2021-04-24 10:31:29 -04:00
anecdata 4d267ef644 add get_ipv4_address_ap 2021-04-23 21:44:34 -05:00
Dan Halbert 556a126917 wip: getting closer 2021-04-23 21:44:13 -04:00
Scott Shawcroft 80e8b4ac14
Merge pull request #4635 from jepler/pcc
WIP: Implement 'ParallelImageCapture' for samd51
2021-04-23 13:31:53 -07:00
Jeff Epler 8565a9ab90 shared-bindings: Fix type of Colorspace values in docs 2021-04-23 12:39:37 -05:00
Artyom Skrobov 4e3c1d4a4c [build] Allow USB to be set to 0
Unify USB-related makefile var and C def as CIRCUITPY_USB.

Always define it as 0 or 1, same as all other settings.

USB_AVAILABLE was conditionally defined in supervisor.mk,
but never actually used to #ifdef USB-related code.

Loosely related to #4546
2021-04-23 11:13:34 -04:00
Jeff Epler 05a81a066e displayio: Improve docs about Colorspaces 2021-04-23 09:57:24 -05:00
James Carr 0be610fd2b
Changes as requested for Bitmap docs. 2021-04-23 14:41:47 +01:00
James Carr 07059dd373
Minor docs fixes in displayio.Bitmap 2021-04-23 12:56:44 +01:00
anecdata 9da8978d40 more of the same 2021-04-22 23:41:57 -05:00
anecdata 632cebafc6 fix comment (stub fail) 2021-04-22 23:33:33 -05:00
Dan Halbert 2b4c88d633 wip: partial HID, still needs rework 2021-04-23 00:18:05 -04:00
anecdata 3544d4e221 .start_ap() & .mac_address_ap 2021-04-22 22:57:07 -05:00
Dan Halbert 01979acd48
Merge pull request #4604 from tannewt/buffer_size
Assume max characteristic size when the client
2021-04-20 12:02:06 -04:00
Jeff Epler 99799cded6 imagecapture: implement to review suggestions 2021-04-20 10:21:32 -05:00
Jeff Epler 76d68f21ac displayio: Add RGB555/565/_SWAPPED format support
This is helpful when displaying frames from an OV7670 camera, which
uses the RGB565_SWAPPED format internally.
2021-04-19 10:23:47 -05:00
Jeff Epler fc4538f845 WIP: Implement 'ParallelImageCapture' for samd51 2021-04-16 17:18:59 -05:00
Scott Shawcroft 81e11ae063
Fix type 2021-04-16 11:30:10 -07:00
Lucian Copeland e0024c70de Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-15 16:32:30 -04:00
Lucian Copeland 7eeea869ac Fix light sleep global alarms, API revisions 2021-04-15 15:02:42 -04:00
Neradoc 827f67813f add a filter text field to the support matrix 2021-04-15 19:05:50 +02:00
Dan Halbert 6cb751ab06 wip: revamp API names 2021-04-14 22:10:09 -04:00
Scott Shawcroft aa28d4f315
Allow setting max_packet_size for PacketBuffer
This is handy for remote characteristics because it allows for
the PacketBuffer binding code to have the correct max size. This
PR also adds checks so we don't write outside the outgoing buffer.
2021-04-14 17:09:48 -07:00
Dan Halbert 4a7e129287 wip: latent usb device enabling/disabling 2021-04-13 23:33:44 -04:00
Artyom Skrobov c6ee471b52 Merge branch 'main' of https://github.com/adafruit/circuitpython into patch-3 2021-04-13 00:32:19 -04:00
Lucian Copeland 15764b4c24 Merge remote-tracking branch 'upstream/main' into nrf52-sleep 2021-04-09 13:48:45 -04:00
Dan Halbert 72055ff02b
Merge pull request #4578 from tannewt/packetbuffer_lengths
Improve PacketBuffer lengths and remove packet_size
2021-04-08 18:55:24 -04:00
Scott Shawcroft 5ec195b5ef
Remove PacketBuffer.packet_size
Fixes #2853
2021-04-08 13:29:26 -07:00
Dan Halbert 82479b6a2c
Merge pull request #4503 from hierophect/sleep-api-update
Sleep API changes and fix for main.c silent issue
2021-04-06 16:53:25 -04:00
James Carr 8958c1e227 Minor documentation fixes in displayio 2021-04-06 10:47:46 +01:00
Lucian Copeland bf58afdb2a
Merge pull request #4399 from tyomitch/patch-2
[stm] implementation of audiopwmio
2021-04-05 18:35:39 -04:00
Jeff Epler 78089107bc displayio.Bitmap: Allow modification though the buffer protocol
It is required to call .dirty() with appropriate arguments after modifications through the buffer protocol, or the display might not be updated correctly.
2021-04-03 10:41:20 -05:00
Jeff Epler 3f158450f9 can't xref this right now 2021-04-02 13:09:23 -05:00
Jeff Epler 5a56df989f can't xref this right now 2021-04-02 13:09:23 -05:00
Jeff Epler 758dc81fcb displayio: ulab.frombuffer -> ulab.numpy.frombuffer 2021-04-02 13:09:23 -05:00
Jeff Epler b1dfd64fdc stubs: ulab.array -> ulab.ndarray 2021-04-02 13:09:23 -05:00