Port Number: 56h
Function: USB Line Events
This port reports which, if any, USB line interrupts have occurred.
|This port only exists on the the TI-84 Plus and the TI-84 Plus Silver Edition. On the standard TI-83 Plus, it acts as a shadow of port 16. On the TI-83 Plus Silver Edition, this port has no effect.|
- Bit 0: Set if the D+ line has gone low.
- Bit 1: Set if the D+ line has gone high.
- Bit 2: Set if the D? line has gone low.
- Bit 3: Set if the D? line has gone high.
- Bit 4: Set if the ID line has gone low.
- Bit 5: Set if the ID line has gone high.
- Bit 6: Set if the Vbus line has gone high.
- Bit 7: Set if the Vbus line has gone low.
- No effect
This port reports when an interrupt has occurred due to one of the USB lines changing from high to low, or low to high.
Normally, only a subset of the above events are actually enabled; port 57 controls which. For instance, when the calculator starts up, the OS initially monitors only the ID-low and Vbus-high events (the former to notify it when an A-cable is plugged in, the latter to notify it when a powered B-cable is plugged in.)
To acknowledge a USB line interrupt, clear the corresponding bit of port 57 (and then set the bit again, if you want to get another interrupt the next time it happens.) If a line has changed state twice, and you've enabled both events, both bits will be set. The only way for bits in this port to be cleared is by clearing the corresponding bit of port 57.
(If you want to see the current states of the USB lines, see port 4D.)