Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'refs/heads/master' into dwc2_ep0
# Conflicts:
#	examples/device/dfu/src/usb_descriptors.c
#	examples/device/dfu_runtime/src/usb_descriptors.c
#	src/device/usbd_control.c
#	src/portable/synopsys/dwc2/dcd_dwc2.c
  • Loading branch information
hathach committed Nov 19, 2025
commit fd3161087d76c84fb21e8e2f2d30a81d6b11bfba
3 changes: 1 addition & 2 deletions examples/device/dfu/src/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "bsp/board_api.h"
#include "class/dfu/dfu_device.h"
#include "tusb.h"

/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
Expand Down Expand Up @@ -248,7 +247,7 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {

// Cap at max char
chr_count = strlen(str);
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1;// -1 for string type
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1; // -1 for string type
if (chr_count > max_count) {
chr_count = max_count;
}
Expand Down
3 changes: 1 addition & 2 deletions examples/device/dfu_runtime/src/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "bsp/board_api.h"
#include "class/dfu/dfu_rt_device.h"
#include "tusb.h"

/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
Expand Down Expand Up @@ -245,7 +244,7 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {

// Cap at max char
chr_count = strlen(str);
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1;// -1 for string type
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1; // -1 for string type
if (chr_count > max_count) {
chr_count = max_count;
}
Expand Down
2 changes: 1 addition & 1 deletion src/device/usbd_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static bool data_stage_xact(uint8_t rhport) {

if (_ctrl_xfer.request.bmRequestType_bit.direction == TUSB_DIR_IN) {
ep_addr = EDPT_CTRL_IN;
if (xact_len) {
if (0u != xact_len) {
TU_VERIFY(0 == tu_memcpy_s(_ctrl_epbuf.buf, CFG_TUD_EP0_BUFSIZE, _ctrl_xfer.buffer, xact_len));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ static void handle_epin_slave(uint8_t rhport, uint8_t epnum, dwc2_diepint_t diep
// TX FIFO empty bit is read-only. It will only be cleared by hardware when written bytes is more than
// - 64 bytes or
// - Half/Empty of TX FIFO size (configured by GAHBCFG.TXFELVL)
if (diepint_bm.txfifo_empty && (dwc2->diepempmsk & (1 << epnum))) {
if (diepint_bm.txfifo_empty && tu_bit_test(dwc2->diepempmsk, epnum)) {
epin_write_tx_fifo(rhport, epnum);

// Turn off TXFE if all bytes are written.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.