BMP_MODE_FLASH_WRITE_VERIFY combined operation

This commit is contained in:
fabalthazar 2021-03-31 12:06:39 +02:00
parent f85c54be97
commit 2982888b66
2 changed files with 11 additions and 1 deletions

View File

@ -253,8 +253,17 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv)
case 'T':
opt->opt_mode = BMP_MODE_SWJ_TEST;
break;
case 'w':
if (opt->opt_mode == BMP_MODE_FLASH_VERIFY)
opt->opt_mode = BMP_MODE_FLASH_WRITE_VERIFY;
else
opt->opt_mode = BMP_MODE_FLASH_WRITE;
break;
case 'V':
opt->opt_mode = BMP_MODE_FLASH_VERIFY;
if (opt->opt_mode == BMP_MODE_FLASH_WRITE)
opt->opt_mode = BMP_MODE_FLASH_WRITE_VERIFY;
else
opt->opt_mode = BMP_MODE_FLASH_VERIFY;
break;
case 'r':
opt->opt_mode = BMP_MODE_FLASH_READ;

View File

@ -32,6 +32,7 @@ enum bmp_cl_mode {
BMP_MODE_RESET,
BMP_MODE_FLASH_ERASE,
BMP_MODE_FLASH_WRITE,
BMP_MODE_FLASH_WRITE_VERIFY,
BMP_MODE_FLASH_READ,
BMP_MODE_FLASH_VERIFY,
BMP_MODE_SWJ_TEST,