mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
Add bracket to switch case, fix warning.
This commit is contained in:
parent
b34724215b
commit
8433f638e6
@ -393,12 +393,12 @@ static uint8_t audiod_get_audio_fct_idx(audiod_function_t * audio);
|
||||
|
||||
#if CFG_TUD_AUDIO_ENABLE_ENCODING || CFG_TUD_AUDIO_ENABLE_DECODING
|
||||
static void audiod_parse_for_AS_params(audiod_function_t* audio, uint8_t const * p_desc, uint8_t const * p_desc_end, uint8_t const as_itf);
|
||||
#endif
|
||||
|
||||
static inline uint8_t tu_desc_subtype(void const* desc)
|
||||
{
|
||||
return ((uint8_t const*) desc)[2];
|
||||
}
|
||||
#endif
|
||||
|
||||
bool tud_audio_n_mounted(uint8_t func_id)
|
||||
{
|
||||
@ -1658,8 +1658,8 @@ static bool audiod_control_complete(uint8_t rhport, tusb_control_request_t const
|
||||
|
||||
switch (p_request->bmRequestType_bit.recipient)
|
||||
{
|
||||
case TUSB_REQ_RCPT_INTERFACE: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
case TUSB_REQ_RCPT_INTERFACE:
|
||||
{
|
||||
uint8_t itf = TU_U16_LOW(p_request->wIndex);
|
||||
uint8_t entityID = TU_U16_HIGH(p_request->wIndex);
|
||||
|
||||
@ -1695,11 +1695,11 @@ static bool audiod_control_complete(uint8_t rhport, tusb_control_request_t const
|
||||
return false; // In case no callback function is present or request can not be conducted we stall it
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case TUSB_REQ_RCPT_ENDPOINT: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
case TUSB_REQ_RCPT_ENDPOINT:
|
||||
{
|
||||
uint8_t ep = TU_U16_LOW(p_request->wIndex);
|
||||
|
||||
if (tud_audio_set_req_ep_cb)
|
||||
@ -1715,7 +1715,8 @@ static bool audiod_control_complete(uint8_t rhport, tusb_control_request_t const
|
||||
TU_LOG2(" No EP set request callback available!\r\n");
|
||||
return false; // In case no callback function is present or request can not be conducted we stall it
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
// Unknown/Unsupported recipient
|
||||
default: TU_BREAKPOINT(); return false;
|
||||
}
|
||||
@ -1754,8 +1755,8 @@ static bool audiod_control_request(uint8_t rhport, tusb_control_request_t const
|
||||
// Conduct checks which depend on the recipient
|
||||
switch (p_request->bmRequestType_bit.recipient)
|
||||
{
|
||||
case TUSB_REQ_RCPT_INTERFACE: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
case TUSB_REQ_RCPT_INTERFACE:
|
||||
{
|
||||
uint8_t entityID = TU_U16_HIGH(p_request->wIndex);
|
||||
|
||||
// Verify if entity is present
|
||||
@ -1797,10 +1798,11 @@ static bool audiod_control_request(uint8_t rhport, tusb_control_request_t const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TUSB_REQ_RCPT_ENDPOINT: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
case TUSB_REQ_RCPT_ENDPOINT:
|
||||
{
|
||||
uint8_t ep = TU_U16_LOW(p_request->wIndex);
|
||||
|
||||
// Find index of audio driver structure and verify EP really exists
|
||||
@ -1819,6 +1821,7 @@ static bool audiod_control_request(uint8_t rhport, tusb_control_request_t const
|
||||
return false; // Stall
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// Unknown/Unsupported recipient
|
||||
@ -1935,8 +1938,8 @@ bool tud_audio_buffer_and_schedule_control_xfer(uint8_t rhport, tusb_control_req
|
||||
// Conduct checks which depend on the recipient
|
||||
switch (p_request->bmRequestType_bit.recipient)
|
||||
{
|
||||
case TUSB_REQ_RCPT_INTERFACE: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
case TUSB_REQ_RCPT_INTERFACE:
|
||||
{
|
||||
uint8_t entityID = TU_U16_HIGH(p_request->wIndex);
|
||||
|
||||
// Verify if entity is present
|
||||
@ -1950,14 +1953,16 @@ bool tud_audio_buffer_and_schedule_control_xfer(uint8_t rhport, tusb_control_req
|
||||
// Find index of audio driver structure and verify interface really exists
|
||||
TU_VERIFY(audiod_verify_itf_exists(itf, &func_id));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TUSB_REQ_RCPT_ENDPOINT: ; // The semicolon is there to enable a declaration right after the label
|
||||
|
||||
{
|
||||
uint8_t ep = TU_U16_LOW(p_request->wIndex);
|
||||
|
||||
// Find index of audio driver structure and verify EP really exists
|
||||
TU_VERIFY(audiod_verify_ep_exists(ep, &func_id));
|
||||
}
|
||||
break;
|
||||
|
||||
// Unknown/Unsupported recipient
|
||||
|
Loading…
x
Reference in New Issue
Block a user