mirror of https://github.com/RT-Thread/rt-thread
[devicedrivers] Fix typo in sfud error messages
This commit is contained in:
parent
1eec660b12
commit
c55e6694db
|
@ -95,10 +95,10 @@ sfud_err sfud_device_init(sfud_flash *flash) {
|
||||||
}
|
}
|
||||||
if (result == SFUD_SUCCESS) {
|
if (result == SFUD_SUCCESS) {
|
||||||
flash->init_ok = true;
|
flash->init_ok = true;
|
||||||
SFUD_INFO("%s flash device is initialize success.", flash->name);
|
SFUD_INFO("%s flash device initialized successfully.", flash->name);
|
||||||
} else {
|
} else {
|
||||||
flash->init_ok = false;
|
flash->init_ok = false;
|
||||||
SFUD_INFO("Error: %s flash device is initialize fail.", flash->name);
|
SFUD_INFO("Error: %s flash device initialization failed.", flash->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -325,7 +325,7 @@ static sfud_err hardware_init(sfud_flash *flash) {
|
||||||
|
|
||||||
if (flash->chip.capacity == 0 || flash->chip.write_mode == 0 || flash->chip.erase_gran == 0
|
if (flash->chip.capacity == 0 || flash->chip.write_mode == 0 || flash->chip.erase_gran == 0
|
||||||
|| flash->chip.erase_gran_cmd == 0) {
|
|| flash->chip.erase_gran_cmd == 0) {
|
||||||
SFUD_INFO("Warning: This flash device is not found or not support.");
|
SFUD_INFO("Warning: This flash device is not found or not supported.");
|
||||||
return SFUD_ERR_NOT_FOUND;
|
return SFUD_ERR_NOT_FOUND;
|
||||||
} else {
|
} else {
|
||||||
const char *flash_mf_name = NULL;
|
const char *flash_mf_name = NULL;
|
||||||
|
@ -338,12 +338,12 @@ static sfud_err hardware_init(sfud_flash *flash) {
|
||||||
}
|
}
|
||||||
/* print manufacturer and flash chip name */
|
/* print manufacturer and flash chip name */
|
||||||
if (flash_mf_name && flash->chip.name) {
|
if (flash_mf_name && flash->chip.name) {
|
||||||
SFUD_INFO("Find a %s %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.name,
|
SFUD_INFO("Found a %s %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.name,
|
||||||
flash->chip.capacity);
|
flash->chip.capacity);
|
||||||
} else if (flash_mf_name) {
|
} else if (flash_mf_name) {
|
||||||
SFUD_INFO("Find a %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.capacity);
|
SFUD_INFO("Found a %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.capacity);
|
||||||
} else {
|
} else {
|
||||||
SFUD_INFO("Find a flash chip. Size is %ld bytes.", flash->chip.capacity);
|
SFUD_INFO("Found a flash chip. Size is %ld bytes.", flash->chip.capacity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ bool sfud_read_sfdp(sfud_flash *flash) {
|
||||||
if (read_sfdp_header(flash) && read_basic_header(flash, &basic_header)) {
|
if (read_sfdp_header(flash) && read_basic_header(flash, &basic_header)) {
|
||||||
return read_basic_table(flash, &basic_header);
|
return read_basic_table(flash, &basic_header);
|
||||||
} else {
|
} else {
|
||||||
SFUD_INFO("Warning: Read SFDP parameter header information failed. The %s is not support JEDEC SFDP.", flash->name);
|
SFUD_INFO("Warning: Read SFDP parameter header information failed. The %s does not support JEDEC SFDP.", flash->name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ static bool read_sfdp_header(sfud_flash *flash) {
|
||||||
sfdp->minor_rev = header[4];
|
sfdp->minor_rev = header[4];
|
||||||
sfdp->major_rev = header[5];
|
sfdp->major_rev = header[5];
|
||||||
if (sfdp->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
|
if (sfdp->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
|
||||||
SFUD_INFO("Error: This reversion(V%d.%d) SFDP is not supported.", sfdp->major_rev, sfdp->minor_rev);
|
SFUD_INFO("Error: This reversion(V%d.%d) of SFDP is not supported.", sfdp->major_rev, sfdp->minor_rev);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SFUD_DEBUG("Check SFDP header is OK. The reversion is V%d.%d, NPN is %d.", sfdp->major_rev, sfdp->minor_rev,
|
SFUD_DEBUG("Check SFDP header is OK. The reversion is V%d.%d, NPN is %d.", sfdp->major_rev, sfdp->minor_rev,
|
||||||
|
@ -162,7 +162,7 @@ static bool read_basic_header(const sfud_flash *flash, sfdp_para_header *basic_h
|
||||||
basic_header->ptp = (long)header[4] | (long)header[5] << 8 | (long)header[6] << 16;
|
basic_header->ptp = (long)header[4] | (long)header[5] << 8 | (long)header[6] << 16;
|
||||||
/* check JEDEC basic flash parameter header */
|
/* check JEDEC basic flash parameter header */
|
||||||
if (basic_header->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
|
if (basic_header->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
|
||||||
SFUD_INFO("Error: This reversion(V%d.%d) JEDEC basic flash parameter header is not supported.",
|
SFUD_INFO("Error: This reversion(V%d.%d) of JEDEC basic flash parameter header is not supported.",
|
||||||
basic_header->major_rev, basic_header->minor_rev);
|
basic_header->major_rev, basic_header->minor_rev);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue