fix uint32_t format with log
This commit is contained in:
parent
778db647c4
commit
1b3d1b52c9
|
@ -421,7 +421,7 @@ void tud_task (void)
|
||||||
uint8_t const epnum = tu_edpt_number(ep_addr);
|
uint8_t const epnum = tu_edpt_number(ep_addr);
|
||||||
uint8_t const ep_dir = tu_edpt_dir(ep_addr);
|
uint8_t const ep_dir = tu_edpt_dir(ep_addr);
|
||||||
|
|
||||||
TU_LOG2(" Endpoint: 0x%02X, Bytes: %lu\r\n", ep_addr, event.xfer_complete.len);
|
TU_LOG2(" Endpoint: 0x%02X, Bytes: %u\r\n", ep_addr, (unsigned int) event.xfer_complete.len);
|
||||||
|
|
||||||
_usbd_dev.ep_status[epnum][ep_dir].busy = false;
|
_usbd_dev.ep_status[epnum][ep_dir].busy = false;
|
||||||
|
|
||||||
|
|
|
@ -96,9 +96,9 @@ void tu_print_mem(void const *buf, uint16_t count, uint8_t indent)
|
||||||
char format[] = "%00lX";
|
char format[] = "%00lX";
|
||||||
format[2] += 2*size;
|
format[2] += 2*size;
|
||||||
|
|
||||||
const uint8_t item_per_line = 16 / size;
|
const uint8_t item_per_line = 16 / size;
|
||||||
|
|
||||||
for(uint32_t i=0; i<count; i++)
|
for(uint16_t i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
uint32_t value=0;
|
uint32_t value=0;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void tu_print_mem(void const *buf, uint16_t count, uint8_t indent)
|
||||||
for(uint8_t s=0; s < indent; s++) tu_printf(" ");
|
for(uint8_t s=0; s < indent; s++) tu_printf(" ");
|
||||||
|
|
||||||
// print offset or absolute address
|
// print offset or absolute address
|
||||||
tu_printf("%03lX: ", 16*i/item_per_line);
|
tu_printf("%03X: ", 16*i/item_per_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&value, buf8, size);
|
memcpy(&value, buf8, size);
|
||||||
|
|
Loading…
Reference in New Issue