Skip to content

Commit

Permalink
back to working state
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed Nov 19, 2023
1 parent 718584d commit 5ecd811
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
#define STALL_EP0() \
do { IN0_SET_STALL; OUT0_SET_STALL; } while(0)

#define IEP0CNT_CLR { IEP0CNT &= ~0x0f; }
#define IEP0CNT_SET(COUNT) { IEP0CNT_CLR; IEP0CNT |= COUNT; }
#define IEP0CNT_CLR \
do { IEP0CNT &= ~0x0f; } while(0)
#define IEP0CNT_SET(COUNT) \
do { IEP0CNT_CLR; IEP0CNT |= COUNT; } while (0)

enum {
REPORT_ID_ACPI = 0x01,
Expand Down Expand Up @@ -357,10 +359,10 @@ uint16_t ep0_xfer_bytes_left;
uint8_t *ep0_xfer_src;

// TODO: remove
uint8_t __xdata usb_rx_data[8];
uint8_t __xdata *buffer_addr;
__bit device_remote_wakeup_f;
uint8_t __xdata configution_value;
volatile uint8_t __xdata usb_rx_data[8];
volatile uint8_t __xdata *buffer_addr;
volatile __bit device_remote_wakeup_f;
volatile uint8_t __xdata configution_value;

uint8_t __xdata EP1_IDLE_TIME;
uint8_t __xdata EP1_IDLE_COUNT;
Expand Down Expand Up @@ -423,7 +425,7 @@ static void usb_setup_irq()
STALL_EP0();
return;
}

break;
case (USB_DEVICE_TO_HOST | USB_STANDARD | USB_DEVICE):
switch (request) {
case USB_GET_STATUS:
Expand Down

0 comments on commit 5ecd811

Please sign in to comment.