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