diff --git a/application.c b/application.c index 28b4dd0..98a06f3 100644 --- a/application.c +++ b/application.c @@ -262,23 +262,19 @@ void main(void) { rcc_clock_setup_in_hse_8mhz_out_72mhz(); // use 8 MHz high speed external clock to generate 72 MHz internal clock +#if defined(DEBUG) && DEBUG // enable functionalities for easier debug DBGMCU_CR |= DBGMCU_CR_STANDBY; // allow debug also in standby mode (keep digital part and clock powered) DBGMCU_CR |= DBGMCU_CR_STOP; // allow debug also in stop mode (keep clock powered) DBGMCU_CR |= DBGMCU_CR_SLEEP; // allow debug also in sleep mode (keep clock powered) +#endif + // setup board board_setup(); // setup board uart_setup(); // setup USART (for printing) usb_cdcacm_setup(); // setup USB CDC ACM (for printing) - busvoodoo_setup(); // setup BusVoodoo board - printf("\nwelcome to BusVoodoo ("); // print welcome message - if (busvoodoo_full) { - printf("full"); - } else { - printf("light"); - } - printf(")\n"); + printf("\nwelcome to BusVoodoo (%s)\n", busvoodoo_full ? "full" : "light"); // print welcome message // setup terminal terminal_prefix = "BV"; // set default prefix