Commit Graph

554 Commits

Author SHA1 Message Date
Dan Halbert d2b558993e merge from main, including MicroPython 1.12 merge 2021-05-03 20:56:04 -04:00
Scott Shawcroft b35fa44c8a
Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
Jeff Epler dfa7c3d32d codeformat: Fix handling of `**`
After discussing with danh, I noticed that `a/**/b` would not match `a/b`.

After correcting this and re-running "pre-commit run --all", additional
files were reindented, including the codeformat script itself.
2021-04-30 15:30:13 -05:00
Jeff Epler e95e921ca1 codeformat: Fix filename matching
In #4683, tannewt noticed that uncrustify was not running on some
file in common-hal.

I investigated and found that it was not being run on a bunch of paths.

Rather than make incremental changes, I rewrote list_files to work
bsaed on regular expressions; these regular expressions are created from
the same git-style glob patterns.

I spot-checked some specific filenames after this change, and all looks good:

```
$ python3 tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py  ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup extmod/virtpin.c ports/raspberrypi/background.h ports/raspberrypi/common-hal/pulseio/PulseIn.c
black --fast --line-length=99 -v tests/thread/thread_exit1.py
```
recursiveloop and int_small are excluded, while PulseIn, virtpin,
and background are included.

Testing running from a subdirectory (not _specifically_ supported though):
```
(cd ports && python3 ../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c)
../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup ../extmod/virtpin.c raspberrypi/common-hal/pulseio/PulseIn.
```

As a side-effect, a bunch more files are re-formatted now. :-P
2021-04-30 10:48:08 -05:00
Dan Halbert b5efce12cd delete hid .py; undo some debugging changes 2021-04-29 23:05:31 -04:00
Dan Halbert f06d54524d merge from adafruit 2021-04-28 23:48:26 -04:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Dan Halbert c26e49c2e6 wip: starting to try to compile 2021-04-25 23:17:41 -04:00
Dan Halbert 9d1fcc3b14 merge from main 2021-04-25 10:27:52 -04:00
Scott Shawcroft 09f7b43c64
Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
Scott Shawcroft b057fb8a4b
codeformat 2021-04-19 22:22:44 -07:00
Dan Halbert 51ccf8dc30 wip: revert usb_descriptor changes; use raw descriptors instead 2021-04-19 23:24:18 -04:00
Dan Halbert 2a58b667aa wip: incorporate new hid descriptor building 2021-04-12 23:42:48 -04:00
Scott Shawcroft 2a78a5154f
Merge pull request #4594 from Neradoc/patch-1
fix removing past releases from circuitpython.org
2021-04-12 15:46:04 -07:00
Neradoc b8d55d6dbf
fix removing past releases from circuitpython.org
When releasing a new stable, unstable releases would be left in because the past stable was removed.
2021-04-12 23:37:41 +02:00
Dan Halbert 3e5bc5a05d wip 2021-04-08 23:19:55 -04:00
Artyom Skrobov c3e40d50ab [qstr] Separate hash and len from string data
This allows the compiler to merge strings: e.g. "update",
"difference_update" and "symmetric_difference_update"
will all point to the same memory.

Shaves ~1KB off the image size, and potentially allows
bigger savings if qstr attrs are initialized in qstr_init(),
and not stored in the image.
2021-04-06 12:58:42 -04:00
Dan Halbert 0357af1726 Put mouse before gamepad due to MacOS being finicky 2021-04-04 21:48:54 -04:00
Neradoc 12b0ee0a3e add alias boards and bus_device to the support matrix
add list with manual brand names for aliases
the new info in the support_matrix is used in build_board_info.py
2021-04-02 13:36:06 +02:00
Dan Halbert c41639f30a add en_GB translation to builds 2021-03-31 15:09:55 -04:00
Dan Halbert c9f2591d7c Turn off remote wakeup in USB configuration descriptor 2021-03-31 10:12:16 -04:00
Neradoc 38072a139e no default value for support_matrix[board_id]
will raise an error during build if things as not as expected
as suggested by @jepler
2021-03-29 19:03:35 +02:00
Neradoc f143e5d049 fix list of modules for alias boards 2021-03-29 12:25:25 +02:00
Scott Shawcroft aec0ef3cbf
Switch devices.h to nvm.toml data 2021-03-25 09:57:18 -07:00
Neradoc 6b89883797 sort languages in a way that is not case sensitive 2021-03-25 02:57:04 +01:00
Neradoc 36f91fe022 implement issue #4470
move the language allow list to generate_download_info() and use it there too
2021-03-24 23:39:47 +01:00
Jeff Epler b9a973c8e0 codeformat: Do search&replace without sed 2021-03-15 19:23:16 -05:00
Jeff Epler 253385d9b7 codeformat: use pathlib for correct(-er) processing of * vs ** in globs 2021-03-15 18:10:43 -05:00
Jeff Epler 0403a2cca5 codeformat: Run sed only on requested files
When running from pre-commit, we believe the different invocations of
sed were racing with each other, sometimes leaving zero-byte files in
the filesystem (ow)
2021-03-15 18:10:43 -05:00
Jeff Epler ed61e8955d codeformat: require filenames, filter them by include/exclude lists 2021-03-15 18:10:43 -05:00
Jeff Epler d0e3848b24 codeformat: Exclude specified files even from commandline, for pre-commit 2021-03-15 18:10:43 -05:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
microDev 090b6ba42f
update pre-commit
- add formatting check
- add translations check
2021-03-15 19:26:29 +05:30
Jeff Epler bddd6b013d build_release_files: Only build languages in an allow-list 2021-03-01 15:28:58 -06:00
Jeff Epler 144acfcb98 USB descriptors: Save flash storage for serial number
This saves about 60 bytes (Feather M4 went from 45040 -> 45100 bytes free)
66 bytes of data eliminated, but 6 bytes paid back to initialize the length
field.
2021-02-21 21:24:49 -06:00
Dan Halbert c26de0136a works! no timeouts 2021-02-16 17:39:36 -05:00
Dan Halbert d54b5861a3 wip 2021-02-12 19:01:14 -05:00
Dan Halbert f0564b4986 merge from upstream; complicated webusb merge 2021-02-11 18:50:02 -05:00
foamyguy 5c3371bd1a fix bitmap_font path in display resource gen 2021-02-05 18:05:37 -06:00
Dan Halbert 0802b22ed6 usb descriptors all set; rework of enabling for USB devices 2021-02-04 19:23:40 -05:00
Kevin Banks 1352938504 Changed URL 2021-02-04 16:35:42 -06:00
FiriaCTO e72069e241
Fix typo in comment
descriptors should be plural

Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-02-04 16:18:36 -06:00
Kevin Banks 4d90f198ec (I could have sworn I deleted that line...) 2021-02-03 18:54:03 -06:00
Kevin Banks f2067730cb Code cleanup and added a WEBUSB_README file 2021-02-03 18:51:48 -06:00
Kevin Banks 215a56c920 Merge branch 'main' into webusb (trying to get CI back online) 2021-02-03 16:48:28 -06:00
Kevin Banks 00926b687a Trying to keep two ARM builds from overflowing their FLASH 2021-02-03 11:16:19 -06:00
Kevin Banks 1a9e4f5613 Restored accidentally deleted character 2021-02-01 18:51:11 -06:00
Kevin Banks 817ca39f59 ITF_NUM_VENDOR is now automatically computed at run-time 2021-02-01 18:35:58 -06:00
Kevin Banks 63f9b12fe6 Partially hard-coded VENDOR descriptor has been added. First build to be accessed via WebUSB. NOTE - had to disable HID (EndPoint shortage?) 2021-01-28 20:22:31 -06:00
Scott Shawcroft 9325509b54
Fix blinka release PR language list 2021-01-27 14:08:52 -08:00