|
|
|
@ -244,6 +244,7 @@ toggle_sweep(void)
|
|
|
|
// Shell commands output
|
|
|
|
// Shell commands output
|
|
|
|
int shell_printf(const char *fmt, ...)
|
|
|
|
int shell_printf(const char *fmt, ...)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (shell_stream == NULL) return 0;
|
|
|
|
va_list ap;
|
|
|
|
va_list ap;
|
|
|
|
int formatted_bytes = 0;
|
|
|
|
int formatted_bytes = 0;
|
|
|
|
if (shell_stream) {
|
|
|
|
if (shell_stream) {
|
|
|
|
@ -1888,7 +1889,7 @@ static void shell_init_connection(void){
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
// Only USB console, shell_stream always on USB
|
|
|
|
// Only USB console, shell_stream always on USB
|
|
|
|
#define PREPARE_STREAM
|
|
|
|
#define PREPARE_STREAM shell_stream = (BaseSequentialStream *)&SDU1;
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 // Not used
|
|
|
|
#if 0 // Not used
|
|
|
|
// Check connection as Active, if no suspend input
|
|
|
|
// Check connection as Active, if no suspend input
|
|
|
|
@ -1918,7 +1919,7 @@ static void shell_init_connection(void){
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Set I/O stream SDU1 for shell
|
|
|
|
* Set I/O stream SDU1 for shell
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
shell_stream = (BaseSequentialStream *)&SDU1;
|
|
|
|
PREPARE_STREAM;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@ -2029,10 +2030,8 @@ void sd_card_load_config(char *filename){
|
|
|
|
|
|
|
|
|
|
|
|
if (f_open(fs_file, filename, FA_OPEN_EXISTING | FA_READ) != FR_OK)
|
|
|
|
if (f_open(fs_file, filename, FA_OPEN_EXISTING | FA_READ) != FR_OK)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Reset IO stream
|
|
|
|
BaseSequentialStream *old_shell_stream = shell_stream;
|
|
|
|
shell_stream = NULL;
|
|
|
|
shell_stream = (BaseSequentialStream *)NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *buf = (char *)spi_buffer;
|
|
|
|
char *buf = (char *)spi_buffer;
|
|
|
|
UINT size = 0;
|
|
|
|
UINT size = 0;
|
|
|
|
|
|
|
|
|
|
|
|
@ -2061,7 +2060,8 @@ void sd_card_load_config(char *filename){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
f_close(fs_file);
|
|
|
|
f_close(fs_file);
|
|
|
|
shell_stream = old_shell_stream;
|
|
|
|
// Prepare I/O for shell_stream
|
|
|
|
|
|
|
|
PREPARE_STREAM;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@ -2221,8 +2221,6 @@ int main(void)
|
|
|
|
|
|
|
|
|
|
|
|
shell_init_connection();
|
|
|
|
shell_init_connection();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set_sweep_points(POINTS_COUNT);
|
|
|
|
set_sweep_points(POINTS_COUNT);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __AUDIO__
|
|
|
|
#ifdef __AUDIO__
|
|
|
|
@ -2275,10 +2273,6 @@ int main(void)
|
|
|
|
dacPutChannelX(&DACD2, 0, config.dac_value);
|
|
|
|
dacPutChannelX(&DACD2, 0, config.dac_value);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
dacStart(&DACD1, &dac1cfg1);
|
|
|
|
dacStart(&DACD1, &dac1cfg1);
|
|
|
|
#ifdef TINYSA4
|
|
|
|
|
|
|
|
disk_initialize(0);
|
|
|
|
|
|
|
|
// SD_PowerOn();
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO-1, Thread1, NULL);
|
|
|
|
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO-1, Thread1, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|