|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 00. On the TI-83 Plus Silver Edition, this port has no effect.|
Port Number: 98h
Function: USB Write Endpoint Type/Address
This port determines the endpoint address and transaction type to use when writing to a USB pipe.
- Bits 0-3: Destination endpoint number (bEndpointAddress.)
- Bits 4-5: Endpoint type (bmAttributes.)
- Bits 6-7: No effect.
Each of the USB controller's internal "pipes" (with the possible exception of pipe 0) can be used to send and receive bulk, interrupt, and/or isochronous data packets. This port determines which type of transaction, and which USB endpoint, should be used for data written to the current pipe. (The "current" pipe is determined by port 8E.)
The low 4 bits of this port are the USB endpoint address, corresponding to the low bits of the bEndpointAddress field in the endpoint descriptor. (Both the OS and USB8x will always use pipe n for writing to endpoint n; i.e., the low bits of this port will be set to the same value as port 8E. This is probably a good convention to stick to when possible; the effects of remapping endpoints haven't been fully explored.)
You don't need to use this port to set up pipe 0; I'm not sure whether endpoint remapping works at all with pipe 0.
Bits 4-5 are the endpoint type, corresponding to bits 0-1 of the bmAttributes field in the endpoint descriptor:
- 00h = control (hypothetical)
- 10h = isochronous
- 20h = bulk
- 30h = interrupt
(The transaction type will affect the wire protocol used, and may affect how the controller chooses to schedule parallel transactions in host mode.)
In addition to this port, you should also initialize port 90 (wMaxPacketSize), and possibly port 99 (bInterval), before writing data to the pipe. Once the pipe is fully configured for writing, you can proceed to write data to the appropriate Ax port, then use port 91 to send the packet.