Commit Graph

15304 Commits

Author SHA1 Message Date
Scott Shawcroft
6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Scott Shawcroft
3a5f79acef
Merge pull request #2701 from hierophect/stm32-submodule-swap
STM32: Change ST drivers submodule to match TinyUSB
2020-03-13 10:47:54 -07:00
Scott Shawcroft
85f44e20cb
Merge pull request #2695 from TG-Techie/master
Add new TG-Watch02A to the nrf boards directory
2020-03-13 10:46:48 -07:00
TG-Techie
137d5c34fa fix board sorting (due to T being before a anf t) 2020-03-12 20:39:42 -04:00
TG-Techie
7907ef5979 add TG-Watch02A to build workflow 2020-03-12 20:30:45 -04:00
Lucian Copeland
ef7370d023 Change ST drivers submodule to match TinyUSB 2020-03-12 17:14:09 -04:00
hierophect
0f64663c40
Merge pull request #2699 from hierophect/stm32-port-namechange
STM32: port directory name change
2020-03-12 15:45:22 -04:00
Lucian Copeland
18442c5b00 Merge remote-tracking branch 'upstream/master' into stm32-port-namechange 2020-03-12 15:40:44 -04:00
hierophect
dd21ec048a
Merge pull request #2697 from hierophect/stm32-pulsein
STM32: add PulseIn module
2020-03-12 15:39:54 -04:00
Lucian Copeland
0155fab356 Revise style on interrupt handler functions 2020-03-12 15:03:47 -04:00
Lucian Copeland
ead32ea6e6 Comment change for CI 2020-03-12 11:21:32 -04:00
TG-Techie
197dc344af fix requested changes 2020-03-12 02:31:13 -04:00
Lucian Copeland
f81e2c0487 change CI target 2020-03-11 19:00:49 -04:00
Lucian Copeland
7ff336fbc5 Change docs target 2020-03-11 18:50:56 -04:00
Lucian Copeland
127e531271 remove old directory 2020-03-11 18:16:52 -04:00
Lucian Copeland
be7def128a submodule move and sync 2020-03-11 18:16:16 -04:00
Lucian Copeland
53b1544f41 create copy 2020-03-11 18:13:06 -04:00
Lucian Copeland
2a082baa63 Add up to date translations 2020-03-11 17:53:22 -04:00
Lucian Copeland
38064750f9 Merge remote-tracking branch 'upstream/master' into stm32-pulsein 2020-03-11 16:39:11 -04:00
Lucian Copeland
2b161d37df stm32: add PulseIn module 2020-03-11 16:37:40 -04:00
TG-Techie
b967a2071f changed TG-Watch02A HW_BOARD_NAME 2020-03-10 23:07:25 -04:00
TG-Techie
50b451ae0c add TG-Watch02A board def 2020-03-10 22:40:55 -04:00
Scott Shawcroft
d988af02d1
Merge pull request #2690 from jepler/topic-pep-498-fstrings
Implement partial PEP-498 (f-string) support
2020-03-10 10:53:04 -07:00
Dan Halbert
6363b5ad06
Merge pull request #2693 from jepler/ulab-enable
ulab: enable on most builds
2020-03-10 09:48:46 -04:00
Jeff Epler
03a2b2faf1 ulab: don't enable on m0 boards 2020-03-09 23:00:21 -05:00
Jeff Epler
ef195d6e1b Update tests
* string_pep498_fstring.py: Not compatible with python3.5
 * cmd_parsetree.py: enumerated constants changed
2020-03-09 21:13:33 -05:00
Scott Shawcroft
df88939128
Merge pull request #2666 from dhalbert/assert_pin-and-mp_const_none-cleanup
validate various displayio args; new pin validation routines; don't use mp_const_none if NULL will do
2020-03-09 16:35:57 -07:00
Scott Shawcroft
eebe769973
Merge pull request #2692 from jepler/ulab-upstream
ulab: Use https://github.com/v923z/micropython-ulab/
2020-03-09 16:28:56 -07:00
Jeff Epler
491a31a731 circuitpy_mpconfig.mk: Enable ULAB for "full builds"
This enables it on the imxrt and cds56 ports where it was disabled before
2020-03-09 15:54:40 -05:00
Jeff Epler
66aa0dec60 stm32: enable ulab
This is needed because stm32 defines CIRCUITPY_MINIMAL_BUILD "for early
port".
2020-03-09 15:54:40 -05:00
Jeff Epler
e128d770f1 cdx56: prepare to enable ulab
This involves fixing support for SRC_MOD and enabling INTERNAL_LIBM
including adding support for SRC_LIBM.
2020-03-09 15:54:40 -05:00
Jeff Epler
eab9b670d8 ulab: Use https://github.com/v923z/micropython-ulab/
The only delta we were carrying was in the README.
2020-03-09 14:48:52 -05:00
Jeff Epler
473e9c5ffb f-strings: Make optional, defaulting to !CIRCUITPY_MINIMAL_BUILD
This should reclaim *most* code space added to handle f-strings.
However, there may be some small code growth as parse_string_literal
takes a new parameter (which will always be 0, so hopefully the optimizer
eliminates it)
2020-03-09 09:03:25 -05:00
Jeff Epler
32647cd9b4 lexer: catch concatenation of f'' and '' strings
This turns the "edge case" into a parse-time error.
2020-03-09 09:03:25 -05:00
Jeff Epler
acd7b8932f locale: run 'make translate' 2020-03-09 08:19:46 -05:00
Josh Klar
40bc05ee1e Address dpgeorge feedback - largely simplifications 2020-03-09 08:16:07 -05:00
Josh Klar
3a7a5ba686 py: Implement partial PEP-498 (f-string) support
This implements (most of) the PEP-498 spec for f-strings, with two
exceptions:

- raw f-strings (`fr` or `rf` prefixes) raise `NotImplementedError`
- one special corner case does not function as specified in the PEP
(more on that in a moment)

This is implemented in the core as a syntax translation, brute-forcing
all f-strings to run through `String.format`. For example, the statement
`x='world'; print(f'hello {x}')` gets translated *at a syntax level*
(injected into the lexer) to `x='world'; print('hello {}'.format(x))`.
While this may lead to weird column results in tracebacks, it seemed
like the fastest, most efficient, and *likely* most RAM-friendly option,
despite being implemented under the hood with a completely separate
`vstr_t`.

Since [string concatenation of adjacent literals is implemented in the
lexer](534b7c368d),
two side effects emerge:

- All strings with at least one f-string portion are concatenated into a
single literal which *must* be run through `String.format()` wholesale,
and:
- Concatenation of a raw string with interpolation characters with an
f-string will cause `IndexError`/`KeyError`, which is both different
from CPython *and* different from the corner case mentioned in the PEP
(which gave an example of the following:)

```python
x = 10
y = 'hi'
assert ('a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e') == 'ab10{c}str< hi >de'
```

The above-linked commit detailed a pretty solid case for leaving string
concatenation in the lexer rather than putting it in the parser, and
undoing that decision would likely be disproportionately costly on
resources for the sake of a probably-low-impact corner case. An
alternative to become complaint with this corner case of the PEP would
be to revert to string concatenation in the parser *only when an
f-string is part of concatenation*, though I've done no investigation on
the difficulty or costs of doing this.

A decent set of tests is included. I've manually tested this on the
`unix` port on Linux and on a Feather M4 Express (`atmel-samd`) and
things seem sane.
2020-03-09 08:16:07 -05:00
Limor "Ladyada" Fried
83d5da95b7
Merge pull request #2684 from caternuson/doc_add_sensors
Add proximity and sound_level to Design Guide
2020-03-06 18:10:47 -05:00
caternuson
125409fe95 add proximity and sound_level 2020-03-06 13:31:08 -08:00
TG-Techie
fec84054d9 ah 2020-03-06 15:03:37 -05:00
Dan Halbert
fdcdc1320b Make ParallelBus reset ping arg required 2020-03-06 14:30:30 -05:00
TG-Techie
7198056bc3
Merge pull request #2 from adafruit/5.0.x
5.0.x
2020-03-06 13:57:31 -05:00
TG-Techie
03dfd28121 trying to pull 5.0.x 2020-03-06 13:52:47 -05:00
Dan Halbert
127e6fa27e Revert "try actions/checkout@v2"
This reverts commit b492ea69cb.
2020-03-05 23:13:14 -05:00
Dan Halbert
b492ea69cb try actions/checkout@v2 2020-03-05 23:06:30 -05:00
Dan Halbert
210c3274e5 Merge remote-tracking branch 'adafruit/master' into assert_pin-and-mp_const_none-cleanup 2020-03-05 17:47:01 -05:00
Dan Halbert
817b5be320 rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
Jeff Epler
4fa90261a3
Merge pull request #2657 from tannewt/builtin_package
Support importing native modules in native packages.
2020-03-05 14:28:46 -06:00
Dan Halbert
e81930fb9e
Merge pull request #2681 from theacodes/disable-hid-on-sol
Disable the HID USB descriptor for Sol
2020-03-05 09:31:16 -05:00
Thea Flowers
409a4a9490 Disable the HID USB descriptor for Sol
It's not used and ends up being confusing for folks.
2020-03-04 23:22:46 -08:00