1 /* 2 * Copyright (c) 2015-2019 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief WebUSB enabled custom class driver header file 10 * 11 * Header file for WebUSB enabled custom class driver 12 */ 13 14 #ifndef __WEBUSB_SERIAL_H__ 15 #define __WEBUSB_SERIAL_H__ 16 17 /** 18 * WebUSB request handlers 19 */ 20 struct webusb_req_handlers { 21 /* Handler for WebUSB Vendor specific commands */ 22 usb_request_handler vendor_handler; 23 /** 24 * The custom request handler gets a first chance at handling 25 * the request before it is handed over to the 'chapter 9' request 26 * handler 27 */ 28 usb_request_handler custom_handler; 29 }; 30 31 /** 32 * @brief Register Custom and Vendor request callbacks 33 * 34 * Function to register Custom and Vendor request callbacks 35 * for handling requests. 36 * 37 * @param [in] handlers Pointer to WebUSB request handlers structure 38 */ 39 void webusb_register_request_handlers(struct webusb_req_handlers *handlers); 40 41 #endif /* __WEBUSB_SERIAL_H__ */ 42