Skip to content

Commit 930c682

Browse files
committed
double cast of pointer to remove error
1 parent 16f1554 commit 930c682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void prepare_setup_packet(uint8_t rhport)
241241

242242
static void edpt_reset(uint8_t rhport, uint8_t ep_id)
243243
{
244-
const uint32_t offset = get_buf_offset((void*)dummy);
244+
const uint32_t offset = get_buf_offset((void*)(uint32_t)dummy);
245245
tu_memclr(&_dcd.ep[ep_id], sizeof(_dcd.ep[ep_id]));
246246
if (_dcd_controller[rhport].max_speed == TUSB_SPEED_FULL )
247247
{
@@ -410,7 +410,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t to
410410
tu_memclr(&_dcd.dma[ep_id], sizeof(xfer_dma_t));
411411
_dcd.dma[ep_id].total_bytes = total_bytes;
412412

413-
prepare_ep_xfer(rhport, ep_id, buffer ? get_buf_offset(buffer) : get_buf_offset((void*)dummy), total_bytes);
413+
prepare_ep_xfer(rhport, ep_id, buffer ? get_buf_offset(buffer) : get_buf_offset((void*)(uint32_t)dummy), total_bytes);
414414

415415
return true;
416416
}

0 commit comments

Comments
 (0)