main: #ifdef USE_LIBFTDI must be after the if

This commit is contained in:
Gwenhael Goavec-Merou 2026-03-22 15:03:45 +01:00
parent 44ad4df0e7
commit 451beadfae
1 changed files with 3 additions and 2 deletions

View File

@ -295,16 +295,17 @@ int main(int argc, char **argv)
cable.config.index = args.cable_index; cable.config.index = args.cable_index;
cable.config.status_pin = args.status_pin; cable.config.status_pin = args.status_pin;
#ifdef USE_LIBFTDI
/* ----------------------- */ /* ----------------------- */
/* SPI FLASH direct access */ /* SPI FLASH direct access */
/* ----------------------- */ /* ----------------------- */
if (args.spi || (board && board->mode == COMM_SPI)) if (args.spi || (board && board->mode == COMM_SPI)) {
#ifdef USE_LIBFTDI
return spi_comm(args, cable, &pins_config, board); return spi_comm(args, cable, &pins_config, board);
#else #else
printError("SPI Flash Direct access: disabled at build time"); printError("SPI Flash Direct access: disabled at build time");
return EXIT_FAILURE; return EXIT_FAILURE;
#endif #endif
}
/* ------------------- */ /* ------------------- */
/* DFU access */ /* DFU access */