[riot-notifications] [RIOT-OS/RIOT] usbus: Add automated test (#12267)

Koen Zandberg notifications at github.com
Wed Sep 18 11:51:50 CEST 2019


bergzand commented on this pull request.



> @@ -213,21 +212,19 @@ static int _recv_dev_setup(usbus_t *usbus, usb_setup_t *pkt)
             case USB_SETUP_REQ_SET_ADDRESS:
                 DEBUG("usbus_control: Setting address\n");
                 usbus->addr = (uint8_t)pkt->value;
-                res = 0;
+                res = 1;

This must follow the same return codes from the `control_handler` function:
 - Negative on error, results in USB stall
 - Zero when it is not handled, results in an USB nack if nothing handles the request
 - Positive for the length, which is useful for USB IN transactions, but doesn't really mean anything for OUT transactions where the host decides the amount of data.

This last case could be documented a bit better for OUT transactions

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12267#discussion_r325584193
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190918/e931d2dd/attachment.htm>


More information about the notifications mailing list