summaryrefslogtreecommitdiff
path: root/shared-bindings
AgeCommit message (Collapse)Author
2020-01-08Merge pull request #2445 from jepler/mp3-jeplayer-fixes5.0.0-beta.3Scott Shawcroft
Fixes for JEplayer
2020-01-06fix doc build errorJeff Epler
2020-01-06audiomp3: rename to MP3DecoderJeff Epler
2020-01-03Add PacketBuffer and MTU negotiation support.Scott Shawcroft
PacketBuffer facilitates packet oriented BLE protocols such as BLE MIDI and the Apple Media Service. This also adds PHY, MTU and connection event extension negotiation to speed up data transfer when possible.
2020-01-03Merge pull request #2034 from rhooper/new-pixelbuf-apiDan Halbert
Updates to pixelbuf API - Addresses #884
2020-01-02remove unnecessary GCC pragmasRoy Hooper
2020-01-02raise mp_raise_NotImplementedErrorRoy Hooper
2020-01-02rename call_show to pixelbuf_call_showRoy Hooper
2020-01-02MP3File: Add rms_level propertyJeff Epler
This lets a music player show it vu-meter style
2020-01-01Fix docstring for byteorderRoy Hooper
2020-01-01move native fill to a helper to work around being unable to call a subclass ↵Roy Hooper
show method from the native superclass
2020-01-01Revert "try a property with a callable static class"Roy Hooper
This reverts commit ca5b2770cf30f30946991faeaab16263bce435e9.
2020-01-01try a property with a callable static classRoy Hooper
2019-12-30Update Shape.cDavid Glaude
Make no sense to say this is experimental and will change in 4.0.0 when we are already above 4.0.0. This should be removed, or updated to say it will not be in x.0.0
2019-12-29Merge branch 'pixelbuf-subscr-change' into new-pixelbuf-apiRoy Hooper
2019-12-29Merge branch 'master' into pixelbuf-subscr-changeRoy Hooper
2019-12-23MP3File: Add a settable ".file" propertyJeff Epler
This enables jeplayer to allocate just one MP3File at startup, rather than have to make repeated large allocations while the application is running. The buffers have to be allocated their theoretical maximum, but that doesn't matter much as all the real-life MP3 files I checked needed that much allocation anyway.
2019-12-20Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-20Merge pull request #2390 from jepler/displayio-set-rotationScott Shawcroft
displayio: make 'rotation' property settable
2019-12-19Typo in docalbang
2019-12-16displayio: make 'rotation' property settableJeff Epler
2019-12-16move call to show outside loopRoy Hooper
2019-12-13Revert subscr signature changeRoy Hooper
2019-12-13Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-12Add extended, connectable and scannable error.Scott Shawcroft
Related to https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/44
2019-12-10Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-10Fix slice step.Roy Hooper
2019-12-10audiocore: Add MP3File using Adafruit_MP3 libraryJeff Epler
2019-12-09Merge pull request #2353 from jepler/audiosample-protocolScott Shawcroft
Convert audiosamples to use micropython "protocols" (safely)
2019-12-08fix slice anf fill bugsRoy Hooper
2019-12-06Merge pull request #2301 from tannewt/support_extended_advertisingDan Halbert
Add support for extended (>31 byte) BLE advertisements.
2019-12-06Check connection validity after service discovery.Scott Shawcroft
Fixes #2347
2019-12-06Merge pull request #2356 from tannewt/central_pairingDan Halbert
Add connection interval and debugging
2019-12-05Make _bleio.Connection.disconnect() idempotentDan Halbert
2019-12-04Add connection interval and debuggingScott Shawcroft
This also sets TinyUSB to master and to not include its submodules. It also fixes an old displayio example comment and retries gattc reads.
2019-12-04audiosample: convert to use a protocolJeff Epler
This eases addition of new sample sources, since the manual virtual function dispatch functions are just calls via a protocol
2019-12-04protocols: Allow them to be (optionally) type-safeJeff Epler
Protocols are nice, but there is no way for C code to verify whether a type's "protocol" structure actually implements some particular protocol. As a result, you can pass an object that implements the "vfs" protocol to one that expects the "stream" protocol, and the opposite of awesomeness ensues. This patch adds an OPTIONAL (but enabled by default) protocol identifier as the first member of any protocol structure. This identifier is simply a unique QSTR chosen by the protocol designer and used by each protocol implementer. When checking for protocol support, instead of just checking whether the object's type has a non-NULL protocol field, use `mp_proto_get` which implements the protocol check when possible. The existing protocols are now named: protocol_framebuf protocol_i2c protocol_pin protocol_stream protocol_spi protocol_vfs (most of these are unused in CP and are just inherited from MP; vfs and stream are definitely used though) I did not find any crashing examples, but here's one to give a flavor of what is improved, using `micropython_coverage`. Before the change, the vfs "ioctl" protocol is invoked, and the result is not intelligible as json (but it could have resulted in a hard fault, potentially): >>> import uos, ujson >>> u = uos.VfsPosix('/tmp') >>> ujson.load(u) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: syntax error in JSON After the change, the vfs object is correctly detected as not supporting the stream protocol: >>> ujson.load(p) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: stream operation not supported
2019-12-02fix compile failsRoy Hooper
2019-12-02Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-11-27'seconds'Dan Halbert
2019-11-27Squeeze pyruler zh_Latn_pinyinDan Halbert
2019-11-27make UART.write be blocking on SAMD; add timeout propertyDan Halbert
2019-11-26add showRoy Hooper
2019-11-26remove unnecessary intermediate mp_obj_subscr wrapperRoy Hooper
2019-11-26Merge remote-tracking branch 'adafruit/master' into support_extended_advertisingScott Shawcroft
2019-11-26time: struct_time: allow construction like a namedtuple, tooJeff Epler
Whenever there is more than one argument, delegate the operation to namedtuple_make_new. This allows other circuitpython-compatible idioms, like with keywords time.struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=14, tm_wday=5, tm_yday=5, tm_isdst=-1) with 9 positional arguments, etc. The only vaguely plausible CPython behavior still not permitted in CircuitPython that I found is constructing a timetuple from a length-9 list, a la time.struct_time(list(time.localtime()) Even better, by getting rid of an error message, the build shrinks a tiny bit.
2019-11-26time: struct_time: allow construction from another struct_timeJeff Epler
This doesn't cover ALL the cases that CPython permits for construction of a struct_time, but it at least makes constructing from any namedtuple work. Closes: #2326
2019-11-25make pixelbuf iterableRoy Hooper
2019-11-25remove unnecessary qstrsRoy Hooper
2019-11-25shared-bindings: I2SOut: Ensure object is deinitialisedJeff Epler
(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.