095fa4c284
Change MP_OBJ_NEW_QSTR to MP_ROM_QSTR in mp_rom_map_elem_t
...
.. across bindings & shared-bindings. This is more modern usage preferred
in micropython.
2025-02-13 11:11:18 -06:00
Scott Shawcroft
e277540f7a
Switch to ruff like MicroPython
2025-02-05 11:09:15 -08:00
Dan Halbert
6d8cca41f2
Fix usb_cdc.Serial.read() documentation
2025-01-30 16:53:56 -05:00
Dan Halbert
3f4d9310ff
CircuitPython files: replace STATIC with static
2024-05-20 11:02:17 -04:00
Dan Halbert
950b5d09d2
guard2once -s ...
2024-05-19 20:40:44 -04:00
Dan Halbert
747b7619ea
update headers of most CircuitPython-only files
2024-05-17 14:56:28 -04:00
Scott Shawcroft
d1e710fb4b
Merge remote-tracking branch 'adafruit/8.2.x' into merge_in_8.2.x
2024-02-13 11:18:56 -08:00
RetiredWizard
2490303a23
Add pre-commit changes (black 24.11) formattings changes
2024-02-12 16:56:21 -05:00
3615745956
typo
2024-01-22 10:44:36 -06:00
5aa203f13e
Restore CIRCUITPY-CHANGEs for stream protocols
...
We mark all protocols with their type using MP_PROTO_IMPLEMENT,
and checking in mp_get_stream{,_raise}.
This was not turning up as a problem in tests until a (new, not yet
commited) change to jpegio caused a segfault because a type implementing
a different protocol was passed in to mp_get_stream.
By using 0 (instead of MP_QSTR_protocol_stream) as the marker for
objects implementing the standard micropython stream protocol, the
number of CIRCUITPY-CHANGEs is minimized.
2023-12-24 10:41:54 -06:00
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally
2023-10-30 09:49:06 +01:00
Scott Shawcroft
e62db5adcd
Fix native property setting from subclass
2023-10-24 16:20:51 -07:00
Dan Halbert
76ff01452b
Trinket M0 comes up; still very much wip
2023-09-28 16:22:10 -04:00
Dan Halbert
4d175ab41a
convert to MP_DEFINED_CONST_OBJ_TYPE()
2023-09-19 21:09:29 -04:00
Dan Halbert
2c0fa0f7dc
initial merge from v1.20.0; just satisifying conflicts
2023-09-19 11:10:12 -04:00
Dan Halbert
0d2c3c3f08
wip: continuing compilation fixes; mp_obj_alloc everywhere
2023-08-07 20:45:57 -04:00
MicroDev
d9d94eacca
run updated pre-commit
2023-02-01 13:38:41 +05:30
068b7c4af8
Use micropython #defines for stream polling operations
...
We adopted the file "py/ioctl.h" and the ioctl names beginning
with MP_IOCTL_POLL while micropython went with "py/stream.h" and
MP_STREAM_POLL.
Align with upstream.
Closes #6711
2022-10-14 12:15:30 -05:00
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
b2cc8d2aad
run black_bindings across all bindings
2022-09-27 15:21:42 -05:00
Neradoc
2dbcd760fc
usb_cdc.Serial.readinto has no nbytes parameter
2022-09-25 05:06:45 +02:00
Scott Shawcroft
9d10a3da66
Conditionalize LTO
2022-05-27 12:59:54 -07:00
78cf0a90af
Make MP_PROPERTY_GETTER / _GETSET fully declare the property
...
This will enable setting data attributes, namely, the section of the
symbol.
2022-05-03 08:48:53 -05:00
31da335cac
Introduce, use MP_PROPERTY_GETTER, _GETSET
...
Later, these can be changed in cunning ways to save flash storage.
2022-05-03 08:48:52 -05:00
Rob Capellini
1c8828223f
Convert more modules to use MP_REGISTER_MODULE
...
Convert neopixel_write, onewireio, ps2io, pulseio, pwmio, rainbowio, random, rgbmatrix, rotaryio, rtc, sdcardio, sharpdisplay, _stage, storage, struct, supervisor, synthio, touchio, traceback, usb_cdc, usb_hid, usb_midi, and vectorio modules to use MP_REGISTER_MODULE.
Related to #5183 .
2021-08-30 22:29:51 -04:00
52540a9830
Rename EXTENDED_FIELDS -> MP_TYPE_EXTENDED_FIELDS
2021-07-12 06:57:59 -05:00
Jeff Epler
7302bc09a7
rename the type flag to EXTENDED for consistency
2021-07-09 14:59:37 -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
Jeff Epler
d888238dfe
Update __init__.c
...
some small typos
2021-06-01 19:15:51 -05: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
42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13
2021-05-06 11:17:53 -07: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
adc3d7d55e
update Python API according to review comments
2021-05-03 22:29:02 -04:00
Dan Halbert
71a8cadb09
working!
2021-04-29 22:26:38 -04:00
Dan Halbert
6cb751ab06
wip: revamp API names
2021-04-14 22:10:09 -04:00
Dan Halbert
4a7e129287
wip: latent usb device enabling/disabling
2021-04-13 23:33:44 -04:00
microDev
a52eb88031
run code formatting script
2021-03-15 19:27:36 +05:30
Dan Halbert
24ac8152dd
Clarify further; fix type error
2021-03-07 20:32:59 -05:00
Dan Halbert
1a6c021239
Add clarifying comment re carriage-return char.
2021-03-07 17:04:27 -05:00
Dan Halbert
a6cb7d7069
Document readline() and readlines()
2021-03-07 15:34:07 -05:00
Dan Halbert
8594396a07
Add caveat for usb_cdc.Serial.connected
2021-03-07 14:07:07 -05:00
Dan Halbert
9d4442e298
handle reads/writes larger than buffers; add .write_timeout
2021-02-19 14:15:31 -05:00
Dan Halbert
ed49c02feb
add timeout; finish up for PR
2021-02-17 23:24:11 -05:00
Dan Halbert
c26de0136a
works! no timeouts
2021-02-16 17:39:36 -05:00
Dan Halbert
0b8f1b9a90
wip: usb_cdc.serials
2021-02-15 20:06:18 -05:00
Dan Halbert
d54b5861a3
wip
2021-02-12 19:01:14 -05:00