diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-06 18:19:33 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-06 18:23:04 +0000 |
commit | 03486e52a2dde8ade759f36fea8b403b6524451c (patch) | |
tree | dc54d6ff9797340d83e159b596fd80cc1f2826c6 /app/cdcacm.c | |
parent | f519bbe55f6917d86af6bb4946dfef073175d8f3 (diff) | |
download | clock-03486e52a2dde8ade759f36fea8b403b6524451c.tar.gz clock-03486e52a2dde8ade759f36fea8b403b6524451c.tar.bz2 clock-03486e52a2dde8ade759f36fea8b403b6524451c.zip |
pull a new libopencm3 in the hope it fixes tim's usb problems
Diffstat (limited to 'app/cdcacm.c')
-rw-r--r-- | app/cdcacm.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/app/cdcacm.c b/app/cdcacm.c index af45ac6..5327c0a 100644 --- a/app/cdcacm.c +++ b/app/cdcacm.c @@ -122,35 +122,36 @@ const struct usb_iface_assoc_descriptor cdc_iface_assoc = { -int cdcacm_control_request (usbd_device *usbd_dev, - struct usb_setup_data *req, - uint8_t **buf, - uint16_t *len, - usbd_control_complete_callback *complete) -{ +enum usbd_request_return_codes +cdcacm_control_request (usbd_device *usbd_dev, + struct usb_setup_data *req, + uint8_t **buf, + uint16_t *len, + usbd_control_complete_callback *complete) { (void) complete; (void) buf; (void) usbd_dev; - switch (req->bRequest) { + switch (req->bRequest) + { case USB_CDC_REQ_SET_CONTROL_LINE_STATE: { /* * This Linux cdc_acm driver requires this to be implemented * 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_NEXT_CALLBACK; } |