watchdog 2.0.0.0
|
API for configuring and manipulating Watchdog Click driver. More...
Topics | |
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. | |
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. | |
API for configuring and manipulating Watchdog Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
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. |