<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/shared-bindings/supervisor, branch 6.0.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-09-17T23:32:06+00:00</updated>
<entry>
<title>supervisor: Improve serial connection detection</title>
<updated>2020-09-17T23:32:06+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-09-03T18:36:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=28043c94b5ea5f3cce11fa57afa9f3f0141b8dce'/>
<id>urn:sha1:28043c94b5ea5f3cce11fa57afa9f3f0141b8dce</id>
<content type='text'>
These changes remove the caveat from supervisor.runtime.serial_connected.

It appears that _tud_cdc_connected() only tracks explicit changes to the
"DTR" bit, which leads to disconnects not being registered.

Instead:
 * when line state is changed explicitly, track the dtr value in
   _serial_connected
 * when the USB bus is suspended, set _serial_connected to False

Testing performed (using sam e54 xplained):  Run a program to show
the state of `serial_connected` on the LED:
```
import digitalio
import supervisor
import board

led = digitalio.DigitalInOut(board.LED)
while True:
    led.switch_to_output(not supervisor.runtime.serial_connected)
```

Try all the following:
 * open, close serial terminal program
    - LED status tracks whether terminal is open
 * turn on/off data lines using the switchable charge-only cable
    - LED turns off when switch is in "charger" position
    - LED turns back on when switch is in Data position and terminal is
      opened (but doesn't turn back on just because switch position is
      changed)
</content>
</entry>
<entry>
<title>Modify some Python stubs</title>
<updated>2020-08-06T16:01:28+00:00</updated>
<author>
<name>Taku Fukada</name>
<email>naninunenor@gmail.com</email>
</author>
<published>2020-08-03T04:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=56c898da80df57d0e83f4e8d1ee44f4351ce1d8c'/>
<id>urn:sha1:56c898da80df57d0e83f4e8d1ee44f4351ce1d8c</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>Add externs. GCC10 complains about duplicate defines</title>
<updated>2020-07-22T23:26:46+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-21T23:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2bd6d056638f05185eb497ca2d039ebe9f386327'/>
<id>urn:sha1:2bd6d056638f05185eb497ca2d039ebe9f386327</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed init formatting</title>
<updated>2020-07-03T18:00:06+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-03T18:00:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d358c915c3d27469fc17bdc302dad393d7e28a09'/>
<id>urn:sha1:d358c915c3d27469fc17bdc302dad393d7e28a09</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Made most of the requested changes</title>
<updated>2020-07-03T17:49:00+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-03T17:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3df03a565069d6e8874eb678d4f010eee97305b0'/>
<id>urn:sha1:3df03a565069d6e8874eb678d4f010eee97305b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Removed all 'self, )'</title>
<updated>2020-07-02T17:28:36+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-02T17:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=54cb1feea04c0c93afe40868bc050ff7f645c61e'/>
<id>urn:sha1:54cb1feea04c0c93afe40868bc050ff7f645c61e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix up end of file and trailing whitespace.</title>
<updated>2020-06-03T09:56:35+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-05-30T09:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dd5d7c86d22807c021dd1711eb7dd3daebc5cfcf'/>
<id>urn:sha1:dd5d7c86d22807c021dd1711eb7dd3daebc5cfcf</id>
<content type='text'>
This can be enforced by pre-commit, but correct it separately to make it easier to review.
</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>
</feed>
