|
libxr
1.0
Want to be the best embedded framework
|
STM32 IWDG 独立看门狗 / Independent Watchdog. More...
#include <stm32_watchdog.hpp>
Public Member Functions | |
| STM32Watchdog (IWDG_HandleTypeDef *hiwdg, uint32_t timeout_ms=1000, uint32_t feed_ms=250, uint32_t clock=LSI_VALUE) | |
| ErrorCode | SetConfig (const Configuration &config) override |
| 初始化硬件并设置超时时间 Initialize hardware and set overflow time | |
| ErrorCode | Feed () override |
| 立即手动喂狗 Feed the watchdog immediately | |
| ErrorCode | Start () override |
| 启动看门狗 / Start the watchdog | |
| ErrorCode | Stop () override |
| 停止看门狗 / Stop the watchdog | |
Public Member Functions inherited from LibXR::Watchdog | |
| Watchdog () | |
| 构造函数 Constructor | |
| virtual | ~Watchdog () |
| 虚析构函数 Virtual destructor | |
Data Fields | |
| IWDG_HandleTypeDef * | hiwdg_ |
| STM32 HAL IWDG handle. | |
| uint32_t | clock_ |
| LSI clock in Hz. | |
Data Fields inherited from LibXR::Watchdog | |
| uint32_t | timeout_ms_ = 3000 |
| 溢出时间 | |
| uint32_t | auto_feed_interval_ms = 1000 |
| 自动喂狗间隔 | |
| bool | auto_feed_ = false |
| 是否自动喂狗 | |
Additional Inherited Members | |
Static Public Member Functions inherited from LibXR::Watchdog | |
| static void | ThreadFun (Watchdog *wdg) |
| Watchdog 自动喂狗线程函数 Watchdog thread function for auto-feeding. | |
| static void | TaskFun (Watchdog *wdg) |
| Watchdog 自动喂狗定时器任务函数 Watchdog timer task function for auto-feeding. | |
STM32 IWDG 独立看门狗 / Independent Watchdog.
Definition at line 16 of file stm32_watchdog.hpp.
|
explicit |
Definition at line 7 of file stm32_watchdog.cpp.
|
overridevirtual |
立即手动喂狗 Feed the watchdog immediately
Implements LibXR::Watchdog.
Definition at line 74 of file stm32_watchdog.cpp.
|
overridevirtual |
初始化硬件并设置超时时间 Initialize hardware and set overflow time
| config | 配置参数 Configuration |
Implements LibXR::Watchdog.
Definition at line 16 of file stm32_watchdog.cpp.
|
overridevirtual |
启动看门狗 / Start the watchdog
Implements LibXR::Watchdog.
Definition at line 79 of file stm32_watchdog.cpp.
|
overridevirtual |
停止看门狗 / Stop the watchdog
Implements LibXR::Watchdog.
Definition at line 89 of file stm32_watchdog.cpp.
| uint32_t LibXR::STM32Watchdog::clock_ |
LSI clock in Hz.
Definition at line 31 of file stm32_watchdog.hpp.
| IWDG_HandleTypeDef* LibXR::STM32Watchdog::hiwdg_ |
STM32 HAL IWDG handle.
Definition at line 30 of file stm32_watchdog.hpp.