Skip to content

Commit 5ecd811

Browse files
committed
back to working state
1 parent 718584d commit 5ecd811

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/usb.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@
6868
#define STALL_EP0() \
6969
do { IN0_SET_STALL; OUT0_SET_STALL; } while(0)
7070

71-
#define IEP0CNT_CLR { IEP0CNT &= ~0x0f; }
72-
#define IEP0CNT_SET(COUNT) { IEP0CNT_CLR; IEP0CNT |= COUNT; }
71+
#define IEP0CNT_CLR \
72+
do { IEP0CNT &= ~0x0f; } while(0)
73+
#define IEP0CNT_SET(COUNT) \
74+
do { IEP0CNT_CLR; IEP0CNT |= COUNT; } while (0)
7375

7476
enum {
7577
REPORT_ID_ACPI = 0x01,
@@ -357,10 +359,10 @@ uint16_t ep0_xfer_bytes_left;
357359
uint8_t *ep0_xfer_src;
358360

359361
// TODO: remove
360-
uint8_t __xdata usb_rx_data[8];
361-
uint8_t __xdata *buffer_addr;
362-
__bit device_remote_wakeup_f;
363-
uint8_t __xdata configution_value;
362+
volatile uint8_t __xdata usb_rx_data[8];
363+
volatile uint8_t __xdata *buffer_addr;
364+
volatile __bit device_remote_wakeup_f;
365+
volatile uint8_t __xdata configution_value;
364366

365367
uint8_t __xdata EP1_IDLE_TIME;
366368
uint8_t __xdata EP1_IDLE_COUNT;
@@ -423,7 +425,7 @@ static void usb_setup_irq()
423425
STALL_EP0();
424426
return;
425427
}
426-
428+
break;
427429
case (USB_DEVICE_TO_HOST | USB_STANDARD | USB_DEVICE):
428430
switch (request) {
429431
case USB_GET_STATUS:

0 commit comments

Comments
 (0)