watchdog
2.0.0.0
|
API for configuring and manipulating Watchdog Click driver. More...
Modules | |
Watchdog Registers Settings | |
Settings for registers of Watchdog Click driver. | |
Watchdog MikroBUS Map | |
MikroBUS pin mapping of Watchdog Click driver. | |
Functions | |
void | watchdog_cfg_setup (watchdog_cfg_t *cfg) |
Watchdog configuration object setup function. More... | |
err_t | watchdog_init (watchdog_t *ctx, watchdog_cfg_t *cfg) |
Watchdog initialization function. More... | |
err_t | watchdog_default_cfg (watchdog_t *ctx) |
Watchdog default configuration function. More... | |
void | watchdog_set_set0 (watchdog_t *ctx, uint8_t set0_state) |
Set S0 ( RST ) pin state function. More... | |
void | watchdog_set_set1 (watchdog_t *ctx, uint8_t set1_state) |
Set S1 ( CS ) pin state function. More... | |
void | watchdog_set_wdi (watchdog_t *ctx, uint8_t wdi_state) |
Set WDI ( PWM ) pin state function. More... | |
uint8_t | watchdog_get_wdo (watchdog_t *ctx) |
Get WDO ( INT ) pin state function. More... | |
void | watchdog_send_pulse (watchdog_t *ctx, uint16_t p_duration_ms) |
Send pulse function. More... | |
void | watchdog_setup_time (watchdog_t *ctx, uint8_t setup_time_mode) |
Set the watchdog time function. More... | |
API for configuring and manipulating Watchdog Click driver.
void watchdog_cfg_setup | ( | watchdog_cfg_t * | cfg | ) |
Watchdog configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See watchdog_cfg_t object definition for detailed explanation. |
err_t watchdog_default_cfg | ( | watchdog_t * | ctx | ) |
Watchdog default configuration function.
This function executes a default configuration of Watchdog click board.
[in] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t watchdog_get_wdo | ( | watchdog_t * | ctx | ) |
Get WDO ( INT ) pin state function.
The function check the state of the WDO ( INT ) which is the pulse sending indicator in the watchdog timeout occurs to the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[in] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
0
- Fault, 1
- Correct Operation. err_t watchdog_init | ( | watchdog_t * | ctx, |
watchdog_cfg_t * | cfg | ||
) |
Watchdog initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See watchdog_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void watchdog_send_pulse | ( | watchdog_t * | ctx, |
uint16_t | p_duration_ms | ||
) |
Send pulse function.
The function sends a pulse with the desired pulse duration to the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[in] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
[in] | p_duration_ms | : The desired pulse duration time in milliseconds. |
void watchdog_set_set0 | ( | watchdog_t * | ctx, |
uint8_t | set0_state | ||
) |
Set S0 ( RST ) pin state function.
The function set the state of the S0 ( RST ) to configure a valid window watchdog ratio of the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[out] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
set0_state |
|
void watchdog_set_set1 | ( | watchdog_t * | ctx, |
uint8_t | set1_state | ||
) |
Set S1 ( CS ) pin state function.
The function set the state of the S1 ( CS ) to configure a valid window watchdog ratio of the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[out] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
set1_state |
|
void watchdog_set_wdi | ( | watchdog_t * | ctx, |
uint8_t | wdi_state | ||
) |
Set WDI ( PWM ) pin state function.
The function set the state of the WDI ( PWM ) which is used to send a pulse to the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[out] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
wdi_state |
|
void watchdog_setup_time | ( | watchdog_t * | ctx, |
uint8_t | setup_time_mode | ||
) |
Set the watchdog time function.
The function set the desired watchdog operating mode of the TPS3430 Window Watchdog Timer with Programmable Reset Delay on the Watchdog click board.
[in] | ctx | : Click context object. See watchdog_t object definition for detailed explanation. |
[in] | setup_time_mode | : Mode in witch Watchdog Click bord is working. |