Skip to content

Commit 1f3a3fe

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 862d5a0 + fb5ca35 commit 1f3a3fe

File tree

79 files changed

+1926
-579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1926
-579
lines changed

.travis.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,40 @@ compiler:
55
- gcc
66
git:
77
depth: 1
8+
9+
# Put a representative board from each port or sub-port near the top
10+
# to determine more quickly whether that port is going to build or not.
811
env:
912
- TRAVIS_TEST=unix
1013
- TRAVIS_TEST=docs
1114
- TRAVIS_TEST=translations
1215
- TRAVIS_BOARD=feather_huzzah
1316
- TRAVIS_BOARD=circuitplayground_express
1417
- TRAVIS_BOARD=pca10056
18+
# The rest of the boards, in alphabetical order.
1519
- TRAVIS_BOARD=trinket_m0
1620
- TRAVIS_BOARD=feather_m4_express
1721
- TRAVIS_BOARD=grandcentral_m4_express
18-
- TRAVIS_BOARD=feather_radiofruit_zigbee
1922
- TRAVIS_BOARD=arduino_zero
2023
- TRAVIS_BOARD=circuitplayground_express_crickit
21-
- TRAVIS_BOARD=feather_m0_basic
2224
- TRAVIS_BOARD=feather_m0_adalogger
23-
- TRAVIS_BOARD=feather_m0_rfm69
24-
- TRAVIS_BOARD=feather_m0_rfm9x
25+
- TRAVIS_BOARD=feather_m0_basic
2526
- TRAVIS_BOARD=feather_m0_express
2627
- TRAVIS_BOARD=feather_m0_express_crickit
28+
- TRAVIS_BOARD=feather_m0_rfm69
29+
- TRAVIS_BOARD=feather_m0_rfm9x
30+
- TRAVIS_BOARD=feather_nrf52832
31+
- TRAVIS_BOARD=feather_nrf52840_express
32+
- TRAVIS_BOARD=feather_radiofruit_zigbee
33+
- TRAVIS_BOARD=gemma_m0
34+
- TRAVIS_BOARD=hallowing_m0_express
2735
- TRAVIS_BOARD=itsybitsy_m0_express
2836
- TRAVIS_BOARD=itsybitsy_m4_express
2937
- TRAVIS_BOARD=metro_m0_express
3038
- TRAVIS_BOARD=metro_m4_express
39+
- TRAVIS_BOARD=pca10059
3140
- TRAVIS_BOARD=pirkey_m0
32-
- TRAVIS_BOARD=gemma_m0
33-
- TRAVIS_BOARD=hallowing_m0_express
34-
- TRAVIS_BOARD=feather_nrf52832
35-
- TRAVIS_BOARD=feather_nrf52840_express
41+
- TRAVIS_BOARD=trellis_m4_express
3642

3743
addons:
3844
artifacts:
@@ -56,13 +62,13 @@ before_script:
5662
- ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
5763

5864
# For nrf builds
59-
- ([[ $TRAVIS_BOARD != "feather_nrf52832" && $TRAVIS_BOARD != "feather_nrf52840_express" && $TRAVIS_BOARD != "pca10056" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
65+
- ([[ $TRAVIS_BOARD != "feather_nrf52832" && $TRAVIS_BOARD != "feather_nrf52840_express" && $TRAVIS_BOARD != "pca10056" && $TRAVIS_BOARD != "pca10059" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
6066
# For huzzah builds
6167
- if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
6268
# For coverage testing (upgrade is used to get latest urllib3 version)
6369
- ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y python3-pip)
6470
- ([[ -z "$TRAVIS_TEST" ]] || sudo pip install --upgrade cpp-coveralls)
65-
- ([[ $TRAVIS_TEST != "docs" ]] || sudo pip install Sphinx sphinx-rtd-theme recommonmark)
71+
- ([[ $TRAVIS_TEST != "docs" ]] || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
6672
- ([[ $TRAVIS_TEST != "translations" ]] || sudo pip3 install polib)
6773
- gcc --version
6874
- ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || arm-none-eabi-gcc --version)

extmod/moduzlib.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
#if MICROPY_PY_UZLIB
3737

38+
#define UZLIB_CONF_PARANOID_CHECKS (1)
3839
#include "../../lib/uzlib/src/tinf.h"
3940

4041
#if 0 // print debugging info
@@ -50,7 +51,7 @@ typedef struct _mp_obj_decompio_t {
5051
bool eof;
5152
} mp_obj_decompio_t;
5253

53-
STATIC unsigned char read_src_stream(TINF_DATA *data) {
54+
STATIC int read_src_stream(TINF_DATA *data) {
5455
byte *p = (void*)data;
5556
p -= offsetof(mp_obj_decompio_t, decomp);
5657
mp_obj_decompio_t *self = (mp_obj_decompio_t*)p;
@@ -112,7 +113,7 @@ STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *er
112113
}
113114

114115
o->decomp.dest = buf;
115-
o->decomp.destSize = size;
116+
o->decomp.dest_limit = (unsigned char*)buf+size;
116117
int st = uzlib_uncompress_chksum(&o->decomp);
117118
if (st == TINF_DONE) {
118119
o->eof = true;
@@ -157,10 +158,10 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
157158
byte *dest_buf = m_new(byte, dest_buf_size);
158159

159160
decomp->dest = dest_buf;
160-
decomp->destSize = dest_buf_size;
161+
decomp->dest_limit = dest_buf+dest_buf_size;
161162
DEBUG_printf("uzlib: Initial out buffer: " UINT_FMT " bytes\n", decomp->destSize);
162163
decomp->source = bufinfo.buf;
163-
164+
decomp->source_limit = (unsigned char *)bufinfo.buf + bufinfo.len;
164165
int st;
165166
bool is_zlib = true;
166167

@@ -187,7 +188,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
187188
dest_buf = m_renew(byte, dest_buf, dest_buf_size, dest_buf_size + 256);
188189
dest_buf_size += 256;
189190
decomp->dest = dest_buf + offset;
190-
decomp->destSize = 256;
191+
decomp->dest_limit = dest_buf + offset + 256;
191192
}
192193

193194
mp_uint_t final_sz = decomp->dest - dest_buf;
@@ -218,6 +219,7 @@ const mp_obj_module_t mp_module_uzlib = {
218219
// Source files #include'd here to make sure they're compiled in
219220
// only if module is enabled by config setting.
220221

222+
#pragma GCC diagnostic ignored "-Wsign-compare"
221223
#include "../../lib/uzlib/src/tinflate.c"
222224
#include "../../lib/uzlib/src/tinfzlib.c"
223225
#include "../../lib/uzlib/src/tinfgzip.c"

lib/uzlib

Submodule uzlib updated 251 files

locale/circuitpython.pot

Lines changed: 66 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-09-06 14:55-0700\n"
11+
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -123,7 +123,7 @@ msgstr ""
123123
msgid "queue overflow"
124124
msgstr ""
125125

126-
#: extmod/moduzlib.c:97
126+
#: extmod/moduzlib.c:98
127127
msgid "compression header"
128128
msgstr ""
129129

@@ -214,7 +214,7 @@ msgstr ""
214214
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
215215
msgstr ""
216216

217-
#: main.c:415
217+
#: main.c:416
218218
msgid "soft reboot\n"
219219
msgstr ""
220220

@@ -231,15 +231,15 @@ msgstr ""
231231
msgid "calibration is out of range"
232232
msgstr ""
233233

234-
#: ports/atmel-samd/board_busses.c:39 ports/nrf/board_busses.c:39
234+
#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39
235235
msgid "No default I2C bus"
236236
msgstr ""
237237

238-
#: ports/atmel-samd/board_busses.c:64 ports/nrf/board_busses.c:64
238+
#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64
239239
msgid "No default SPI bus"
240240
msgstr ""
241241

242-
#: ports/atmel-samd/board_busses.c:91 ports/nrf/board_busses.c:91
242+
#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91
243243
msgid "No default UART bus"
244244
msgstr ""
245245

@@ -291,12 +291,12 @@ msgid "Too many channels in sample."
291291
msgstr ""
292292

293293
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:305
294-
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:326
294+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:339
295295
msgid "No DMA channel found"
296296
msgstr ""
297297

298298
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:308
299-
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:328
299+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:341
300300
msgid "Unable to allocate buffers for signed conversion"
301301
msgstr ""
302302

@@ -338,16 +338,21 @@ msgstr ""
338338
msgid "Cannot output both channels on the same pin"
339339
msgstr ""
340340

341-
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:173
342-
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:186
341+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:176
342+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:189
343343
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c:110
344344
msgid "All timers in use"
345345
msgstr ""
346346

347-
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:215
347+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:218
348348
msgid "All event channels in use"
349349
msgstr ""
350350

351+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:297
352+
#, c-format
353+
msgid "Sample rate too high. It must be less than %d"
354+
msgstr ""
355+
351356
#: ports/atmel-samd/common-hal/busio/I2C.c:71
352357
msgid "Not enough pins available"
353358
msgstr ""
@@ -356,7 +361,7 @@ msgstr ""
356361
#: ports/atmel-samd/common-hal/busio/SPI.c:132
357362
#: ports/atmel-samd/common-hal/busio/UART.c:119
358363
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
359-
#: ports/nrf/common-hal/busio/I2C.c:58
364+
#: ports/nrf/common-hal/busio/I2C.c:77
360365
msgid "Invalid pins"
361366
msgstr ""
362367

@@ -376,24 +381,24 @@ msgstr ""
376381
msgid "tx and rx cannot both be None"
377382
msgstr ""
378383

379-
#: ports/atmel-samd/common-hal/busio/UART.c:139
384+
#: ports/atmel-samd/common-hal/busio/UART.c:145
380385
msgid "Failed to allocate RX buffer"
381386
msgstr ""
382387

383-
#: ports/atmel-samd/common-hal/busio/UART.c:147
388+
#: ports/atmel-samd/common-hal/busio/UART.c:153
384389
msgid "Could not initialize UART"
385390
msgstr ""
386391

387-
#: ports/atmel-samd/common-hal/busio/UART.c:234
392+
#: ports/atmel-samd/common-hal/busio/UART.c:240
388393
msgid "No RX pin"
389394
msgstr ""
390395

391-
#: ports/atmel-samd/common-hal/busio/UART.c:288
396+
#: ports/atmel-samd/common-hal/busio/UART.c:294
392397
msgid "No TX pin"
393398
msgstr ""
394399

395400
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:170
396-
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:153
401+
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:142
397402
msgid "Cannot get pull while in output mode"
398403
msgstr ""
399404

@@ -403,12 +408,12 @@ msgid "Cannot reset into bootloader because no bootloader is present."
403408
msgstr ""
404409

405410
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
406-
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:366
411+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
407412
#: ports/nrf/common-hal/pulseio/PWMOut.c:227
408413
msgid "Invalid PWM frequency"
409414
msgstr ""
410415

411-
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:184
416+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:187
412417
msgid "All timers for this pin are in use"
413418
msgstr ""
414419

@@ -685,11 +690,23 @@ msgstr ""
685690
msgid "AnalogOut functionality not supported"
686691
msgstr ""
687692

693+
#: ports/nrf/common-hal/busio/I2C.c:91
694+
msgid "All I2C peripherals are in use"
695+
msgstr ""
696+
697+
#: ports/nrf/common-hal/busio/SPI.c:109
698+
msgid "All SPI peripherals are in use"
699+
msgstr ""
700+
701+
#: ports/nrf/common-hal/busio/SPI.c:170
702+
msgid "Baud rate too high for this SPI peripheral"
703+
msgstr ""
704+
688705
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
689706
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
690707
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
691708
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
692-
#: ports/nrf/common-hal/busio/UART.c:86
709+
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
693710
msgid "busio.UART not yet implemented"
694711
msgstr ""
695712

@@ -1960,6 +1977,7 @@ msgid "buffer must be a bytes-like object"
19601977
msgstr ""
19611978

19621979
#: shared-bindings/audioio/WaveFile.c:78
1980+
#: shared-bindings/displayio/OnDiskBitmap.c:85
19631981
msgid "file must be a file opened in byte mode"
19641982
msgstr ""
19651983

@@ -1992,11 +2010,11 @@ msgstr ""
19922010
msgid "Function requires lock."
19932011
msgstr ""
19942012

1995-
#: shared-bindings/busio/UART.c:98
2013+
#: shared-bindings/busio/UART.c:102
19962014
msgid "bits must be 7, 8 or 9"
19972015
msgstr ""
19982016

1999-
#: shared-bindings/busio/UART.c:110
2017+
#: shared-bindings/busio/UART.c:114
20002018
msgid "stop must be 1 or 2"
20012019
msgstr ""
20022020

@@ -2034,6 +2052,10 @@ msgstr ""
20342052
msgid "row data must be a buffer"
20352053
msgstr ""
20362054

2055+
#: shared-bindings/displayio/ColorConverter.c:72
2056+
msgid "color should be an int"
2057+
msgstr ""
2058+
20372059
#: shared-bindings/displayio/FourWire.c:55
20382060
#: shared-bindings/displayio/FourWire.c:64
20392061
msgid "displayio is a work in progress"
@@ -2064,16 +2086,16 @@ msgstr ""
20642086
msgid "palette_index should be an int"
20652087
msgstr ""
20662088

2067-
#: shared-bindings/displayio/Sprite.c:45
2089+
#: shared-bindings/displayio/Sprite.c:48
20682090
msgid "position must be 2-tuple"
20692091
msgstr ""
20702092

2071-
#: shared-bindings/displayio/Sprite.c:87
2093+
#: shared-bindings/displayio/Sprite.c:97
20722094
msgid "unsupported bitmap type"
20732095
msgstr ""
20742096

2075-
#: shared-bindings/displayio/Sprite.c:152
2076-
msgid "palette must be displayio.Palette"
2097+
#: shared-bindings/displayio/Sprite.c:162
2098+
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
20772099
msgstr ""
20782100

20792101
#: shared-bindings/gamepad/GamePad.c:100
@@ -2302,6 +2324,24 @@ msgstr ""
23022324
msgid "Group full"
23032325
msgstr ""
23042326

2327+
#: shared-module/displayio/Group.c:48
2328+
msgid "Group empty"
2329+
msgstr ""
2330+
2331+
#: shared-module/displayio/OnDiskBitmap.c:49
2332+
msgid "Invalid BMP file"
2333+
msgstr ""
2334+
2335+
#: shared-module/displayio/OnDiskBitmap.c:59
2336+
#, c-format
2337+
msgid "Only Windows format, uncompressed BMP supported %d"
2338+
msgstr ""
2339+
2340+
#: shared-module/displayio/OnDiskBitmap.c:64
2341+
#, c-format
2342+
msgid "Only true color (24 bpp or higher) BMP supported %x"
2343+
msgstr ""
2344+
23052345
#: shared-module/struct/__init__.c:39
23062346
msgid "'S' and 'O' are not supported format types"
23072347
msgstr ""

0 commit comments

Comments
 (0)