Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_wdg.h File Reference
#include "bflb_core.h"
Include dependency graph for bflb_wdg.h:

Go to the source code of this file.

Data Structures

struct  bflb_wdg_config_s
 WDG configuration structure. More...
 

Macros

#define WDG_CLKSRC_BCLK   0
 
#define WDG_CLKSRC_32K   1
 
#define WDG_CLKSRC_1K   2
 
#define WDG_CLKSRC_XTAL   3
 
#define WDG_CLKSRC_GPIO   4
 
#define WDG_CLKSRC_NO   5
 
#define WDG_MODE_INTERRUPT   0
 
#define WDG_MODE_RESET   1
 

Functions

void bflb_wdg_init (struct bflb_device_s *dev, const struct bflb_wdg_config_s *config)
 Initialize watchdog. More...
 
void bflb_wdg_start (struct bflb_device_s *dev)
 Start watchdog. More...
 
void bflb_wdg_stop (struct bflb_device_s *dev)
 Stop watchdog. More...
 
uint16_t bflb_wdg_get_countervalue (struct bflb_device_s *dev)
 Get watchdog counter value. More...
 
void bflb_wdg_set_countervalue (struct bflb_device_s *dev, uint16_t value)
 Set watchdog counter value. More...
 
void bflb_wdg_reset_countervalue (struct bflb_device_s *dev)
 Reset watchdog counter value. More...
 
void bflb_wdg_compint_clear (struct bflb_device_s *dev)
 Clear watchdog compare interrupt status. More...