File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ void hal_init(void)
3535void hal_prepare_boot (void )
3636{
3737 /* wolfBoot calls hal_flash_protect() before this hook.
38- * Override hal_flash_protect() to lock the bootloader region on
39- * targets that support runtime write protection, and use this hook
40- * only for any remaining platform-specific handoff work. */
38+ * Override int hal_flash_protect(haladdr_t address, int len) to lock
39+ * the bootloader region on targets that support runtime write
40+ * protection. Return 0 on success or a negative value on failure, and
41+ * use this hook only for any remaining platform-specific handoff work.
42+ */
4143}
4244
4345#endif
Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ uint64_t hal_get_timer_us(void);
8787#endif
8888void hal_flash_unlock (void );
8989void hal_flash_lock (void );
90+ /*
91+ * Lock the flash region [address, address + len) against writes.
92+ * Return 0 on success, or a negative value on failure.
93+ */
9094int hal_flash_protect (haladdr_t address , int len );
9195void hal_prepare_boot (void );
9296
You can’t perform that action at this time.
0 commit comments