Commit Graph

25558 Commits (eda75fd02a27d0d26bbed4953abb19ed778a5a8c)

Author SHA1 Message Date
Filip Jagodzinski be6a26e0ef Test: WatchdogManager: Remove tests
This component no longer exists in Mbed OS.
2019-07-11 11:55:28 +01:00
Filip Jagodzinski bcffbb5c54 Watchdog: Fix timeout constraints
Update the start method to check 0 < timeout <= max_timeout.
2019-07-11 11:55:28 +01:00
Filip Jagodzinski 9c6cd2b669 Test: Watchdog: Add new driver tests 2019-07-11 11:55:28 +01:00
Filip Jagodzinski db52d0068e Fix more unittest errors 2019-07-11 11:55:27 +01:00
Martin Kojtal c9e26ec44b Watchdog: fix space in code example 2019-07-11 11:55:27 +01:00
Filip Jagodzinski 664c6ab82d Fix unittest errors 2019-07-11 11:55:27 +01:00
Martin Kojtal 0414278d80 Watchdog: example code - add kick() 2019-07-11 11:55:27 +01:00
Martin Kojtal 09dc0cd758 virtualWatchdog: fix alignment for tickers and one space 2019-07-11 11:55:27 +01:00
Martin Kojtal 9c2f1d237e virtualWatchdog: fix alignment for tickers 2019-07-11 11:55:27 +01:00
Martin Kojtal c4eeb5ecbd VirtualWatchdog: fix missing kick and init check in process
Also syntax error for ticker definitions.
2019-07-11 11:55:26 +01:00
Martin Kojtal 90033869d9 unittest: add virtualwatchdog stub 2019-07-11 11:55:26 +01:00
Martin Kojtal b40258b1ef watchdog unittest: fix naming after refactor 2019-07-11 11:55:26 +01:00
Martin Kojtal d7e2943fbe unittest: remove platform watchdog (moved to drivers) 2019-07-11 11:55:26 +01:00
Martin Kojtal 45a16847df unittest: move watchdog files to drivers
Test VirtualWatchdog and Watchdog
2019-07-11 11:55:26 +01:00
Martin Kojtal f30558bb37 unittest: rename watchdog to VirtualWatchdog 2019-07-11 11:55:26 +01:00
Martin Kojtal bc8fc539b6 Watchdog: update unittests 2019-07-11 11:55:25 +01:00
Martin Kojtal 23af0d9f92 Watchdog: keep it simple - providing simple driver functionality
No callbacks or tickers. User is handling kick() method directly based on timeout set.
VirtualWatchdog manages ticker and callback.
2019-07-11 11:55:25 +01:00
Martin Kojtal 2fe571ec7e Watchdog: fix include paths - use module name 2019-07-11 11:55:25 +01:00
Martin Kojtal 5c486f716e VirtualWatchdog: fix default timeout value (1ms is unreal) 2019-07-11 11:55:25 +01:00
Martin Kojtal bd74f9f81f VirtualWatchdog: fix name for member timeout 2019-07-11 11:55:25 +01:00
Martin Kojtal 014d80b07b VirtualWatchdog: fix is hw init definition 2019-07-11 11:55:25 +01:00
Martin Kojtal 2775c49b53 VirtualWatchdog: add config option to ctor to clarify the hw timeout 2019-07-11 11:55:25 +01:00
Martin Kojtal 4bcdd435ab Watchdog: fix timeout - use full range for watchdog 2019-07-11 11:55:24 +01:00
Martin Kojtal 659e5051f3 Watchdog: fix callback - uses ms 2019-07-11 11:55:24 +01:00
Martin Kojtal 760ccbe0a4 VirtualWatchdog: fix doxygen docs errors 2019-07-11 11:55:24 +01:00
Martin Kojtal 17d559993b Watchdog: refactor timeout handling
Enable kicking directly by kick() and handle timeout by using private handler.
2019-07-11 11:55:24 +01:00
Martin Kojtal d0be8e4543 Watchdog: add missing docs doxygen 2019-07-11 11:55:23 +01:00
Martin Kojtal 45b7d617bb Watchdog: remove dead reference file 2019-07-11 11:55:23 +01:00
Martin Kojtal 4ad585bb37 error: add watchdog driver error 2019-07-11 11:55:23 +01:00
Martin Kojtal a8e5861692 VirtualWatchdog: fix error code and timeout 2019-07-11 11:55:23 +01:00
Martin Kojtal 885332bef3 Watchdog: fix const static
Fixing error "non-static data member initializers only available with -std=c++11 or -std=gnu++11"
2019-07-11 11:55:22 +01:00
Filip Jagodzinski 01490b555d Watchdog & VirtualWatchdog process() update
Add uint32 argument - pass how much time already passed to the callback.
2019-07-11 11:55:22 +01:00
Martin Kojtal cfcad68255 VirtualWatchdog: make sure we are the only owner of watchdog
If virtual one is not the only owner we error - init error code in driver.
2019-07-11 11:55:22 +01:00
Martin Kojtal b85fedd6d8 Watchdog: clean-up start 2019-07-11 11:55:22 +01:00
Martin Kojtal 1624b9d17f watchdog: fix astyle errors 2019-07-11 11:55:21 +01:00
Martin Kojtal 33f3587377 watchdog: remove manager
Watchdog can handle callbacks - VirtualManager can attach to the tick. This should simplify the logic.

Watchdog can tick on its own using tickers.
VirtualWatchdog uses attach to get a callback when Watchdog ticks - to process own
linked list of virtual watchdogs.
2019-07-11 11:55:21 +01:00
Martin Kojtal c97f95817c watchdog: add WatchdogManager
Watchdog should be usable on it's own - kicking it via ticker. No Virtual involved.
VirtualWatchdog as well - services should use this one to have multiple one in the system.

There's WatchdogManager - basically internal class to manage ticker for Watchdog.
2019-07-11 11:55:21 +01:00
Martin Kojtal 1c5097af49 Watchdog: fix dtor 2019-07-11 11:55:21 +01:00
Martin Kojtal df03c527e9 Watchdog: kick method should not have any external dep 2019-07-11 11:55:21 +01:00
Martin Kojtal f0c050dace Watchdog: cleanup after singleton usage 2019-07-11 11:55:20 +01:00
Martin Kojtal 17470b8a74 VirtualWatchdog: fix protection macro 2019-07-11 11:55:20 +01:00
Martin Kojtal 6ab79c93d4 Watchdog: use get_instance to access watchdog hw 2019-07-11 11:55:20 +01:00
Martin Kojtal ce51d0da87 mbed: add Watchdog and VirtualWatchdog 2019-07-11 11:55:20 +01:00
Martin Kojtal 3f96afdf4d Remove watchdog manager
Use VirtualWatchdog instead
2019-07-11 11:55:20 +01:00
Martin Kojtal d7cba43afd VirtualWatchdog: software watchdog
Refactor old Watchdog (it was not a driver) to become VirtualWatchdog.
This is software virtual watchdog. This it the primary used watchdog in user application.

VirtualWatchdog: has-a watchdog. Initializes hw watchdog - start it when first used, stops it when there is no more VirtualWatchdog in the system -
list is empty.

Adding also check to watchdog to make sure there is only one in the system - runtime error if multiple objects created to already
running hw watchdog.
2019-07-11 11:55:20 +01:00
Martin Kojtal cd8ac1e132 Watchdog: refactor driver
Watchdog is hardware driver. It interacts with HAL - provides wrapper to interact with the peripheral.

Provides basic functionality: start/stop, get timeout/max timeout.
It is automatically kicked by a timer, according to the timeout set in ctor.
2019-07-11 11:55:20 +01:00
Amanda Butler 1869a1d4a7 Edit ResetReason.h
Edit file for active voice, complete sentences and grammar.
2019-07-11 11:55:19 +01:00
Amanda Butler aa9941805c Edit Watchdog.h
Edit file, mostly for active voice, consistent abbreviations, grammar and spelling.
2019-07-11 11:55:19 +01:00
Amanda Butler 5558539d55 Edit watchdog_api.h
Edit file, mostly for active voice, consistent tense and international spelling.
2019-07-11 11:55:19 +01:00
Amanda Butler 68f132f36d Edit reset_reason_api.h
Edit file, mostly for correct grammar.
2019-07-11 11:55:19 +01:00