www.ti.com | Introduction |
Example 3. Programming the USB Endpoints in Host Mode (continued)
//Configure the endpoint switch (device_speed) {
case LOW_SPEED : type = (3<<6) ((device_protocol & 3) << 4) (device_ep & 0xf); break;
case FULL_SPEED: type = (2<<6) ((device_protocol & 3) << 4) (device_ep & 0xf); break;
case HIGH_SPEED: type = (1<<6) ((device_protocol & 3) << 4) (device_ep & 0xf); break; default:error++;
}
//Set NAK limit / Polling interval (Interrupt & Iso protocols) if ((device_protocol == INT) (device_protocol == ISO)) {
// TX Polling interval | ||
// RX Polling interval | ||
} else { |
|
|
// Frames to timeout from NAKs | ||
// Frames to timeout from NAKs | ||
} |
|
|
//Set the address for transactions after SET ADDRESS successfully completed
Universal Serial Bus (USB) Controller | 19 |