mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: implement was_watchdog_reset()
# Conflicts: # libraries/AP_HAL_ChibiOS/Util.h
This commit is contained in:
parent
4b4eb33558
commit
ad2ff5a207
|
@ -19,6 +19,9 @@
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
#include "AP_HAL_ChibiOS_Namespace.h"
|
#include "AP_HAL_ChibiOS_Namespace.h"
|
||||||
#include "Semaphores.h"
|
#include "Semaphores.h"
|
||||||
|
#include "AP_HAL_ChibiOS.h"
|
||||||
|
#include <ch.h>
|
||||||
|
#include "hwdef/common/watchdog.h"
|
||||||
|
|
||||||
class ChibiOS::Util : public AP_HAL::Util {
|
class ChibiOS::Util : public AP_HAL::Util {
|
||||||
public:
|
public:
|
||||||
|
@ -58,6 +61,9 @@ public:
|
||||||
bool fs_init(void) override;
|
bool fs_init(void) override;
|
||||||
#endif
|
#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:
|
private:
|
||||||
#ifdef HAL_PWM_ALARM
|
#ifdef HAL_PWM_ALARM
|
||||||
struct ToneAlarmPwmGroup {
|
struct ToneAlarmPwmGroup {
|
||||||
|
|
Loading…
Reference in New Issue