typedef struct {
USBDevice dev;
+ USBEndpoint *intr;
uint8_t recv_buf[RECV_BUF];
uint16_t recv_ptr;
uint16_t recv_used;
{
.bNumInterfaces = 1,
.bConfigurationValue = 1,
- .bmAttributes = USB_CFG_ATT_ONE,
+ .bmAttributes = USB_CFG_ATT_ONE | USB_CFG_ATT_WAKEUP,
.bMaxPower = 50,
.nif = 1,
.ifs = &desc_iface0,
memcpy(s->recv_buf + start, buf, size);
}
s->recv_used += size;
+
+ usb_wakeup(s->intr, 0);
}
static void usb_serial_event(void *opaque, QEMUChrEvent event)
if (qemu_chr_fe_backend_open(&s->cs) && !dev->attached) {
usb_device_attach(dev, &error_abort);
}
+ s->intr = usb_ep_get(dev, USB_TOKEN_IN, 1);
}
static USBDevice *usb_braille_init(USBBus *bus, const char *unused)