39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
72#define WATCHDOG_SETUP_TIME_MODE_0 0x00
73#define WATCHDOG_SETUP_TIME_MODE_1 0x01
74#define WATCHDOG_SETUP_TIME_MODE_DISABLE 0x02
75#define WATCHDOG_SETUP_TIME_MODE_2 0x03
93#define WATCHDOG_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.s0 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
95 cfg.s1 = MIKROBUS( mikrobus, MIKROBUS_CS ); \
96 cfg.wdi = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
97 cfg.wdo = MIKROBUS( mikrobus, MIKROBUS_INT )
void watchdog_send_pulse(watchdog_t *ctx, uint16_t p_duration_ms)
Send pulse function.
void watchdog_set_wdi(watchdog_t *ctx, uint8_t wdi_state)
Set WDI ( PWM ) pin state function.
void watchdog_set_set0(watchdog_t *ctx, uint8_t set0_state)
Set S0 ( RST ) pin state function.
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.
void watchdog_setup_time(watchdog_t *ctx, uint8_t setup_time_mode)
Set the watchdog time function.
err_t watchdog_default_cfg(watchdog_t *ctx)
Watchdog default configuration function.
uint8_t watchdog_get_wdo(watchdog_t *ctx)
Get WDO ( INT ) pin state function.
void watchdog_set_set1(watchdog_t *ctx, uint8_t set1_state)
Set S1 ( CS ) pin state function.
Watchdog Click configuration object.
Definition watchdog.h:120
pin_name_t s0
Definition watchdog.h:121
pin_name_t wdi
Definition watchdog.h:123
pin_name_t wdo
Definition watchdog.h:124
pin_name_t s1
Definition watchdog.h:122
Watchdog Click context object.
Definition watchdog.h:107
digital_in_t wdo
Definition watchdog.h:111
digital_out_t s1
Definition watchdog.h:109
digital_out_t s0
Definition watchdog.h:108
digital_out_t wdi
Definition watchdog.h:110
watchdog_return_value_t
Watchdog Click return value data.
Definition watchdog.h:133
@ WATCHDOG_ERROR
Definition watchdog.h:135
@ WATCHDOG_OK
Definition watchdog.h:134