diff --git a/hiddata.c b/hiddata.c index 4224a18..5005c12 100644 --- a/hiddata.c +++ b/hiddata.c @@ -30,7 +30,7 @@ uint16_t hiddata_get_report(struct usb_request *rq, const uint8_t **dat) *dat = cmdbuf; state = STATE_IDLE; #ifdef DEBUG - printf("hiddata idle, sent %d bytes\r\n", cmdbuf_len); + printf_P(PSTR("hiddata idle, sent %d bytes\r\n"), cmdbuf_len); #endif return cmdbuf_len; } @@ -42,11 +42,11 @@ uint8_t hiddata_set_report(const struct usb_request *rq, const uint8_t *dat, uin { #ifdef DEBUG int i; - printf("Set data %d\n", len); + printf_P(PSTR("Set data %d\n"), len); for (i=0; iwValue>>8); +// printf_P(PSTR("Unhandled descriptor 0x%02x\n"), rq->wValue>>8); unhandled = 1; } break; @@ -332,8 +332,6 @@ static void handleSetupPacket(struct usb_request *rq) // rqlen = g_params->hid_params[rq->wIndex].reportdesc_len; }; - // TODO : Without the delays those two printf add, it - // does not work. A handshake is missing. // printf_P(PSTR("t: %02x, rq: 0x%02x, val: %04x, l: %d\r\n"), rq->bmRequestType, rq->bRequest, rq->wValue, rq->wLength); while(1) @@ -480,9 +478,9 @@ static void handleDataPacket(const struct usb_request *rq, uint8_t *dat, uint16_ printf_P(PSTR("Unhandled control write [%d] : "), len); for (i=0; i