update usb enum return codes

Should have been fixed in commit 85be1e5e7b when we updated the library, but was... missed.
travis caught it after the fact at least.
This commit is contained in:
Karl Palsson
2018-03-04 13:57:29 +00:00
parent a4eec6026b
commit 301b4f9194
16 changed files with 89 additions and 93 deletions

View File

@@ -167,7 +167,7 @@ static const char * usb_strings[] = {
/* Buffer to be used for control requests. */
uint8_t usbd_control_buffer[128];
static int cdcacm_control_request(usbd_device *usbd_dev,
static enum usbd_request_return_codes cdcacm_control_request(usbd_device *usbd_dev,
struct usb_setup_data *req, uint8_t **buf, uint16_t *len,
void (**complete)(usbd_device *usbd_dev, struct usb_setup_data *req))
{
@@ -182,16 +182,16 @@ static int cdcacm_control_request(usbd_device *usbd_dev,
* even though it's optional in the CDC spec, and we don't
* advertise it in the ACM functional descriptor.
*/
return 1;
return USBD_REQ_HANDLED;
}
case USB_CDC_REQ_SET_LINE_CODING:
if (*len < sizeof(struct usb_cdc_line_coding)) {
return 0;
return USBD_REQ_NOTSUPP;
}
return 1;
return USBD_REQ_HANDLED;
}
return 0;
return USBD_REQ_NOTSUPP;
}
static void cdcacm_data_rx_cb(usbd_device *usbd_dev, uint8_t ep)