<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/supervisor/shared/usb, 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 #3225 from hathach/improve-highspeed-usb</title>
<updated>2020-07-30T12:15:20+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jeff@adafruit.com</email>
</author>
<published>2020-07-30T12:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d4801b8c54ebf6123d8efdf14999daeef0fbe056'/>
<id>urn:sha1:d4801b8c54ebf6123d8efdf14999daeef0fbe056</id>
<content type='text'>
Improve highspeed usb</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>move CFG_TUSB_RHPORT0_MODE into generated header</title>
<updated>2020-07-29T09:05:31+00:00</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2020-07-29T09:05:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1f4fcb399b077ea783219428bfd334808660667d'/>
<id>urn:sha1:1f4fcb399b077ea783219428bfd334808660667d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove obsolete CFG in tusb_config.h</title>
<updated>2020-07-29T08:45:01+00:00</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2020-07-29T08:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d8fef207d254e03571e596795e93cbf99981bab5'/>
<id>urn:sha1:d8fef207d254e03571e596795e93cbf99981bab5</id>
<content type='text'>
</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>supervisor: support debugging tinyusb</title>
<updated>2020-05-21T13:35:30+00:00</updated>
<author>
<name>Sean Cross</name>
<email>sean@xobs.io</email>
</author>
<published>2020-05-08T04:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d1a7fdd9d4720c43d0ab9f16267fd124a414ce9d'/>
<id>urn:sha1:d1a7fdd9d4720c43d0ab9f16267fd124a414ce9d</id>
<content type='text'>
Allow for passing `-DCFG_TUSB_DEBUG=1` or `-DCFG_TUSB_DEBUG=2` on the
command line to enable debugging tinyusb within circuitpython.

Signed-off-by: Sean Cross &lt;sean@xobs.io&gt;
</content>
</entry>
</feed>
