usb: Use always single callback definition
Use one callback type, remove duplicates. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
777347daf1
commit
adf056dc92
3 changed files with 4 additions and 11 deletions
|
@ -54,7 +54,6 @@ struct usb_hid_descriptor {
|
|||
typedef int (*hid_cb_t)(struct usb_setup_packet *setup, s32_t *len,
|
||||
u8_t **data);
|
||||
typedef void (*hid_int_ready_callback)(void);
|
||||
typedef void (*status_cb_t)(enum usb_dc_status_code status, u8_t *param);
|
||||
|
||||
struct hid_ops {
|
||||
hid_cb_t get_report;
|
||||
|
@ -73,7 +72,7 @@ struct hid_ops {
|
|||
#ifdef CONFIG_ENABLE_HID_INT_OUT_EP
|
||||
hid_int_ready_callback int_out_ready;
|
||||
#endif
|
||||
status_cb_t status_cb;
|
||||
usb_dc_status_callback status_cb;
|
||||
};
|
||||
|
||||
/* HID Report Definitions */
|
||||
|
|
|
@ -99,12 +99,6 @@ struct usb_setup_packet {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Callback function signature for the device
|
||||
*/
|
||||
typedef void (*usb_status_callback)(enum usb_dc_status_code status_code,
|
||||
u8_t *param);
|
||||
|
||||
/**
|
||||
* @brief Callback function signature for the USB Endpoint status
|
||||
*/
|
||||
|
@ -201,7 +195,7 @@ struct usb_cfg_data {
|
|||
/** Function for interface runtime configuration */
|
||||
usb_interface_config interface_config;
|
||||
/** Callback to be notified on USB connection status change */
|
||||
usb_status_callback cb_usb_status;
|
||||
usb_dc_status_callback cb_usb_status;
|
||||
/** USB interface (Class) handler and storage space */
|
||||
struct usb_interface_cfg_data interface;
|
||||
/** Number of individual endpoints in the device configuration */
|
||||
|
|
|
@ -149,7 +149,7 @@ static struct usb_dev_priv {
|
|||
/** Installed vendor request handler */
|
||||
usb_request_handler vendor_req_handler;
|
||||
/** USB stack status clalback */
|
||||
usb_status_callback status_callback;
|
||||
usb_dc_status_callback status_callback;
|
||||
/** Pointer to registered descriptors */
|
||||
const u8_t *descriptors;
|
||||
/** Array of installed request handler callbacks */
|
||||
|
@ -880,7 +880,7 @@ static void usb_register_custom_req_handler(usb_request_handler handler)
|
|||
*
|
||||
* @param [in] cb Callback function pointer
|
||||
*/
|
||||
static void usb_register_status_callback(usb_status_callback cb)
|
||||
static void usb_register_status_callback(usb_dc_status_callback cb)
|
||||
{
|
||||
usb_dev.status_callback = cb;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue