Hi,
in USB ddk sample code, such as keyb.c, there are some codes like this:
int keyb_io_open( resmgr_context_t *ctp, io_open_t *msg, RESMGR_HANDLE_T *handle, void *extra )
{
keyb_t *keyb;
int status;
keyb = (keyb_t *)handle;
…
}
I don’t know why RESMGR_HANDLE_T *handle can be convert to keyb_t,
I look for RESMGR_HANDLE_T, it is the same as io_funcs_t,
where dose this driver code set handle as keyb_t?
and the same question of keyb_io_read’s ocb->attr .
thank you all !
Leslie