
4 Jul
2012
4 Jul
'12
6:21 p.m.
Dear Lukasz Majewski,
[...]
Now ... this is ubercrazy ... can't this be made without this typecasting voodoo?
The problem is that req->buf is a void pointer. And the goal is to store dfu state at 8 bits.
Sure, but why not make the buffer u8 ?
The req->buf is a member of usb_request defined at gadget.h.
It represents the request from USB. I cannot guarantee, that we will always regard data pointed by buf as u8. For flexibility of gadget usage it is safer to leave it as void pointer.
OK, then it's good :)
[...]
Best regards, Marek Vasut