Hi,

> +#ifdef DEBUG_CANOKEY
> +#define DPRINTF(fmt, ...) \
> +do { printf("canokey: " fmt "\n", ## __VA_ARGS__); } while (0)

Better use tracepoints instead (see docs/devel/tracing.rst).

> +int canokey_emu_transmit(
> +        void *base, uint8_t ep, const uint8_t *pbuf, uint16_t size)
> +{
> +    DPRINTF("transmit ep %d size %d", ep, size);
> +    DPRINTF_DATA(pbuf, size, "transmit");

Did you know all usb devices have a pcap property for writing out usb
packet traces?  i.e. use '-device canokey,pcap=test.pcap', then look
at the traces using wireshark.

take care,
  Gerd


Reply via email to