WDT
WDT API Status
API |
BK7258 |
BK7258_cp1 |
---|---|---|
Y |
Y |
|
Y |
Y |
|
Y |
Y |
|
Y |
Y |
|
Y |
Y |
WDT API Reference
Header File
Functions
-
bk_err_t bk_wdt_driver_init(void)
Init the WDT driver.
This API init the resoure common:
Init WDT driver control memory
- Attention
1. This API should be called before any other WDT APIs.
- Returns
BK_OK: succeed
others: other errors.
-
bk_err_t bk_wdt_driver_deinit(void)
Deinit the WDT driver.
This API free all resource related to WDT and power down WDT.
- Returns
BK_OK: succeed
others: other errors.
-
bk_err_t bk_wdt_start(uint32_t timeout_ms)
Start the WDT.
This API start the WDT:
Power up the WDT
Init the watch dog timer period
- Parameters
timeout_ms – WDT period
- Returns
BK_OK: succeed
BK_ERR_WDT_DRIVER_NOT_INIT: WDT driver not init
BK_ERR_WDT_INVALID_PERIOD: WDT invalid period
others: other errors.
-
bk_err_t bk_wdt_stop(void)
Stop the WDT.
This API stop the WDT:
Reset all configuration of WDT to default value
Power down the WDT
- Returns
BK_OK: succeed
others: other errors.
-
uint32_t bk_wdt_get_feed_time(void)
Get feed watchdog time.
- Returns
BK_OK: succeed
others: other errors.
-
void bk_wdt_set_feed_time(uint32_t dw_set_time)
set feed watchdog time
- Returns
NULL
-
bool bk_wdt_is_driver_inited(void)
Get wdt driver init flag.
- Returns
BK_OK: succeed
others: other errors.
WDT API Typedefs
Header File
Macros
-
BK_ERR_WDT_DRIVER_NOT_INIT
WDT driver not init
-
BK_ERR_WDT_NOT_INIT
WDT not init
-
BK_ERR_WDT_INVALID_PERIOD
WDT invalid period
-
BK_ERR_WDT_DEBUG_DISABLED
WDT disabled via cmdline flag
Header File
Type Definitions
-
typedef uint8_t wdt_unit_t
wdt uint id