mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
fix redundant-decls warnings by usbd/usbh
This commit is contained in:
parent
1d6918ce41
commit
0042eccb3b
@ -90,13 +90,13 @@ CFLAGS += \
|
|||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fsingle-precision-constant \
|
-fsingle-precision-constant \
|
||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wstrict-overflow \
|
|
||||||
-Wall \
|
-Wall \
|
||||||
-Wextra \
|
-Wextra \
|
||||||
-Werror \
|
-Werror \
|
||||||
-Wfatal-errors \
|
-Wfatal-errors \
|
||||||
|
-Wdouble-promotion \
|
||||||
|
-Wstrict-prototypes \
|
||||||
|
-Wstrict-overflow \
|
||||||
-Werror-implicit-function-declaration \
|
-Werror-implicit-function-declaration \
|
||||||
-Wfloat-equal \
|
-Wfloat-equal \
|
||||||
-Wundef \
|
-Wundef \
|
||||||
|
@ -16,9 +16,6 @@ CFLAGS += \
|
|||||||
# suppress warning caused by vendor mcu driver
|
# suppress warning caused by vendor mcu driver
|
||||||
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
|
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
|
||||||
|
|
||||||
# warning caused by dcd_nrf5x.c due to include of usbd.h and re-declare of dcd_int_handler()
|
|
||||||
CFLAGS += -Wno-error=redundant-decls
|
|
||||||
|
|
||||||
# All source paths should be relative to the top level.
|
# All source paths should be relative to the top level.
|
||||||
LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld
|
LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#if (CFG_TUD_ENABLED && CFG_TUD_MSC)
|
#if (CFG_TUD_ENABLED && CFG_TUD_MSC)
|
||||||
|
|
||||||
|
#include "device/dcd.h" // for faking dcd_event_xfer_complete
|
||||||
#include "device/usbd.h"
|
#include "device/usbd.h"
|
||||||
#include "device/usbd_pvt.h"
|
#include "device/usbd_pvt.h"
|
||||||
#include "device/dcd.h" // for faking dcd_event_xfer_complete
|
|
||||||
|
|
||||||
#include "msc_device.h"
|
#include "msc_device.h"
|
||||||
|
|
||||||
|
@ -110,14 +110,7 @@ typedef struct TU_ATTR_ALIGNED(4)
|
|||||||
void dcd_init (uint8_t rhport);
|
void dcd_init (uint8_t rhport);
|
||||||
|
|
||||||
// Interrupt Handler
|
// Interrupt Handler
|
||||||
#if __GNUC__ && !defined(__ARMCC_VERSION)
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
|
||||||
#endif
|
|
||||||
void dcd_int_handler(uint8_t rhport);
|
void dcd_int_handler(uint8_t rhport);
|
||||||
#if __GNUC__ && !defined(__ARMCC_VERSION)
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Enable device interrupt
|
// Enable device interrupt
|
||||||
void dcd_int_enable (uint8_t rhport);
|
void dcd_int_enable (uint8_t rhport);
|
||||||
|
@ -28,12 +28,12 @@
|
|||||||
|
|
||||||
#if CFG_TUD_ENABLED
|
#if CFG_TUD_ENABLED
|
||||||
|
|
||||||
|
#include "device/dcd.h"
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
#include "common/tusb_private.h"
|
#include "common/tusb_private.h"
|
||||||
|
|
||||||
#include "device/usbd.h"
|
#include "device/usbd.h"
|
||||||
#include "device/usbd_pvt.h"
|
#include "device/usbd_pvt.h"
|
||||||
#include "device/dcd.h"
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// USBD Configuration
|
// USBD Configuration
|
||||||
|
@ -58,8 +58,11 @@ void tud_task (void)
|
|||||||
// Check if there is pending events need processing by tud_task()
|
// Check if there is pending events need processing by tud_task()
|
||||||
bool tud_task_event_ready(void);
|
bool tud_task_event_ready(void);
|
||||||
|
|
||||||
// Interrupt handler, name alias to DCD
|
#ifndef _TUSB_DCD_H_
|
||||||
extern void dcd_int_handler(uint8_t rhport);
|
extern void dcd_int_handler(uint8_t rhport);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Interrupt handler, name alias to DCD
|
||||||
#define tud_int_handler dcd_int_handler
|
#define tud_int_handler dcd_int_handler
|
||||||
|
|
||||||
// Get current bus speed
|
// Get current bus speed
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#if CFG_TUD_ENABLED
|
#if CFG_TUD_ENABLED
|
||||||
|
|
||||||
|
#include "dcd.h"
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
#include "device/usbd_pvt.h"
|
#include "device/usbd_pvt.h"
|
||||||
#include "dcd.h"
|
|
||||||
|
|
||||||
#if CFG_TUSB_DEBUG >= 2
|
#if CFG_TUSB_DEBUG >= 2
|
||||||
extern void usbd_driver_print_control_complete_name(usbd_control_xfer_cb_t callback);
|
extern void usbd_driver_print_control_complete_name(usbd_control_xfer_cb_t callback);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#if (CFG_TUH_ENABLED && CFG_TUH_HUB)
|
#if (CFG_TUH_ENABLED && CFG_TUH_HUB)
|
||||||
|
|
||||||
|
#include "hcd.h"
|
||||||
#include "usbh.h"
|
#include "usbh.h"
|
||||||
#include "usbh_classdriver.h"
|
#include "usbh_classdriver.h"
|
||||||
#include "hub.h"
|
#include "hub.h"
|
||||||
|
@ -28,10 +28,9 @@
|
|||||||
|
|
||||||
#if CFG_TUH_ENABLED
|
#if CFG_TUH_ENABLED
|
||||||
|
|
||||||
|
#include "host/hcd.h"
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
#include "common/tusb_private.h"
|
#include "common/tusb_private.h"
|
||||||
|
|
||||||
#include "host/usbh.h"
|
|
||||||
#include "host/usbh_classdriver.h"
|
#include "host/usbh_classdriver.h"
|
||||||
#include "hub.h"
|
#include "hub.h"
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/tusb_common.h"
|
#include "common/tusb_common.h"
|
||||||
#include "hcd.h"
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// MACRO CONSTANT TYPEDEF
|
// MACRO CONSTANT TYPEDEF
|
||||||
@ -115,8 +114,11 @@ void tuh_task(void)
|
|||||||
tuh_task_ext(UINT32_MAX, false);
|
tuh_task_ext(UINT32_MAX, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interrupt handler, name alias to HCD
|
#ifndef _TUSB_HCD_H_
|
||||||
extern void hcd_int_handler(uint8_t rhport);
|
extern void hcd_int_handler(uint8_t rhport);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Interrupt handler, name alias to HCD
|
||||||
#define tuh_int_handler hcd_int_handler
|
#define tuh_int_handler hcd_int_handler
|
||||||
|
|
||||||
bool tuh_vid_pid_get(uint8_t daddr, uint16_t* vid, uint16_t* pid);
|
bool tuh_vid_pid_get(uint8_t daddr, uint16_t* vid, uint16_t* pid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user