Skip to content

Commit 54250d7

Browse files
committed
USBTMC: explicit type conversions fix
1 parent c675deb commit 54250d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/class/usbtmc/usbtmc_device.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,23 +603,23 @@ bool usbtmcd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request
603603
if(ep_addr == usbtmc_state.ep_bulk_out)
604604
{
605605
criticalEnter();
606-
usbd_edpt_stall(rhport, ep_addr);
607-
usbd_edpt_clear_stall(rhport, ep_addr);
606+
usbd_edpt_stall(rhport, (uint8_t)ep_addr);
607+
usbd_edpt_clear_stall(rhport, (uint8_t)ep_addr);
608608
usbtmc_state.state = STATE_NAK; // USBD core has placed EP in NAK state for us
609609
criticalLeave();
610610
tud_usbtmc_bulkOut_clearFeature_cb();
611611
}
612612
else if (ep_addr == usbtmc_state.ep_bulk_in)
613613
{
614-
usbd_edpt_stall(rhport, ep_addr);
615-
usbd_edpt_clear_stall(rhport, ep_addr);
614+
usbd_edpt_stall(rhport, (uint8_t)ep_addr);
615+
usbd_edpt_clear_stall(rhport, (uint8_t)ep_addr);
616616
tud_usbtmc_bulkIn_clearFeature_cb();
617617
}
618618
else if ((usbtmc_state.ep_int_in != 0) && (ep_addr == usbtmc_state.ep_int_in))
619619
{
620620
// Clearing interrupt in EP
621-
usbd_edpt_stall(rhport, ep_addr);
622-
usbd_edpt_clear_stall(rhport, ep_addr);
621+
usbd_edpt_stall(rhport, (uint8_t)ep_addr);
622+
usbd_edpt_clear_stall(rhport, (uint8_t)ep_addr);
623623
}
624624
else
625625
{

0 commit comments

Comments
 (0)