usb: Special return values for custom_handler

This commit introduces dedicated return type for custom_handler.
Relevant code is updated to fulfill the API documentation.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
Emil Obalski 2020-05-06 15:55:35 +02:00 committed by Carles Cufí
commit 45bdb23005
5 changed files with 14 additions and 12 deletions

View file

@ -157,6 +157,10 @@ struct usb_interface_cfg_data {
* The custom request handler gets a first chance at handling
* the request before it is handed over to the 'chapter 9' request
* handler.
* return 0 on success, -EINVAL if the request has not been handled by
* the custom handler and instead needs to be handled by the
* core USB stack. Any other error code to denote failure within
* the custom handler.
*/
usb_request_handler custom_handler;
};