HAL_ChibiOS: implement was_watchdog_reset()

This commit is contained in:
Andrew Tridgell 2019-04-11 19:51:10 +10:00
parent 7f96d4ad12
commit 03886f241e

View File

@ -20,6 +20,7 @@
#include "AP_HAL_ChibiOS_Namespace.h"
#include "AP_HAL_ChibiOS.h"
#include <ch.h>
#include "hwdef/common/watchdog.h"
class ChibiOS::Util : public AP_HAL::Util {
public:
@ -64,6 +65,9 @@ public:
*/
bool fs_init(void) override;
#endif
// return true if the reason for the reboot was a watchdog reset
bool was_watchdog_reset() const override { return stm32_was_watchdog_reset(); }
private:
#ifdef HAL_PWM_ALARM