void * param)
{
if (v & 0x80)
- printf("Activate address %d\n", v & 0x7f);
+ AVR_LOG(avr, LOG_TRACE, "USB: Activate address %d\n", v & 0x7f);
avr_core_watch_write(avr, addr, v);
}
if (curstate->stalledi & !newstate->stalledi)
curstate->stalledi = 0;
if (curstate->rwal & !newstate->rwal)
- printf("pointless change of ueintx.rwal\n");
+ AVR_LOG(avr, LOG_WARNING, "USB: Pointless change of ueintx.rwal\n");
if ((curstate->v & 0xdf) == 0)
avr->data[p->r_usbcon + ueint] &= 0xff ^ (1 << ep); // mark ep0 interrupt
return AVR_IOCTL_USB_STALL;
}
if (ep && !epstate->uecfg0x.epdir)
- printf("Reading from IN endpoint from host??\n");
+ AVR_LOG(io->avr, LOG_WARNING, "USB: Reading from IN endpoint from host??\n");
ret = ep_fifo_usb_read(epstate, d->buf);
if (ret < 0) {
epstate = get_epstate(p, ep);
if (ep && epstate->uecfg0x.epdir)
- printf("Writing to IN endpoint from host??\n");
+ AVR_LOG(io->avr, LOG_WARNING, "USB: Writing to IN endpoint from host??\n");
if (epstate->ueconx.stallrq) {
raise_ep_interrupt(io->avr, p, 0, stalledi);
return 0;
case AVR_IOCTL_USB_RESET:
- printf("__USB_RESET__\n");
+ AVR_LOG(io->avr, LOG_TRACE, "USB: __USB_RESET__\n");
reset_endpoints(io->avr, p);
raise_usb_interrupt(p, eorsti);
if (0)
p->io.avr->data[p->r_usbcon] = 0x20;
p->io.avr->data[p->r_usbcon + udcon] = 1;
- printf("%s\n", __FUNCTION__);
+ AVR_LOG(io->avr, LOG_TRACE, "USB: %s\n", __FUNCTION__);
}
static const char * irq_names[USB_IRQ_COUNT] = {