Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subsys/usb/device_next/class/usbd_midi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ int usbd_midi_send(const struct device *dev, const struct midi_ump ump)
size_t buflen = 4 * words;
uint32_t word;

LOG_DBG("Send MT=%X group=%X", UMP_MT(ump), UMP_GROUP(ump));
LOG_DBG("Send MT=%X group=%lX", UMP_MT(ump), UMP_GROUP(ump));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What type is UMP_GROUP? Wouldn't PRIx32 be better here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the log message, UMP_GROUP is a long unsigned int.

I also tested with PRIx32 using this instruction:

LOG_DBG("Send MT=0x%" PRIx32 " group=0x%" PRIx32, (uint32_t)UMP_MT(ump), (uint32_t)UMP_GROUP(ump));

It builds successfully, but I am not sure if this format is appropriate for printing it.

if (data->altsetting != MIDI2_ALTERNATE) {
LOG_WRN("MIDI2.0 is not enabled");
return -EIO;
Expand Down