Commit Graph

15185 Commits

Author SHA1 Message Date
Thomas Sarlandie fc71ed9789 add shirtty board - hackaday supercon 2019 addon 2019-11-25 17:44:41 +01:00
Dan Halbert d154d11911
Merge pull request #2320 from jepler/nrf-unsigned-audio-crash
nrf: i2sout: Fix double-increment when copying samples
2019-11-25 11:42:16 -05:00
Jeff Epler 5115fdaa6f shared-bindings: I2SOut: Ensure object is deinitialised
(or deinitialized, for those of us on this side of the pond)

Otherwise, a sequence like
```
audio = audiobusio.I2SOut(bit_clock=board.D6, word_select=board.D9, data=board.D10)
sine_wave_sample = audiocore.RawSample(sine_wave)
audio.play(sine_wave_sample, loop=True)
del audio
```
could free the memory associated with audio without stopping the
related background task.  Later, when fresh objects are allocated within
a now-freed memory region, they can get overwritten in the background
task, leading to a hard crash.

This presumably can affect multiple I2S implementations, but it was
reported against the nRF one.
2019-11-25 09:53:55 -06:00
Jeff Epler c9946dfd63 nrf: i2sout: Use <, not !=, for loop condition
This is good C style, h/t @danh
2019-11-25 09:35:57 -06:00
Jeff Epler 19d122e546 nrf: i2sout: Fix double-increment when copying samples
This caused two problems when playing unsigned samples:
 * When an even number of samples were present, it "worked" but only
   every other sample was copied into the output, changing the waveform
 * When an odd number of samples were present, the copy continued beyond
   the end of the buffers and caused a hard fault
2019-11-25 09:07:20 -06:00
Scott Shawcroft 6e3b363f50
Merge pull request #2317 from babygrimes/frozen-mpy-bytes-gc_long_lived-crash
Only make objects long lived if they are on the GC heap
2019-11-24 23:12:56 -08:00
Scott Shawcroft f047f3ce93
Merge pull request #2316 from dhalbert/m4-network-ps2io
Enable network and ps2io for all SAMD51 boards by default.
2019-11-24 23:11:11 -08:00
Roy Hooper 7422f430b2 update translations 2019-11-23 13:59:44 -05:00
Roy Hooper a9baa441c9 disable -Wunused-parameter on subscr functions 2019-11-23 13:52:14 -05:00
Roy Hooper 75e1e7da4b Try to fix frozen to fix CI 2019-11-23 13:40:03 -05:00
Roy Hooper 03b892379a Try to fix frozen to fix CI 2019-11-23 13:38:51 -05:00
Roy Hooper 6108fa3766 Merge branch 'master' into new-pixelbuf-api 2019-11-23 12:22:04 -05:00
Roy Hooper 27979f51ac use base for errors 2019-11-23 12:15:12 -05:00
Roy Hooper c770ccd939 make ->subscr take an instance to pass when instance_subscr is called from subscr. 2019-11-23 12:09:26 -05:00
Ayan Pahwa 180b485f8b Enable creation of code.py only for full builds 2019-11-23 20:58:33 +05:30
Ayan Pahwa 262cfd4ea3 Passing address of char_written at f_write 2019-11-23 20:47:30 +05:30
Ayan Pahwa 5823f5ed04 Add \n to file end 2019-11-23 20:43:24 +05:30
Dan Halbert 1ccb7b4c5e cosmetic commit, mostly to re-run 2019-11-22 16:30:10 -05:00
Dan Halbert 13375d16f1 change mpconfigport.mk files so they can be overriden by mpconfigboard.mk 2019-11-22 15:44:51 -05:00
Jeff Epler bfdfe0e681 stm32: fix uses of ticks_ms global 2019-11-22 14:30:08 -06:00
Jeff Epler 77b78d7fb9 Merge remote-tracking branch 'origin/master' into tick-refactor 2019-11-22 14:28:51 -06:00
Jeff Epler eb44b2bb26 build.yml: Use a newer build toolchain
.. the new version is not offered in .deb form, so the installation
process also changes
2019-11-22 14:17:11 -06:00
Jeff Epler 1c6c9a3e1f nrf: i2sout: Ensure hardware I2S is stopped at deinit
.. otherwise, it may be possible under some scenario, for the background
task to continue and overwrite unrelated memory.
2019-11-22 14:15:07 -06:00
Dan Halbert e18d3e0f76 Merge branch 'master' into m4-network-ps2io 2019-11-22 15:02:52 -05:00
Jeff Epler aabb56c840 nrf: i2sout: Only update hold_value when appropriate
If we put no samples into the buffer, then there is no last
sample to fill out hold_value with.  (and, in fact, the expression such
as *(uint32_t*)(buffer-4) is outside an allocated region)

Detect this condition, and leave the prior value in place.

This improves clicks heard when pausing and resuming a waveform.
2019-11-22 13:54:37 -06:00
Dan Halbert 1a62a9cb17 remove network from kicksat_sprite 2019-11-22 14:02:44 -05:00
Dan Halbert 2e9aa38700 turn off network in pewpew_m4 2019-11-22 13:49:33 -05:00
David Grimes f13ba7e8d9 * only make objects long lived if they are on the GC heap 2019-11-22 13:47:13 -05:00
Dan Halbert 1d411d2874 Merge remote-tracking branch 'adafruit/master' into testing-fixes 2019-11-22 11:55:34 -05:00
Hierophect 352bd95f5a remove blackpill 2019-11-22 11:19:39 -05:00
Dan Halbert 228a619af5 enable network, wiznet5k, and ps2io by default on M4 2019-11-22 10:59:27 -05:00
Hierophect 0d8eb3cfb4 add correct VID/PID pairs 2019-11-22 10:54:35 -05:00
Dan Halbert c000567d88
Merge pull request #2313 from tannewt/fix_pairing
Re-add pairing support
2019-11-21 21:21:51 -05:00
Hierophect 6a7c8d6341 minor fix 2019-11-21 20:56:05 -05:00
Scott Shawcroft 46cc9b934b
Update translations 2019-11-21 16:50:34 -08:00
Scott Shawcroft 743bc829ab
Clean up debug changes 2019-11-21 16:39:57 -08:00
Scott Shawcroft e63796c7bc
Special exception message for when pairing prompt is ignored. 2019-11-21 16:32:42 -08:00
Scott Shawcroft 39f4046f70
Fix pairing when peripheral. Central untested. 2019-11-21 16:32:42 -08:00
Hierophect 5b907aa076 change order 2019-11-21 18:24:10 -05:00
Hierophect b3ad823b4c yaml additions 2019-11-21 17:39:14 -05:00
Hierophect b5ff9684bb remove misplaced status LED definitions 2019-11-21 17:09:28 -05:00
Hierophect 4e4ecafd97 Add definitions for PYB Nano and blackpill 2019-11-21 16:53:06 -05:00
Dan Halbert 2adecda5eb
Merge pull request #2311 from tannewt/redo_bleio_errors
Use BluetoothError in _bleio
2019-11-21 16:44:26 -05:00
Dan Halbert e06dc72359
Merge pull request #2307 from hierophect/stm32-spi-cleanup
STM32: SPI clock rate fix and cleanup
2019-11-21 16:12:06 -05:00
Scott Shawcroft 98e55eb577
Only add module when printing exception. 2019-11-21 12:26:25 -08:00
Hierophect a96317d566 requested style changes 2019-11-21 14:30:07 -05:00
Hierophect 13d786b2ef added pin defs 2019-11-21 14:27:59 -05:00
Scott Shawcroft 521c7531bc
Improve printing to include _bleio. prefix for type. 2019-11-21 11:04:17 -08:00
Scott Shawcroft 5e857fdb67
Use BluetoothError in _bleio
This better differentiates errors than using OSError everywhere.
2019-11-20 14:02:15 -08:00
Scott Shawcroft 372f22c0b3
Merge pull request #1858 from rafa-gould/korean_trans
Created Korean Translations
2019-11-20 13:22:26 -08:00