Commit Graph

1222 Commits

Author SHA1 Message Date
Jeff Epler 1a52cbcf5d Format a straggler file 2021-04-30 16:42:25 -05: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
Lucian Copeland 5c4500dbfa Fix MP type macros 2021-04-28 15:35:15 -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
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
Kattni Rembor 4e1d2fa056 Adding clearer on-board DotStar pin names. 2021-04-27 12:52:24 -04:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Lucian Copeland 43840363c2 Fix submodule 2021-04-26 17:59:21 -04:00
jun2sak 872fff7fbb simplify system_on_idle_until_alarm() 2021-04-25 23:59:21 +09:00
jun2sak 7accb8b173 modify copyright notice. 2021-04-25 19:57:21 +09:00
jun2sak a17fcb6d1a add copyright notice. remove obsolete comments. 2021-04-25 19:19:11 +09: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
Dan Halbert 346740e152
Merge pull request #4609 from Neradoc/add_nrf_countio
NRF: implement countio
2021-04-23 08:37:00 -04: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
Benny Meisels f0b04d403d Add board definition files for ARAMCON2 Badge 2021-04-19 20:41:01 +03:00
Scott Shawcroft 43c16c89c4
Account for max_packet_size in outgoing length 2021-04-15 16:34:06 -07: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
Neradoc 223027fe9e
shrink simmel 2021-04-15 01:43:02 +02:00
Neradoc 0d743224f2 add countio to nrf port 2021-04-14 01:37:19 +02:00
Scott Shawcroft b273f59c4e
Assume max characteristic size when the client 2021-04-13 15:37:47 -07:00
jun2sak 6e9429d779 soft reboot for pretending deep sleep. 2021-04-12 20:53:14 +09:00
Lucian Copeland 15764b4c24 Merge remote-tracking branch 'upstream/main' into nrf52-sleep 2021-04-09 13:48:45 -04:00
Dan Halbert 1b60c9d033
Merge pull request #4580 from jepler/incrementalencoder-refactor
IncrementalEncoder: factor out the quadrature state machine
2021-04-09 13:10:02 -04:00
Dan Halbert 61e33a5619 fix nrf ISR; make direction consistent across ports; save code size 2021-04-09 11:07:47 -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
Jeff Epler d69ca4a8ae nrf: switch to shared softencoder implementation 2021-04-08 16:36:10 -05:00
Scott Shawcroft e3b3f97fa6
Improve PacketBuffer packet lengths for remote service 2021-04-08 13:25:11 -07:00
Jonny Bergdahl 1afd204828 Changed error message to display the generic term 'system firmware' instead of the Nordic specific term 'soft device' 2021-04-02 20:34:37 +02:00
Scott Shawcroft 58835e5a5b
Two small PacketBuffer fixes
1. Allow for ctrl-c during a write.
2. Handle disconnects when acting as a client.
2021-04-01 14:16:35 -07:00
Scott Shawcroft 0752bbd5fd
Fix central pairing and crash on clear
The list_clear would crash if we tried to clear a NULL list. (It
can happen if we haven't tried to discover any services.)
2021-03-31 16:04:04 -07:00
Scott Shawcroft da4dceea15
Fix 16MB Winbond names 2021-03-25 11:37:08 -07:00
Scott Shawcroft aec0ef3cbf
Switch devices.h to nvm.toml data 2021-03-25 09:57:18 -07:00
Jeff Epler 75ba26ee7c
Merge pull request #4421 from kattni/led-pin
Adding LED for D13/L pin name.
2021-03-16 18:58:14 -05:00
Kattni Rembor 2b910b7292 Adding LED for D13/L pin name. 2021-03-16 12:14:40 -04:00
gamblor21 0890b54cd9 More formatting 2021-03-16 08:29:04 -05:00
gamblor21 fb437d8280 Formatting fixes 2021-03-16 08:22:02 -05:00
Mark e326d7ca80
Merge branch 'main' into rp_dp_parallel 2021-03-15 20:00:13 -05:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
gamblor21 56a219911f Add frequency support to parallel bus 2021-03-11 19:32:43 -06:00
Scott Shawcroft f0965b1ef7
Merge pull request #4350 from nitz/board-add-sparkfun-micromod-nrf52840
Add new nRF port for SF MicroMod nRF52840.
2021-03-10 18:13:11 -08:00
nitz d5365cb066
SDIO/QSPI pin names. ¯\_(ツ)_/¯ 2021-03-09 18:36:29 -05:00
nitz 5beb529f61
Update pins, remove unused defs from board config. 2021-03-09 17:43:13 -05:00
nitz fe0655e121
Update pins, remove unused defs from board config. 2021-03-09 17:39:50 -05:00
nitz 1ae858126a
Fix the mpconfigboard.mk that was screwy? 2021-03-09 17:29:10 -05:00
Chris Dailey a61db7f12e
Updated SparkFun MicroMod USB PID
As per the PID provide by TheHoff, [here](https://forum.sparkfun.com/viewtopic.php?p=223812#p223812)
2021-03-09 12:54:52 -05:00
jun2sak c8f36e604c reset myself, not go REPL, after wakeup from deep sleep. 2021-03-09 00:42:22 +09:00
Jeff Epler f1ada8e880 Automatically count EXTERNAL_FLASH_DEVICES 2021-03-07 11:48:39 -06:00
jun2sak 51c7a49853 Merge branch 'main' into nrf52-sleep 2021-03-07 20:50:53 +09:00
jun2sak 5bd1107fec Clean up. 2021-03-07 20:38:04 +09:00