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)
This commit is contained in:
Ha Thach
2024-11-27 18:28:12 +07:00
committed by GitHub
parent 2732aff7dd
commit dbc2c8d972
18 changed files with 54 additions and 48 deletions

View File

@@ -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) {

View File

@@ -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;
//--------------------------------------------------------------------+

View File

@@ -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;

View File

@@ -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();

View File

@@ -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