<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/supervisor/shared/usb/usb.c, 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-10-31T02:25:50+00:00</updated>
<entry>
<title>improve USB CDC disconnect/reconnect checking</title>
<updated>2020-10-31T02:25:50+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-10-31T02:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=345d84ffde527b16f50c203f7b6a718886be34f6'/>
<id>urn:sha1:345d84ffde527b16f50c203f7b6a718886be34f6</id>
<content type='text'>
</content>
</entry>
<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>Merge pull request #3223 from dhalbert/unmount-before-reset</title>
<updated>2020-07-29T17:47:24+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-07-29T17:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b76d37f24a3f1d8e26e080ed9b88e05af6dfae5c'/>
<id>urn:sha1:b76d37f24a3f1d8e26e080ed9b88e05af6dfae5c</id>
<content type='text'>
storage.erase_filesystem(): disconnect from USB and wait 1 second before resetting</content>
</entry>
<entry>
<title>storage.erase_filesystem(): unmount and wait 1 second before resetting</title>
<updated>2020-07-28T21:52:56+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-07-28T21:52:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=65c22aa4347abc145493f44a4bc8d91a4f200860'/>
<id>urn:sha1:65c22aa4347abc145493f44a4bc8d91a4f200860</id>
<content type='text'>
</content>
</entry>
<entry>
<title>supervisor: rename some locals for clarity</title>
<updated>2020-07-20T13:45:31+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-07-20T13:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9fd10322fedc4a7736118fdb6cb1480ad8da94f1'/>
<id>urn:sha1:9fd10322fedc4a7736118fdb6cb1480ad8da94f1</id>
<content type='text'>
It's perfectly OK for these variables with static linkage to have the
same name, but it's inconvenient for humans like me.
</content>
</entry>
<entry>
<title>supervisor: factor out, Handle USB via background callback</title>
<updated>2020-07-15T16:49:44+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-07-07T16:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6160d11c5a04f60e54ce977fd73fafa5ba858aa0'/>
<id>urn:sha1:6160d11c5a04f60e54ce977fd73fafa5ba858aa0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial ESP32S2 port.</title>
<updated>2020-05-15T22:36:16+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-04-17T23:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6aaab005c5f3a781fec229640c74bf44a601fc97'/>
<id>urn:sha1:6aaab005c5f3a781fec229640c74bf44a601fc97</id>
<content type='text'>
Basic blinky works but doesn't check pins.
</content>
</entry>
<entry>
<title>First try at lowering the power consumption</title>
<updated>2020-03-13T18:12:30+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-03-06T01:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6f60afe8c521011d1a2d34a2632295b483a8cee3'/>
<id>urn:sha1:6f60afe8c521011d1a2d34a2632295b483a8cee3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve USB eject by resetting on replug</title>
<updated>2019-12-18T03:01:03+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-12-18T03:01:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=561fdfb279c45f7a9ff69a2b2e71ac272cb6aaef'/>
<id>urn:sha1:561fdfb279c45f7a9ff69a2b2e71ac272cb6aaef</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cleanup adapter.address; add uniquish suffix to BLE device name</title>
<updated>2019-07-31T04:30:24+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-07-31T04:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=91d791afd091ba38bb61689e88a7fc03b9679e00'/>
<id>urn:sha1:91d791afd091ba38bb61689e88a7fc03b9679e00</id>
<content type='text'>
</content>
</entry>
</feed>
