Skip to content

Commit

Permalink
Add NO_ERASE to enum erase_type_t to mark OTP writes
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesweisbach committed May 21, 2024
1 parent 71c6057 commit 93bfa23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/st-flash/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int32_t main(int32_t ac, char** av) {
printf("OTP Write NOT implemented\n");
goto on_error;
}
err = stlink_fwrite_flash(sl, o.filename, o.addr, erase_type);
err = stlink_fwrite_flash(sl, o.filename, o.addr, NO_ERASE);

if (err == -1) {
printf("stlink_fwrite_flash() == -1\n");
Expand Down
1 change: 1 addition & 0 deletions src/stlink-lib/common_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define BANK_2 1

enum erase_type_t {
NO_ERASE = 0,
SECTION_ERASE = 1,
MASS_ERASE = 2,
};
Expand Down

0 comments on commit 93bfa23

Please sign in to comment.