remove unused comments
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#include "usbd_core.h"
|
||||
#include "usb_ch32_usbfs_reg.h"
|
||||
|
||||
#ifndef USBD_IRQHandler
|
||||
#define USBD_IRQHandler OTG_FS_IRQHandler //use actual usb irq name instead
|
||||
#endif
|
||||
|
||||
#ifndef USB_NUM_BIDIR_ENDPOINTS
|
||||
#define USB_NUM_BIDIR_ENDPOINTS 8
|
||||
#endif
|
||||
@@ -33,7 +37,7 @@ __attribute__((aligned(4))) uint8_t EP5_DatabufHD[64 + 64]; //ep5_out(64)+ep5_in
|
||||
__attribute__((aligned(4))) uint8_t EP6_DatabufHD[64 + 64]; //ep6_out(64)+ep6_in(64)
|
||||
__attribute__((aligned(4))) uint8_t EP7_DatabufHD[64 + 64]; //ep7_out(64)+ep7_in(64)
|
||||
|
||||
void OTG_FS_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void USBD_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
||||
volatile uint8_t mps_over_flag = 0;
|
||||
|
||||
@@ -435,14 +439,7 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn OTG_FS_IRQHandler
|
||||
*
|
||||
* @brief This function handles OTG_FS exception.
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
void OTG_FS_IRQHandler(void)
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint8_t intflag = 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#include "usbd_core.h"
|
||||
#include "usb_ch32_usbhs_reg.h"
|
||||
|
||||
#ifndef USBD_IRQHandler
|
||||
#define USBD_IRQHandler USBHS_IRQHandler //use actual usb irq name instead
|
||||
#endif
|
||||
|
||||
#ifndef USB_NUM_BIDIR_ENDPOINTS
|
||||
#define USB_NUM_BIDIR_ENDPOINTS 8
|
||||
#endif
|
||||
@@ -33,7 +37,7 @@ __attribute__ ((aligned(4))) uint8_t EP2_DatabufHD[512+512]; //ep2_out(64)+ep2_
|
||||
void USBHS_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
||||
volatile uint8_t mps_over_flag = 0;
|
||||
volatile uint8_t USBHS_Dev_Endp0_Tog = 0x01; /* USB2.0高速设备端点0同步标志 */
|
||||
volatile uint8_t USBHS_Dev_Endp0_Tog = 0x01; /* USB2.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD>˵<EFBFBD>0ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
|
||||
|
||||
__WEAK void usb_dc_low_level_init(void)
|
||||
{
|
||||
@@ -380,14 +384,7 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn USBHS_IRQHandler
|
||||
*
|
||||
* @brief This function handles OTG_FS exception.
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
void USBHS_IRQHandler(void)
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint32_t end_num, rx_token;
|
||||
uint8_t intflag = 0;
|
||||
@@ -411,7 +408,7 @@ void USBHS_IRQHandler(void)
|
||||
} else if (end_num == 1) {
|
||||
if (rx_token == PID_IN) {
|
||||
//USBHS_Endp1_Up_Flag = 0x00;
|
||||
/* 默认回NAK */
|
||||
/* Ĭ<EFBFBD>ϻ<EFBFBD>NAK */
|
||||
USBHS_DEVICE->UEP1_TX_CTRL = (USBHS_DEVICE->UEP1_TX_CTRL & ~(USBHS_EP_T_RES_MASK | USBHS_EP_T_TOG_MASK)) | USBHS_EP_T_RES_NAK | USBHS_EP_T_TOG_0;
|
||||
} else if (rx_token == PID_OUT) {
|
||||
}
|
||||
|
||||
@@ -309,11 +309,6 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint16_t wIstr, wEPVal;
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#include "usbd_core.h"
|
||||
#include "usb_mm32_reg.h"
|
||||
|
||||
#ifndef USBD_IRQHandler
|
||||
#define USBD_IRQHandler USB_HP_CAN1_TX_IRQHandler //use actual usb irq name instead
|
||||
#endif
|
||||
|
||||
#ifndef USB_NUM_BIDIR_ENDPOINTS
|
||||
#define USB_NUM_BIDIR_ENDPOINTS 5
|
||||
#endif
|
||||
|
||||
#define USB_GET_EPX_INT_STATE(ep_idx) (*(volatile uint32_t *)(&USB->rEP1_INT_STATE + (ep_idx - 1)))
|
||||
#define USB_SET_EPX_INT_STATE(ep_idx, val) (*(volatile uint32_t *)(&USB->rEP1_INT_STATE + (ep_idx - 1)) = val)
|
||||
#define USB_SET_EP_INT(ep_idx, val) (*(volatile uint32_t *)(&USB->rEP1_INT_EN + (ep_idx - 1)) = val)
|
||||
@@ -10,14 +18,6 @@
|
||||
#define USB_GET_EP_FIFO(ep_idx) (*(volatile uint32_t *)(&USB->rEP0_FIFO + ep_idx))
|
||||
#define USB_SET_EP_FIFO(ep_idx, val) (*(volatile uint32_t *)(&USB->rEP0_FIFO + ep_idx) = val)
|
||||
|
||||
#ifndef USBD_IRQHandler
|
||||
#define USBD_IRQHandler USB_HP_CAN1_TX_IRQHandler //use actual usb irq name instead
|
||||
#endif
|
||||
|
||||
#ifndef USB_NUM_BIDIR_ENDPOINTS
|
||||
#define USB_NUM_BIDIR_ENDPOINTS 5
|
||||
#endif
|
||||
|
||||
/* Endpoint state */
|
||||
struct usb_dc_ep_state {
|
||||
/** Endpoint max packet size */
|
||||
@@ -204,11 +204,6 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint32_t int_status;
|
||||
|
||||
@@ -524,11 +524,7 @@ static void handle_ep0(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint32_t is;
|
||||
|
||||
@@ -314,11 +314,6 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
volatile uint32_t IrqStL, IrqSt;
|
||||
|
||||
@@ -509,11 +509,6 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
USB_OTG_GlobalTypeDef *USBx = usb_dc_cfg.Instance;
|
||||
|
||||
@@ -129,11 +129,6 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles PCD interrupt request.
|
||||
* @param hpcd PCD handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user