/* Registers a USB device endpoint callback. 
Registers a callback function which is implemented by the user. */
enum status_code usb_device_endpoint_register_callback(struct usb_module *module_inst, uint8_t ep_num, enum usb_device_endpoint_callback callback_type, usb_device_endpoint_callback_t callback_func)
/* Registers a USB device endpoint callback. 
Registers a callback function which is implemented by the user. */
enum status_code usb_device_endpoint_register_callback(struct usb_module *module_inst, uint8_t ep_num, enum usb_device_endpoint_callback callback_type, usb_device_endpoint_callback_t callback_func)
{
	Assert(module_inst);
	Assert(ep_num < USB_EPT_NUM);
	Assert(callback_func);
	module_inst->device_endpoint_callback[ep_num][callback_type] = callback_func;
	module_inst->device_endpoint_registered_callback_mask[ep_num] |= _usb_endpoint_irq_bits[callback_type];
	return STATUS_OK;
}