Fix build warnings

This commit is contained in:
Puck Meerburg
2026-02-06 18:09:21 +00:00
parent 4eb0c6cdd2
commit 634ebad7cd
6 changed files with 26 additions and 27 deletions

View File

@@ -135,13 +135,13 @@ void usb_init() {
R8_USB_DEV_AD = 0x00;
R8_USB_INT_FG = 0xFF;
R16_UEP0_DMA = ep04_buf;
R16_UEP1_DMA = epbuf + 0 * 128;
R16_UEP2_DMA = epbuf + 1 * 128;
R16_UEP3_DMA = epbuf + 2 * 128;
R16_UEP5_DMA = epbuf + 3 * 128;
R16_UEP6_DMA = epbuf + 4 * 128;
R16_UEP7_DMA = epbuf + 5 * 128;
R16_UEP0_DMA = (uint16_t) (uintptr_t) ep04_buf;
R16_UEP1_DMA = (uint16_t) (uintptr_t) (epbuf + 0 * 128);
R16_UEP2_DMA = (uint16_t) (uintptr_t) (epbuf + 1 * 128);
R16_UEP3_DMA = (uint16_t) (uintptr_t) (epbuf + 2 * 128);
R16_UEP5_DMA = (uint16_t) (uintptr_t) (epbuf + 3 * 128);
R16_UEP6_DMA = (uint16_t) (uintptr_t) (epbuf + 4 * 128);
R16_UEP7_DMA = (uint16_t) (uintptr_t) (epbuf + 5 * 128);
for (int i = 0; i < 8; i++) {
set_endpoint_state(i, USB_EP_STATE_NAK);
@@ -203,7 +203,7 @@ int16_t usb_recv(uint8_t endpoint, void *buffer, size_t buflen) {
recvlens[endpoint] = 0xFF;
memcpy(buffer, buf_for_ep(endpoint, 0), buflen);
memcpy(buffer, (uint8_t *)buf_for_ep(endpoint, 0), buflen);
return buflen;
}
@@ -216,7 +216,7 @@ int16_t usb_xmit(uint8_t endpoint, void *buffer, size_t buflen) {
if (buflen > 64) buflen = 64;
memcpy(buf_for_ep(endpoint, 1), buffer, buflen);
memcpy((uint8_t *)buf_for_ep(endpoint, 1), buffer, buflen);
*ep_t_len_regs[endpoint] = buflen;
set_endpoint_state(endpoint | 0x80, USB_EP_STATE_ACK);