![]() |
RAFW Flexible Software Package Documentation
Release v2.0.1
|
|
Interface for Watchdog Service APIs.
The Watchdog Service provides watchdog functionality to monitor system tasks and avoid system freezes.
Data Structures | |
| struct | watchdog_service_cfg_t |
| struct | watchdog_service_api_t |
| struct | watchdog_service_instance_t |
Typedefs | |
| typedef void | watchdog_service_ctrl_t |
| struct watchdog_service_cfg_t |
Configuration parameters.
| Data Fields | ||
|---|---|---|
| wdt_instance_t const * | p_wdt | To use WDT, link a WDT instance here. |
| void const * | p_context | Placeholder for user data. |
| void const * | p_extend | Placeholder for user extension. |
| struct watchdog_service_api_t |
Functions implemented at the HAL layer will follow this API.
Data Fields | |
| fsp_err_t(* | open )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg) |
| fsp_err_t(* | registerTask )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t *p_id) |
| fsp_err_t(* | unregisterTask )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
| fsp_err_t(* | suspend )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
| fsp_err_t(* | resume )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
| fsp_err_t(* | notify )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id) |
| fsp_err_t(* | resumeAndNotify )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id) |
| fsp_err_t(* | notifyFromIdle )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg) |
| fsp_err_t(* | setLatency )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id, uint8_t latency) |
| fsp_err_t(* | setIdleId )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
| fsp_err_t(* watchdog_service_api_t::open) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg) |
Initialize and start the Watchdog Service.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to pin configuration structure. |
| fsp_err_t(* watchdog_service_api_t::registerTask) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t *p_id) |
Register a current task with the Watchdog Service.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to pin configuration structure. |
| [out] | p_id | Pointer to id of registered task. |
| fsp_err_t(* watchdog_service_api_t::unregisterTask) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
Unregister a task from the Watchdog Service.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | id | Id of unregistered task. |
| fsp_err_t(* watchdog_service_api_t::suspend) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
Suspend monitoring a task by the Watchdog Service.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | id | Id of task to suspend monitoring. |
| fsp_err_t(* watchdog_service_api_t::resume) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
Resume monitoring of a task by the Watchdog Service.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | id | Id of task to resume monitoring. |
| fsp_err_t(* watchdog_service_api_t::notify) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id) |
Notify the Watchdog Service about a task.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to pin configuration structure. |
| [in] | id | Id of task for notification. |
| fsp_err_t(* watchdog_service_api_t::resumeAndNotify) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id) |
Resume monitoring of a task and notify the Watchdog Service about the task.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to pin configuration structure. |
| [in] | id | Id of task to resume monitoring and notify. |
| fsp_err_t(* watchdog_service_api_t::notifyFromIdle) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg) |
Notify the Watchdog Service about the idle task.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to pin configuration structure. |
| fsp_err_t(* watchdog_service_api_t::setLatency) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id, uint8_t latency) |
Set watchdog latency for a task.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | id | Id of task for setting latency. |
| [in] | latency | Latency value. |
| fsp_err_t(* watchdog_service_api_t::setIdleId) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id) |
Set watchdog ID of the idle task.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | id | Id of idle task. |
| struct watchdog_service_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
| Data Fields | ||
|---|---|---|
| watchdog_service_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| watchdog_service_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| watchdog_service_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void watchdog_service_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.