Skip to content
Snippets Groups Projects
Commit e967c2b3 authored by David Sidrane's avatar David Sidrane Committed by Lorenz Meier
Browse files

board_common:Added new API point board_on_reset

  This optionally provided function called on entry to
  board_system_reset. It should perform any house keeping
  prior to retunring to do the rest.
parent 33f2897f
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,24 @@ __EXPORT void board_rc_input(bool invert_on);
# endif
#endif
/************************************************************************************
* Name: board_on_reset
*
* Description:
* Optionally provided function called on entry to board_system_reset
* It should perform any house keeping prior to the rest.
*
* status - 1 if resetting to boot loader
* 0 if just resetting
*
************************************************************************************/
#if defined(BOARD_HAS_NO_RESET) || !defined(BOARD_HAS_ON_RESET)
# define board_on_reset(status)
#else
__EXPORT void board_on_reset(int status);
#endif
/************************************************************************************
* Name: board_reset
*
......
......@@ -69,6 +69,9 @@ int board_set_bootload_mode(board_reset_e mode)
void board_system_reset(int status)
{
#if defined(BOARD_HAS_ON_RESET)
board_on_reset(status);
#endif
board_reset(status);
while (1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment