update: add USBH_IRQHandler & USBD_IRQHandler function declaration
Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
@@ -136,7 +136,7 @@ int usbd_ep_start_write(uint8_t busid, const uint8_t ep, const uint8_t *data, ui
|
|||||||
*/
|
*/
|
||||||
int usbd_ep_start_read(uint8_t busid, const uint8_t ep, uint8_t *data, uint32_t data_len);
|
int usbd_ep_start_read(uint8_t busid, const uint8_t ep, uint8_t *data, uint32_t data_len);
|
||||||
|
|
||||||
/* usb dcd irq callback */
|
/* usb dcd irq callback, called by user */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Usb connect irq callback.
|
* @brief Usb connect irq callback.
|
||||||
@@ -194,6 +194,9 @@ void usbd_event_ep_out_complete_handler(uint8_t busid, uint8_t ep, uint32_t nbyt
|
|||||||
void usbd_execute_test_mode(uint8_t busid, uint8_t test_mode);
|
void usbd_execute_test_mode(uint8_t busid, uint8_t test_mode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* called by user */
|
||||||
|
void USBD_IRQHandler(uint8_t busid);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ int usbh_submit_urb(struct usbh_urb *urb);
|
|||||||
*/
|
*/
|
||||||
int usbh_kill_urb(struct usbh_urb *urb);
|
int usbh_kill_urb(struct usbh_urb *urb);
|
||||||
|
|
||||||
|
/* called by user */
|
||||||
|
void USBH_IRQHandler(uint8_t busid);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
#include "usbd_core.h"
|
#include "usbd_core.h"
|
||||||
|
|
||||||
#ifndef USBD_IRQHandler
|
|
||||||
#define USBD_IRQHandler USBD_IRQHandler
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef USB_NUM_BIDIR_ENDPOINTS
|
|
||||||
#define USB_NUM_BIDIR_ENDPOINTS 5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Endpoint state */
|
/* Endpoint state */
|
||||||
struct usb_dc_ep_state {
|
struct usb_dc_ep_state {
|
||||||
uint16_t ep_mps; /* Endpoint max packet size */
|
uint16_t ep_mps; /* Endpoint max packet size */
|
||||||
@@ -21,8 +13,8 @@ struct usb_dc_ep_state {
|
|||||||
/* Driver state */
|
/* Driver state */
|
||||||
struct xxx_udc {
|
struct xxx_udc {
|
||||||
volatile uint8_t dev_addr;
|
volatile uint8_t dev_addr;
|
||||||
struct usb_dc_ep_state in_ep[USB_NUM_BIDIR_ENDPOINTS]; /*!< IN endpoint parameters*/
|
struct usb_dc_ep_state in_ep[CONFIG_USBDEV_EP_NUM]; /*!< IN endpoint parameters*/
|
||||||
struct usb_dc_ep_state out_ep[USB_NUM_BIDIR_ENDPOINTS]; /*!< OUT endpoint parameters */
|
struct usb_dc_ep_state out_ep[CONFIG_USBDEV_EP_NUM]; /*!< OUT endpoint parameters */
|
||||||
} g_xxx_udc;
|
} g_xxx_udc;
|
||||||
|
|
||||||
__WEAK void usb_dc_low_level_init(void)
|
__WEAK void usb_dc_low_level_init(void)
|
||||||
@@ -121,6 +113,6 @@ int usbd_ep_start_read(uint8_t busid, const uint8_t ep, uint8_t *data, uint32_t
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USBD_IRQHandler(void)
|
void USBD_IRQHandler(uint8_t busid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -7,14 +7,6 @@
|
|||||||
#include "usbh_hub.h"
|
#include "usbh_hub.h"
|
||||||
#include "usb_xxx_reg.h"
|
#include "usb_xxx_reg.h"
|
||||||
|
|
||||||
#ifndef USBH_IRQHandler
|
|
||||||
#define USBH_IRQHandler OTG_HS_IRQHandler
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef USB_BASE
|
|
||||||
#define USB_BASE (0x40040000UL)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct dwc2_pipe {
|
struct dwc2_pipe {
|
||||||
bool inuse;
|
bool inuse;
|
||||||
uint32_t xfrd;
|
uint32_t xfrd;
|
||||||
@@ -300,6 +292,6 @@ static inline void dwc2_urb_waitup(struct usbh_urb *urb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void USBH_IRQHandler(void)
|
void USBH_IRQHandler(uint8_t busid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user