83Plus:Ports:90

From WikiTI
Jump to: navigation, search
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.

Synopsis

Port Number: 90h

Function: USB Write Packet Size

This port controls the maximum packet size allowed for data packets written to a USB pipe.

Read Values

  • Unknown

Write Values

  • Bits 0-7: Maximum packet size for the current pipe, divided by 8.

Comments

This port appears to be the analogue of port 93. As such, it tells the USB controller the maximum allowed packet size for data written to the current pipe. (The "current" pipe is determined by port 8E.)

The value written to this port is the maximum packet size, or the wMaxPacketSize field in the endpoint descriptor, divided by 8. For an endpoint with a wMaxPacketSize that isn't a multiple of 8, you should presumably round up, but take care never to write more bytes than the actual wMaxPacketSize.

I'm not sure what effect this port actually has, in either host or peripheral mode. (Would the USB controller automatically split up a large transfer into multiple packets?) In any case, it seems wise to configure this port, along with port 98 (bEndpointAddress / bmAttributes), and possibly port 99 (bInterval), before writing any data to the pipe.