Commit Graph

27 Commits

Author SHA1 Message Date
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
Jeff Epler
b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
Scott Shawcroft
9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Dan Halbert
a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Jeff Epler
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
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler
b23c5b2d68 nvm: fix doc markup
closes #4336
2021-03-06 07:54:54 -06:00
Taku Fukada
56c898da80 Modify some Python stubs 2020-08-07 01:01:28 +09:00
Taku Fukada
54a342a7f5 Add and correct some type hints 2020-07-24 18:20:03 +09:00
dherrada
d0d949cd24 Made every init return None 2020-07-03 14:23:34 -04:00
dherrada
3df03a5650 Made most of the requested changes 2020-07-03 13:49:00 -04:00
dherrada
0abf45a446 Added type hints to nvm 2020-07-03 10:37:55 -04:00
dherrada
54cb1feea0 Removed all 'self, )' 2020-07-02 13:28:36 -04:00
Jeff Epler
32a29ffdff shared-bindings: Change docstrings with '\x...' chars to raw strings
Closes: #3032
2020-06-14 13:05:08 -05:00
Scott Shawcroft
4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada
d750096bef
Did neopixel, network, nvm 2020-05-07 18:40:46 -04:00
Nick Moore
9c42a72275 Fix up single-byte access to nvm.ByteArray 2019-04-16 14:53:44 +10:00
Scott Shawcroft
933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Scott Shawcroft
5af4e79ed3 Correct example. Thanks @jepler! 2018-04-13 16:43:21 -07:00
Scott Shawcroft
812fe0c93f Turn on nvm in 3.0.
Its 256b on M0 and 8k on M4 to match flash erase sizes.

Fixes #758
2018-04-13 16:22:28 -07:00
Scott Shawcroft
d2ddf36c1d shared-bindings: Use unary_op type. 2017-10-25 10:52:03 -07:00
Dan Halbert
fdb97eda09 Add microcontroller.cpu.temperature, for use as a simple sensor on minimal boards. (#211)
* Add microcontroller.cpu, the sole instance of microcontroller.Processor.
microcontroller.cpu.frequency is the clock frequency, in Hz.
microcontroller.cpu.temperature is the reading from the internal temperature sensor, in Celsius. None if not available.

* Squeeze firmware size by using -finline-limit. Otherwise non-Express builds were slightly too big.

* Update submodules.

* Fix documentation glitches
2017-08-31 13:48:30 -04:00
Scott Shawcroft
266be30777 atmel-samd: Introduce a nvm module for non-volatile byte-level memory access. (#203)
* atmel-samd: Introduce a nvm module for non-volatile byte-level memory access.

This allows for persisting small configuration values even when the file system
is read-only from CircuitPython.

Fixes #160

* Review feedback:
* Add tests.
* Fix non-zero index.
* Fix len()
2017-08-25 16:00:27 -04:00