Commit Graph

3527 Commits

Author SHA1 Message Date
jepler 70daf007ae In py/, must guard uses of RUN_BACKGROUND_TASKS 2019-09-11 21:15:10 -05:00
jepler 932ac0960b stream_readall: This can be long-running, run background tasks
While finding sources of clicks and buzzes in nrf i2sout, I identified
this site as one which could be long running.  Reproducer code was to
play a 22.05kHz sample and repeatedly print `os.listdir('')`
2019-09-09 20:14:02 -05:00
jepler d9c8460934 py/obj.c: This can be long-running, run background tasks
While finding sources of clicks and buzzes in nrf i2sout, I identified
this site as one which could be long running.  Reproducer code was to
play a 22.05kHz sample and repeatedly print `os.listdir('')`
2019-09-09 20:14:02 -05:00
sommersoft b1c3d47413 Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-09-01 21:16:12 -05:00
sommersoft 8120f5cdad Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-08-29 22:14:53 -05:00
Dan Halbert 7a64af9280 rename bleio module to _bleio 2019-08-29 18:44:27 -04:00
Dan Halbert 19c59b41ed bleio: API change to create and connect related objects simulatenously: no orphan bleio objects 2019-08-28 16:15:09 -04:00
Scott Shawcroft 0876d5c4ad
Disable bitbangio on Itsy M0
Also, switch CIRCUITPY_BITBANG_APA102 to makefile setting so it can alter included files
2019-08-27 15:21:47 -07:00
sommersoft df5568d993 move Mixer & MixerVoice from 'audiocore' to 'audiomixer' 2019-08-24 23:36:18 -05:00
sommersoft b54fd961cb Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-08-24 17:14:05 -05:00
Scott Shawcroft 7324b70a7c
Rework based on Dan's review 2019-08-23 15:27:21 -07:00
Scott Shawcroft 9993a99906
Add initial Monster M4SK build 2019-08-22 14:24:32 -07:00
Scott Shawcroft 36a23e0fe3
Rework refresh API and factor common display stuff out
NOT TESTED! Just compiles

Fixes #1691
2019-08-22 14:23:27 -07:00
Scott Shawcroft c247e7df9c
Begin refresh rework. 2019-08-22 14:08:33 -07:00
Scott Shawcroft 70680d5b22
EPaper displays work mostly. 2019-08-22 14:08:33 -07:00
Dan Halbert e00696de7f merge from upstream and make translate 2019-08-20 13:06:23 -04:00
Scott Shawcroft bd4d3c6393
Merge pull request #2068 from jepler/audioio-compat
audioio: By default, be compatible with 4.x
2019-08-19 19:43:52 -07:00
sommersoft 1b2996a75e Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-08-19 21:23:27 -05:00
Dan Halbert e3dc5e3a66 Merge remote-tracking branch 'adafruit/master' into run-background-tasks
Restore dependencies indicated by indentation in circuitpy_mpconfig.h.
2019-08-19 12:41:20 -04:00
Dan Halbert e2a4c76a37 make nrf touchio be generic: now available for SAMD51 too 2019-08-18 08:44:10 -04:00
Jeff Epler 47d6dd843e audioio: By default, be compatible with 4.x
Testing performed: That the shipped .mpy files on a PyPortal (CP 4.x)
still work (play audio) with this branch, instead of erroring because
`WaveFile` can't be found in `audioio`.

Flash usage grew by 28 bytes.  (I expected 24, there must be some other
effect on size/alignment that I didn't predict)
2019-08-17 13:54:06 -05:00
Scott Shawcroft 85d7398476
Merge pull request #2066 from dhalbert/ble-pairing
BLE: more features
2019-08-16 14:50:00 -07:00
Scott Shawcroft b3de7efc07
Fix I2CDisplay lifecycle and splash lifecycle.
Fixes https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306/issues/2
2019-08-14 15:53:58 -07:00
Jeff Epler 076cbcc4f8 cicuitpy_mpconfg.h: Define RUN_BACKGROUND_TASKS
In #2013, @danh says:
    My choice of where to put the semicolon is deliberate,
    so that we can say

        RUN_BACKGROUND_TASKS;

    not have a redundant semicolon, and not confuse C code formatting.
2019-08-11 08:53:02 -05:00
Jeff Epler 568dfc73a9 cicuitpy_mpconfg.h: Alphebetize and standardize indentation
.. no semantic change intended
2019-08-11 08:53:02 -05:00
Jeff Epler 3eb418af39 py: mp_obj_tuple_get: accept any item which can use tuple_getiter
.. such as namedtuple and attrtuple objects.  This is the same
predicate used elsewhere in the file to check for adequate compatibility
between the types.

This was discovered due to crashing `time.time()` on the nrf port.

Closes: #2052
2019-08-10 10:10:41 -05:00
Scott Shawcroft 47a0b7cba1
Merge pull request #2042 from jepler/qstr-expansion
makeqstrdata: permit longer "compressed" outputs
2019-08-06 14:13:48 -07:00
Jeff Epler c4f3a02b3b makeqstrdata: permit longer "compressed" outputs
It is possible for this routine to expand some inputs, and in fact
it does for certan strings in the proposed Korean translation of
CircuitPython (#1858).  I did not determine what the maximum
expansion is -- it's probably modest, like len()/7+2 bytes or
something -- so I tried to just make enc[] an adequate
over-allocation, and then ensured that all the strings in the
proposed ko.po now worked.  The worst actual expansion seems to be a
string that goes from 65 UTF-8-encoded bytes to 68 compressed bytes
(+4.6%).  Only a few out of all strings are reported as
non-compressed.
2019-08-06 07:39:09 -05:00
Dan Halbert 243334da75 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-08-05 23:06:24 -04:00
sommersoft 065efb05b7 bring MixerVoice back to building state; update documentation 2019-08-03 11:20:06 -05:00
Dan Halbert 7ce3776b80 WIP: rework of Characteristic properties; enhance Descriptor; not tested 2019-08-02 17:57:31 -04:00
Dan Halbert 91d791afd0 cleanup adapter.address; add uniquish suffix to BLE device name 2019-07-31 00:30:24 -04:00
Jeff Epler b72352949b PWM audio: Rename AudioOut -> PWMAudioOut, _audioio_ -> _audiopwmio_ 2019-07-29 18:39:00 -04:00
Jeff Epler 54cde56ec5 audiopwmio: Add the shared files for this new module 2019-07-26 07:52:37 -05:00
Scott Shawcroft d99d3bd471
Merge pull request #2010 from jepler/audiocore
audiocore: Factor from audioio
2019-07-25 13:52:30 -07:00
Jeff Epler 6b44e40ee8 audiocore: Factor from audioio
When nrf pwm audio is introduced, it will be called `audiopwmio`.  To
enable code sharing with the existing (dac-based) `audioio`, factor
the sample and mixer types to `audiocore`.

INCOMPATIBLE CHANGE: Now, `Mixer`, `RawSample` and `WaveFile` must
be imported from `audiocore`, not `audioio`.
2019-07-25 06:44:26 -05:00
Scott Shawcroft 8ec2d6ce49
Merge pull request #2007 from hierophect/F4xx-port-setup
Add STM32 Discovery F412ZG and F411RE support
2019-07-24 18:49:48 -07:00
Hierophect a63df51893 Requested changes, general cleanup 2019-07-24 14:21:27 -04:00
Scott Shawcroft 6797ec6ed3
Add support for grayscale displays that are < 8 bit depth.
This also improves Palette so it stores the original RGB888 colors.

Lastly, it adds I2CDisplay as a display bus to talk over I2C. Particularly
useful for the SSD1306.

Fixes #1828. Fixes #1956
2019-07-19 16:06:11 -07:00
Dan Halbert 6a001786a9 merge from master 2019-07-09 08:58:49 -04:00
Scott Shawcroft 0cce7fcaa3
Merge remote-tracking branch 'adafruit/4.0.x' into merge_in_402 2019-06-27 14:06:26 -07:00
Scott Shawcroft 2494bfdc86
Validate raw code and mpy read length 2019-06-25 17:54:27 -07:00
Scott Shawcroft 330517bde9
Validate portions of mpy load to detect corruption
Fixes #1917
2019-06-25 15:39:33 -07:00
Dan Halbert 24ac1fdcab WIP: backup only; not compiled 2019-06-19 21:54:28 -04:00
Dan Halbert 35b9191857 Don't operate directly on bleio objects in shared-bindings: use common_hal
routines instead. Changes made but not yet tested.
2019-06-18 23:46:20 -04:00
Dan Halbert bed6d43a76 merge from upstream; WIP redo Address; no more AddressType 2019-06-13 21:55:07 -04:00
Dan Halbert ba1b36a800 Uncomment vm.c SUPEROPT (debugging typo); trim a few builds 2019-06-12 13:09:09 -04:00
Dan Halbert 1bb4fccc3b Turn off SUPEROPT on gc.c instead of trying to squueze inline limit so much; reorganize mpconfigboard.mk files 2019-06-12 11:08:22 -04:00
Dan Halbert aa3316b619 Merge remote-tracking branch 'adafruit/master' into vm-computed-goto 2019-06-11 18:01:04 -04:00
Dan Halbert 4fc189b60c Merge latest 4.0.x fixes into master 2019-06-11 16:16:29 -04:00