/* handle a request by calling one of the installed request handlers 
Local function to handle a request by calling one of the installed request handlers. In case of data going from host to device, the data is at *ppbData. In case of data going from device to host, the handler can either choose to write its data at *ppbData or update the data pointer. */
static bool usb_handle_request(struct usb_setup_packet *setup, int32_t *len, uint8_t **data)
/* handle a request by calling one of the installed request handlers 
Local function to handle a request by calling one of the installed request handlers. In case of data going from host to device, the data is at *ppbData. In case of data going from device to host, the handler can either choose to write its data at *ppbData or update the data pointer. */
static bool usb_handle_request(struct usb_setup_packet *setup, int32_t *len, uint8_t **data)
{
	uint32_t type = setup->RequestType.type;
	usb_request_handler handler;
	if (type >= MAX_NUM_REQ_HANDLERS) {
		LOG_DBG("Error Incorrect iType %d", type);
		return false;
	}
	handler = usb_dev.req_handlers[type];
	if (handler == NULL) {
		LOG_DBG("No handler for reqtype %d", type);
		return false;
	}
	if ((*handler)(setup, len, data) < 0) {
		LOG_DBG("Handler Error %d", type);
		usb_print_setup(setup);
		return false;
	}
	return true;
}