STM32: USB: handle both input and output requests in the event handler callback