RtfwSetWatchdogConfiguration
RtfwSetWatchdogConfiguration configures the wRTOS Subsystem watchdog timer configuration.
Syntax
bool RtfwSetWatchdogConfiguration(
[in] const RTFW_WATCHDOG_CONFIGURATION * pWatchdogConfiguration
);
Parameters
[in] pWatchdogConfiguration
A pointer to an RTFW_WATCHDOG_CONFIGURATION structure with members that specify the watchdog timer configuration. Member Size must be set by the caller to the value sizeof(RTFW_WATCHDOG_CONFIGURATION), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE and sets the last error value. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
ERROR_INVALID_PARAMETER |
Member WatchdogTimeout in structure RTFW_WATCHDOG_CONFIGURATION is less than 1000, or not a multiple of the HAL timer period. |
|
RT_ERROR_RESTART_SUBSYSTEM |
The Subsystem was running when this function succeeded. RtfwRestartRequired will report that the wRTOS Subsystem must be restarted. Note: The wRTOS Subsystem must be restarted for the changes to take effect. |
|
RT_ERROR_STRUCTURE_TOO_SMALL |
The member Size of a structure is too small. |
Remarks
The following is the best practice for using Native Library Get/Set APIs that take structures as arguments:
- Call the Get function.
- Modify the value(s) you want to change.
- Call the corresponding Set function.
The values passed in by the Set function will be saved (persistent).
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwApi.h |
RtfwApi.lib |
See Also: