Closed developer-ken closed 1 year ago
onData
should be called when new data is received from host unless tinyusb library again has been changed and this library needs to be updated, but quick check does not indicate any changes.
Maybe I did something wrong. And as I wont keep track of this issue, I will close it.
I‘m porting CMSIS-DAP on an esp32-s2 using this library. After some work, I have a function like this:
DAP_ProcessCommand(uint8_t* rawreq, uint8_t* rawresponse);
It takes
rawreq
, do some work, then put the response intorawresponse
. I think I should start with device/hid/generic demo.What did I do:
And in MyHIDCallbacks, I do:
An LED is connected to pin 1, so write it low should indicates this function called.
What's the problem:
But in OpenOCD, I got:
With out the pin 1 LED lights up which indicates the onData function is never called.
Workaround tried:
I tried to use
dev.avaliable()
,dev.read()
to getuint8_t* rawreq
, and write back rawhidResponse withdev.write()
. But after digging into the code,dev.avaliable()
,dev.read()
does nothing.What I expect:
I need a way to get
uint8_t* rawreq
to callDAP_ProcessCommand(uint8_t* rawreq, uint8_t* rawresponse);
.I didn't find any documentation about this. Did I miss something?