summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/stm32/usb_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/usb_spi.c b/chip/stm32/usb_spi.c
index 54caae015e..86254ddaac 100644
--- a/chip/stm32/usb_spi.c
+++ b/chip/stm32/usb_spi.c
@@ -273,8 +273,8 @@ static void usb_spi_process_rx_packet(struct usb_spi_config const *config,
} else if (write_count > USB_SPI_MAX_WRITE_COUNT) {
setup_transfer_response(config,
USB_SPI_WRITE_COUNT_INVALID);
+#ifdef CONFIG_SPI_HALFDUPLEX
} else if (read_count == USB_SPI_FULL_DUPLEX_ENABLED) {
-#ifndef CONFIG_SPI_HALFDUPLEX
/* Full duplex mode is not supported on this device. */
setup_transfer_response(config,
USB_SPI_UNSUPPORTED_FULL_DUPLEX);