Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc1b9ac0dbf2196280895d2e440dd7ac288ac8424 -r199502232e53e78651a65c4cfbfcee27379d4f56 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c1b9ac0dbf2196280895d2e440dd7ac288ac8424) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 199502232e53e78651a65c4cfbfcee27379d4f56) @@ -44,7 +44,7 @@ #include "Valves.h" #include "WatchdogMgmt.h" #include "HDDefs.h" -#include "TaskPriority.h" +#include "TaskPriority.h" /** * @addtogroup SystemCommMessages @@ -8080,4 +8080,28 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleRebootNowRequest function handles a + * request to reboot the system. A software reset will cause the bootloader + * to stay active. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleRebootNowRequest( MESSAGE_T *message ) +{ + BOOL result = (0 == message->hdr.payloadLen); + + // respond to request immediately with whether it was formatted correctly + sendTestAckResponseMsg((MSG_ID_T)message->hdr.msgID, result); + + if (result) + { + // Trigger a software reset. + systemREG1->SYSECR = (0x2) << 14; + } +} + /**@}*/