<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/shared-bindings/terminalio/Terminal.c, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2021-03-15T13:57:36+00:00</updated>
<entry>
<title>run code formatting script</title>
<updated>2021-03-15T13:57:36+00:00</updated>
<author>
<name>microDev</name>
<email>70126934+microDev1@users.noreply.github.com</email>
</author>
<published>2021-03-15T13:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a52eb88031620a81521b937f2a0651dbac2bb350'/>
<id>urn:sha1:a52eb88031620a81521b937f2a0651dbac2bb350</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix several type hints</title>
<updated>2020-07-27T09:05:13+00:00</updated>
<author>
<name>Taku Fukada</name>
<email>naninunenor@gmail.com</email>
</author>
<published>2020-07-25T08:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d356581651e4a11dc18787da95e2f96bfde3575d'/>
<id>urn:sha1:d356581651e4a11dc18787da95e2f96bfde3575d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Made every init return None</title>
<updated>2020-07-03T18:23:34+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-03T18:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d0d949cd24dbff5fb382f8c7abf3bae7ba46541a'/>
<id>urn:sha1:d0d949cd24dbff5fb382f8c7abf3bae7ba46541a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added type hints to terminalio</title>
<updated>2020-07-03T15:31:57+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-03T15:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f8229372bd06eea08e97be5241352d521fa8972f'/>
<id>urn:sha1:f8229372bd06eea08e97be5241352d521fa8972f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Swap sphinx to autoapi and the inline stubs</title>
<updated>2020-05-13T00:28:24+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-05-13T00:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4e8de3c554024d3ac89e9ee77b958a6932a64bec'/>
<id>urn:sha1:4e8de3c554024d3ac89e9ee77b958a6932a64bec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Did struct, supervisor, terminalio</title>
<updated>2020-05-12T15:28:33+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@gmail.com</email>
</author>
<published>2020-05-12T15:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=991045b9ce958db9d7102d621f4e7860301e4c21'/>
<id>urn:sha1:991045b9ce958db9d7102d621f4e7860301e4c21</id>
<content type='text'>
</content>
</entry>
<entry>
<title>protocols: Allow them to be (optionally) type-safe</title>
<updated>2019-12-04T15:29:57+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-12-03T20:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=238e12123690debaf2cf8488fb2a4d4003a06506'/>
<id>urn:sha1:238e12123690debaf2cf8488fb2a4d4003a06506</id>
<content type='text'>
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):

    &gt;&gt;&gt; import uos, ujson
    &gt;&gt;&gt; u = uos.VfsPosix('/tmp')
    &gt;&gt;&gt; ujson.load(u)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    ValueError: syntax error in JSON

After the change, the vfs object is correctly detected as not supporting
the stream protocol:
    &gt;&gt;&gt; ujson.load(p)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    OSError: stream operation not supported
</content>
</entry>
<entry>
<title>Fix up sphinx</title>
<updated>2019-03-20T01:37:41+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-03-20T01:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b0afc855d6b7784fe7a31a694a66f0c1e7cb0e5'/>
<id>urn:sha1:4b0afc855d6b7784fe7a31a694a66f0c1e7cb0e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move Glyph and BuiltinFont into fontio</title>
<updated>2019-03-19T23:22:09+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-03-19T23:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5e2fec714cfbff8692d8af4ec8f774738b822ce1'/>
<id>urn:sha1:5e2fec714cfbff8692d8af4ec8f774738b822ce1</id>
<content type='text'>
It was confusing in displayio.

Fixes #1662
</content>
</entry>
<entry>
<title>A variety of displayio improvements</title>
<updated>2019-02-12T04:55:05+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-02-06T20:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c17f147be95e7490e5207c747add2da1cc8b167f'/>
<id>urn:sha1:c17f147be95e7490e5207c747add2da1cc8b167f</id>
<content type='text'>
This changes a number of things in displayio:
* Introduces BuiltinFont and Glyph so the built in font can be used by libraries. For boards with
  a font it is available as board.TERMINAL_FONT. Fixes #1172
* Remove _load_row from Bitmap in favor of bitmap[] access. Index can be x/y tuple or overall index. Fixes #1191
* Add width and height properties to Bitmap.
* Add insert and [] access to Group. Fixes #1518
* Add index param to pop on Group.
* Terminal no longer takes unicode character info. It takes a BuiltinFont instead.
* Fix Terminal's handling of [###D vt100 commands used when up arrowing into repl history.
* Add x and y positions to Group plus scale as well.
* Add bitmap accessor for BuiltinFont
</content>
</entry>
</feed>
