mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-22 20:59:03 +00:00
[update][wdg] update wdg demo
This commit is contained in:
parent
d075071312
commit
39fc0d73c8
13 changed files with 161 additions and 64 deletions
|
@ -19,6 +19,7 @@
|
|||
#define TIMER_COMP_ID_0 0
|
||||
#define TIMER_COMP_ID_1 1
|
||||
#define TIMER_COMP_ID_2 2
|
||||
#define TIMER_COMP_NONE 3
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -4,17 +4,28 @@
|
|||
#include "bflb_core.h"
|
||||
#include "bflb_clock.h"
|
||||
|
||||
/** @defgroup WDG_MODE Watch-dog reset/interrupt mode definition
|
||||
* @{
|
||||
*/
|
||||
#define WDG_MODE_INTERRUPT 0
|
||||
#define WDG_MODE_RESET 1
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief WDG configuration structure
|
||||
*
|
||||
* @param clock_source Wdg clock source, use BFLB_SYSTEM_* definition
|
||||
* @param clock_div Wdg clock divison value, from 0 to 255
|
||||
* @param comp_val Wdg compare value
|
||||
* @param comp_val Wdg compare value
|
||||
* @param mode Wdg reset/interrupt mode
|
||||
*/
|
||||
struct bflb_wdg_config_s {
|
||||
uint8_t clock_source;
|
||||
uint8_t clock_div;
|
||||
uint16_t comp_val;
|
||||
uint8_t mode;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue