<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/supervisor/shared/usb/usb.c, branch 6.1.0-beta.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-beta.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-beta.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-11-23T00:10:09+00:00</updated>
<entry>
<title>wip</title>
<updated>2020-11-23T00:10:09+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-11-23T00:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a0f1ec3c4a3dd52b11752e10d0dd31202e9c705f'/>
<id>urn:sha1:a0f1ec3c4a3dd52b11752e10d0dd31202e9c705f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip; not compiling yet</title>
<updated>2020-11-19T22:47:12+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-11-19T22:47:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=39e1f52e28c620db65d59f16a29d5476c4868901'/>
<id>urn:sha1:39e1f52e28c620db65d59f16a29d5476c4868901</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: initial code changes, starting from @tannewt's sleepio branch</title>
<updated>2020-11-16T16:56:20+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-11-16T16:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bb77f1d130d59428b66186fc52c2749531ff598e'/>
<id>urn:sha1:bb77f1d130d59428b66186fc52c2749531ff598e</id>
<content type='text'>
</content>
</entry>
<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>Start tweaking the workflow to sleep</title>
<updated>2020-10-28T00:55:03+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-10-28T00:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9a4efed8cbaca3aa48c6cc0ce0a4e267eef7a8e1'/>
<id>urn:sha1:9a4efed8cbaca3aa48c6cc0ce0a4e267eef7a8e1</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>
</feed>
