Archived
1
0

Code formatting cleanup.

This commit is contained in:
Jacob Alexander 2014-11-10 23:42:39 -08:00
parent a7b1d94465
commit 774ccc7fe9

View File

@ -238,7 +238,8 @@ static void usb_setup()
tx_last[ i ] = NULL;
usb_rx_byte_count_data[i] = 0;
switch (tx_state[i]) {
switch ( tx_state[ i ] )
{
case TX_STATE_EVEN_FREE:
case TX_STATE_NONE_FREE_EVEN_FIRST:
tx_state[ i ] = TX_STATE_BOTH_FREE_EVEN_FIRST;
@ -345,8 +346,6 @@ static void usb_setup()
{
if ( list->addr == NULL )
break;
//if (setup.wValue == list->wValue &&
//(setup.wIndex == list->wIndex) || ((setup.wValue >> 8) == 3)) {
if ( setup.wValue == list->wValue && setup.wIndex == list->wIndex )
{
data = list->addr;
@ -398,6 +397,7 @@ static void usb_setup()
case 0x2021: // CDC_SET_LINE_CODING
// XXX Needed?
//serial_print("set coding, waiting...\n");
//endpoint0_stall();
return; // Cannot stall here (causes issues)
case 0x0921: // HID SET_REPORT
@ -734,8 +734,10 @@ void usb_rx_memory( usb_packet_t *packet )
cfg = usb_endpoint_config_table;
//serial_print("rx_mem:");
__disable_irq();
for (i=1; i <= NUM_ENDPOINTS; i++) {
if (*cfg++ & USB_ENDPT_EPRXEN) {
for ( i = 1; i <= NUM_ENDPOINTS; i++ )
{
if ( *cfg++ & USB_ENDPT_EPRXEN )
{
if ( table[ index( i, RX, EVEN ) ].desc == 0 )
{
table[ index( i, RX, EVEN ) ].addr = packet->buf;
@ -973,7 +975,8 @@ void usb_isr()
else
{ // receive
packet->len = b->desc >> 16;
if (packet->len > 0) {
if ( packet->len > 0 )
{
packet->index = 0;
packet->next = NULL;
if ( rx_first[ endpoint ] == NULL )
@ -1091,7 +1094,6 @@ void usb_isr()
//serial_print("sleep\n");
USB0_ISTAT = USB_ISTAT_SLEEP;
}
}