summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-11-27 18:28:12 +0700
committerGitHub <[email protected]>2024-11-27 18:28:12 +0700
commitdbc2c8d9720593ce4b0bbd0c96b3b91f81ce15bb (patch)
tree628fefa4b1ef471c7cbf109c3dca62563729259f /src/class
parent2732aff7dd328a9f86c990afd7a71df48ae47391 (diff)
Fix missing protoype warning, change TUD_EPBUF_TYPE_DEF order (#2889)
* change TUD_EPBUF_TYPE_DEF order * add and fix -Wmissing-prototypes warnings for cmake (skip make)
Diffstat (limited to 'src/class')
-rw-r--r--src/class/audio/audio_device.c2
-rwxr-xr-xsrc/class/bth/bth_device.c2
-rw-r--r--src/class/net/ncm_device.c8
-rw-r--r--src/class/usbtmc/usbtmc_device.c2
-rw-r--r--src/class/video/video_device.h2
5 files changed, 9 insertions, 7 deletions
diff --git a/src/class/audio/audio_device.c b/src/class/audio/audio_device.c
index 66430feab..cd4183cc3 100644
--- a/src/class/audio/audio_device.c
+++ b/src/class/audio/audio_device.c
@@ -490,13 +490,13 @@ TU_ATTR_WEAK bool tud_audio_feedback_format_correction_cb(uint8_t func_id) {
(void) func_id;
return CFG_TUD_AUDIO_ENABLE_FEEDBACK_FORMAT_CORRECTION;
}
-#endif
TU_ATTR_WEAK TU_ATTR_FAST_FUNC void tud_audio_feedback_interval_isr(uint8_t func_id, uint32_t frame_number, uint8_t interval_shift) {
(void) func_id;
(void) frame_number;
(void) interval_shift;
}
+#endif
#if CFG_TUD_AUDIO_ENABLE_INTERRUPT_EP
TU_ATTR_WEAK void tud_audio_int_done_cb(uint8_t rhport) {
diff --git a/src/class/bth/bth_device.c b/src/class/bth/bth_device.c
index 5e533cf35..45cbf2d98 100755
--- a/src/class/bth/bth_device.c
+++ b/src/class/bth/bth_device.c
@@ -52,7 +52,7 @@ typedef struct {
typedef struct {
TUD_EPBUF_DEF(epout_buf, CFG_TUD_BTH_DATA_EPSIZE);
- TUD_EPBUF_TYPE_DEF(hci_cmd, bt_hci_cmd_t);
+ TUD_EPBUF_TYPE_DEF(bt_hci_cmd_t, hci_cmd);
} btd_epbuf_t;
//--------------------------------------------------------------------+
diff --git a/src/class/net/ncm_device.c b/src/class/net/ncm_device.c
index c97c66a4e..4e6088340 100644
--- a/src/class/net/ncm_device.c
+++ b/src/class/net/ncm_device.c
@@ -118,14 +118,14 @@ typedef struct {
typedef struct {
struct {
- TUD_EPBUF_TYPE_DEF(ntb, recv_ntb_t);
+ TUD_EPBUF_TYPE_DEF(recv_ntb_t, ntb);
} recv[RECV_NTB_N];
struct {
- TUD_EPBUF_TYPE_DEF(ntb, xmit_ntb_t);
+ TUD_EPBUF_TYPE_DEF(xmit_ntb_t, ntb);
} xmit[XMIT_NTB_N];
- TUD_EPBUF_TYPE_DEF(epnotif, ncm_notify_t);
+ TUD_EPBUF_TYPE_DEF(ncm_notify_t, epnotif);
} ncm_epbuf_t;
static ncm_interface_t ncm_interface;
@@ -748,7 +748,7 @@ void tud_network_recv_renew(void) {
/**
* Same as tud_network_recv_renew() but knows \a rhport
*/
-void tud_network_recv_renew_r(uint8_t rhport) {
+static void tud_network_recv_renew_r(uint8_t rhport) {
TU_LOG_DRV("tud_network_recv_renew_r(%d)\n", rhport);
ncm_interface.rhport = rhport;
diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c
index 37634c38e..abde9679f 100644
--- a/src/class/usbtmc/usbtmc_device.c
+++ b/src/class/usbtmc/usbtmc_device.c
@@ -180,7 +180,7 @@ osal_mutex_t usbtmcLock;
#define criticalEnter() do { (void) osal_mutex_lock(usbtmcLock,OSAL_TIMEOUT_WAIT_FOREVER); } while (0)
#define criticalLeave() do { (void) osal_mutex_unlock(usbtmcLock); } while (0)
-bool atomicChangeState(usbtmcd_state_enum expectedState, usbtmcd_state_enum newState)
+static bool atomicChangeState(usbtmcd_state_enum expectedState, usbtmcd_state_enum newState)
{
bool ret = true;
criticalEnter();
diff --git a/src/class/video/video_device.h b/src/class/video/video_device.h
index 92930c013..648a221d5 100644
--- a/src/class/video/video_device.h
+++ b/src/class/video/video_device.h
@@ -40,6 +40,8 @@ extern "C" {
// CFG_TUD_VIDEO > 1
//--------------------------------------------------------------------+
+bool tud_video_n_connected(uint_fast8_t ctl_idx);
+
/** Return true if streaming
*
* @param[in] ctl_idx Destination control interface index