HAL  v0.6.1
Hardware Abstraction Layer
Loading...
Searching...
No Matches
WATCHDOG

Watchdog. More...

Collaboration diagram for WATCHDOG:

Data Structures

struct  wdt_attr_t
 

Enumerations

enum  wdt_result_t {
  WDT_RESULT_OK ,
  WDT_RESULT_INVALID ,
  WDT_RESULT_UNSUPPORTED ,
  WDT_RESULT_ERR ,
  TOTAL_WDT_RESULT
}
 
enum  wdt_feed_mode_t {
  WDT_FEED_MODE_WINDOW ,
  WDT_FEED_MODE_ANYTIME ,
  TOTAL_WDT_FEED_MODE
}
 
enum  wdt_feed_window_pcnt_t {
  WDT_FEED_WINDOW_PCNT_25 ,
  WDT_FEED_WINDOW_PCNT_50 ,
  WDT_FEED_WINDOW_PCNT_75 ,
  TOTAL_WDT_FEED_WINDOW_PCNT
}
 

Functions

wdt_result_t hal_watchdog_init (const wdt_attr_t attr)
 Initialize watchdog.
 
wdt_result_t hal_watchdog_feed (void)
 Update and feed watchdog counter.
 
wdt_result_t hal_watchdog_enable (void)
 Enable and start watchdog counter.
 
wdt_result_t hal_watchdog_disable (void)
 Disable and stop watchdog counter.
 

Detailed Description

Watchdog.

Enumeration Type Documentation

◆ wdt_feed_mode_t

#include <wdt/public_inc/hal_wdt.h>

Enumerator
WDT_FEED_MODE_WINDOW 
WDT_FEED_MODE_ANYTIME 
TOTAL_WDT_FEED_MODE 

◆ wdt_feed_window_pcnt_t

#include <wdt/public_inc/hal_wdt.h>

Enumerator
WDT_FEED_WINDOW_PCNT_25 
WDT_FEED_WINDOW_PCNT_50 
WDT_FEED_WINDOW_PCNT_75 
TOTAL_WDT_FEED_WINDOW_PCNT 

◆ wdt_result_t

#include <wdt/public_inc/hal_wdt.h>

Enumerator
WDT_RESULT_OK 

No error.

WDT_RESULT_INVALID 

Operation invalid.

WDT_RESULT_UNSUPPORTED 

Operation not supported.

WDT_RESULT_ERR 

Error occured.

TOTAL_WDT_RESULT 

Function Documentation

◆ hal_watchdog_disable()

wdt_result_t hal_watchdog_disable ( void )

#include <wdt/public_inc/hal_wdt.h>

Disable and stop watchdog counter.

wdt_result_t hal_watchdog_disable(void)
Disable and stop watchdog counter.
wdt_result_t
Definition hal_wdt.h:37
Return values
WDT_RESULT_OKSuccessfully disabled the watchdog
WDT_RESULT_UNSUPPORTEDOperation not supported
WDT_RESULT_ERRFailed to disabled the watchdog

◆ hal_watchdog_enable()

wdt_result_t hal_watchdog_enable ( void )

#include <wdt/public_inc/hal_wdt.h>

Enable and start watchdog counter.

wdt_result_t hal_watchdog_enable(void)
Enable and start watchdog counter.
Return values
WDT_RESULT_OKSuccessfully enabled the watchdog
WDT_RESULT_UNSUPPORTEDOperation not supported
WDT_RESULT_ERRFailed to enabled the watchdog

◆ hal_watchdog_feed()

wdt_result_t hal_watchdog_feed ( void )

#include <wdt/public_inc/hal_wdt.h>

Update and feed watchdog counter.

wdt_result_t hal_watchdog_feed(void)
Update and feed watchdog counter.
Return values
WDT_RESULT_OKSuccessfully feed watchdog
WDT_RESULT_UNSUPPORTEDOperation not supported
WDT_RESULT_ERRFailed to feed watchdog

◆ hal_watchdog_init()

wdt_result_t hal_watchdog_init ( const wdt_attr_t attr)

#include <wdt/public_inc/hal_wdt.h>

Initialize watchdog.

wdt_attr_t attr = {
.feed_window_pcnt = WDT_FEED_WINDOW_PCNT_25,
.timeout_ms = 1000U
};
wdt_result_t hal_watchdog_init(const wdt_attr_t attr)
Initialize watchdog.
@ WDT_FEED_WINDOW_PCNT_25
Definition hal_wdt.h:56
@ WDT_FEED_MODE_WINDOW
Definition hal_wdt.h:48
Definition hal_wdt.h:64
wdt_feed_mode_t feed_mode
Definition hal_wdt.h:65
Parameters
[in]attrWatchdog attribute
Return values
WDT_RESULT_OKWatchdog configured succcessfully
WDT_RESULT_INVALIDConfiguration attributes invalid
WDT_RESULT_UNSUPPORTEDWatchdog attribute unsupported
WDT_RESULT_ERRFailed to configure watchdog