mirror of https://github.com/ARMmbed/mbed-os.git
watchdog: fix astyle errors
parent
33f3587377
commit
1624b9d17f
|
@ -30,8 +30,8 @@ VirtualWatchdog::VirtualWatchdog(uint32_t timeout, const char *const str): _name
|
||||||
_next = NULL;
|
_next = NULL;
|
||||||
_max_timeout = timeout;
|
_max_timeout = timeout;
|
||||||
// start watchdog
|
// start watchdog
|
||||||
Watchdog& watchdog = Watchdog::get_instance();
|
Watchdog &watchdog = Watchdog::get_instance();
|
||||||
watchdog.start(&VirtualWatchdog::process, Watchdog::elapsed_ms);
|
watchdog.start(&VirtualWatchdog::process, Watchdog::elapsed_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualWatchdog::~VirtualWatchdog()
|
VirtualWatchdog::~VirtualWatchdog()
|
||||||
|
@ -76,8 +76,7 @@ void VirtualWatchdog::add_to_list()
|
||||||
|
|
||||||
void VirtualWatchdog::remove_from_list()
|
void VirtualWatchdog::remove_from_list()
|
||||||
{
|
{
|
||||||
VirtualWatchdog *cur_ptr = _first,
|
VirtualWatchdog *cur_ptr = _first, *prev_ptr = NULL;
|
||||||
*prev_ptr = NULL;
|
|
||||||
while (cur_ptr != NULL) {
|
while (cur_ptr != NULL) {
|
||||||
if (cur_ptr == this) {
|
if (cur_ptr == this) {
|
||||||
if (cur_ptr == _first) {
|
if (cur_ptr == _first) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
/** As Watchdog might not stop ever, there is just one instance - we use single instance.
|
/** As Watchdog might not stop ever, there is just one instance - we use single instance.
|
||||||
* This ensures we keep Watchdog alive. To operate watchdog, use start/stop methods.
|
* This ensures we keep Watchdog alive. To operate watchdog, use start/stop methods.
|
||||||
*/
|
*/
|
||||||
static Watchdog &get_instance()
|
static Watchdog &get_instance()
|
||||||
{
|
{
|
||||||
// Use this implementation of singleton (Meyer's) rather than the one that allocates
|
// Use this implementation of singleton (Meyer's) rather than the one that allocates
|
||||||
|
@ -108,7 +108,6 @@ public:
|
||||||
|
|
||||||
void kick();
|
void kick();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Watchdog();
|
Watchdog();
|
||||||
~Watchdog();
|
~Watchdog();
|
||||||
|
@ -125,7 +124,6 @@ private:
|
||||||
*/
|
*/
|
||||||
SingletonPtr<Ticker> _ticker;
|
SingletonPtr<Ticker> _ticker;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
Loading…
Reference in New Issue