usb: prevent registering duplicate config callbacks
Originally discussed at https://github.com/libopencm3/libopencm3/pull/722
This commit is contained in:
@@ -139,7 +139,8 @@ extern int usbd_register_control_callback(usbd_device *usbd_dev, uint8_t type,
|
||||
|
||||
/* <usb_standard.c> */
|
||||
/** Registers a "Set Config" callback
|
||||
* @return 0 if successful
|
||||
* @return 0 if successful or already existed.
|
||||
* @return -1 if no more space was available for callbacks.
|
||||
*/
|
||||
extern int usbd_register_set_config_callback(usbd_device *usbd_dev,
|
||||
usbd_set_config_callback callback);
|
||||
|
||||
Reference in New Issue
Block a user