watchdog 2.0.0.0
watchdog.h File Reference

This file contains API for Watchdog Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  watchdog_t
 Watchdog Click context object. More...
 
struct  watchdog_cfg_t
 Watchdog Click configuration object. More...
 

Macros

#define WATCHDOG_SETUP_TIME_MODE_0   0x00
 Watchdog description setting.
 
#define WATCHDOG_SETUP_TIME_MODE_1   0x01
 
#define WATCHDOG_SETUP_TIME_MODE_DISABLE   0x02
 
#define WATCHDOG_SETUP_TIME_MODE_2   0x03
 
#define WATCHDOG_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  watchdog_return_value_t { WATCHDOG_OK = 0 , WATCHDOG_ERROR = -1 }
 Watchdog Click return value data. More...
 

Functions

void watchdog_cfg_setup (watchdog_cfg_t *cfg)
 Watchdog configuration object setup function.
 
err_t watchdog_init (watchdog_t *ctx, watchdog_cfg_t *cfg)
 Watchdog initialization function.
 
err_t watchdog_default_cfg (watchdog_t *ctx)
 Watchdog default configuration function.
 
void watchdog_set_set0 (watchdog_t *ctx, uint8_t set0_state)
 Set S0 ( RST ) pin state function.
 
void watchdog_set_set1 (watchdog_t *ctx, uint8_t set1_state)
 Set S1 ( CS ) pin state function.
 
void watchdog_set_wdi (watchdog_t *ctx, uint8_t wdi_state)
 Set WDI ( PWM ) pin state function.
 
uint8_t watchdog_get_wdo (watchdog_t *ctx)
 Get WDO ( INT ) pin state function.
 
void watchdog_send_pulse (watchdog_t *ctx, uint16_t p_duration_ms)
 Send pulse function.
 
void watchdog_setup_time (watchdog_t *ctx, uint8_t setup_time_mode)
 Set the watchdog time function.
 

Detailed Description

This file contains API for Watchdog Click Driver.

Enumeration Type Documentation

◆ watchdog_return_value_t

Watchdog Click return value data.

Predefined enum values for driver return values.

Enumerator
WATCHDOG_OK 
WATCHDOG_ERROR