From 930c68278c3825bce91ef324090d25c392844558 Mon Sep 17 00:00:00 2001 From: tswan-quasi Date: Wed, 12 Oct 2022 11:16:35 -0400 Subject: [PATCH] double cast of pointer to remove error --- src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c b/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c index b0ddebad..7220654e 100644 --- a/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c +++ b/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c @@ -241,7 +241,7 @@ static void prepare_setup_packet(uint8_t rhport) static void edpt_reset(uint8_t rhport, uint8_t ep_id) { - const uint32_t offset = get_buf_offset((void*)dummy); + const uint32_t offset = get_buf_offset((void*)(uint32_t)dummy); tu_memclr(&_dcd.ep[ep_id], sizeof(_dcd.ep[ep_id])); if (_dcd_controller[rhport].max_speed == TUSB_SPEED_FULL ) { @@ -410,7 +410,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t to tu_memclr(&_dcd.dma[ep_id], sizeof(xfer_dma_t)); _dcd.dma[ep_id].total_bytes = total_bytes; - prepare_ep_xfer(rhport, ep_id, buffer ? get_buf_offset(buffer) : get_buf_offset((void*)dummy), total_bytes); + prepare_ep_xfer(rhport, ep_id, buffer ? get_buf_offset(buffer) : get_buf_offset((void*)(uint32_t)dummy), total_bytes); return true; }