1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-02-21 14:27:38 +00:00

user_io: search for .ROM in the current directory first

This commit is contained in:
Gyorgy Szombathelyi
2020-02-12 21:24:41 +01:00
parent 35b7bfa9c4
commit 7009e6e02c

View File

@@ -226,6 +226,8 @@ void user_io_send_core_mod() {
spi_uio_cmd8(UIO_SET_MOD, core_mod);
}
extern unsigned long iCurrentDirectory; // cluster number of current directory, 0 for root
void user_io_detect_core_type() {
core_name[0] = 0;
@@ -315,9 +317,9 @@ void user_io_detect_core_type() {
// check if there's a <core>.rom present
strcpy(s+8, "ROM");
if (FileOpen(&file, s))
data_io_file_tx(&file, 0);
if (FileOpenDir(&file, s, iCurrentDirectory) || FileOpen(&file, s))
data_io_file_tx(&file, 0);
// check if there's a <core>.vhd present
strcpy(s+8, "VHD");
if (FileOpen(&file, s))