Example #1
0
static int usb_standard_endpoint_get_status(struct usb_setup_data *req,
					    u8 **buf, u16 *len)
{
	(void)req;

	if (*len > 2)
		*len = 2;
	(*buf)[0] = usbd_ep_stall_get(req->wIndex) ? 1 : 0;
	(*buf)[1] = 0;

	return 1;
}
Example #2
0
static int usb_standard_endpoint_get_status(usbd_device *usbd_dev,
					    struct usb_setup_data *req,
					    uint8_t **buf, uint16_t *len)
{
	(void)req;

	if (*len > 2) {
		*len = 2;
	}
	(*buf)[0] = usbd_ep_stall_get(usbd_dev, req->wIndex) ? 1 : 0;
	(*buf)[1] = 0;

	return 1;
}