Go to the source code of this file.
|
struct | vsf_wdt_isr_t |
| WDT interrupt configuration structure. More...
|
|
struct | vsf_wdt_cfg_t |
| WDT configuration structure. More...
|
|
struct | vsf_wdt_capability_t |
| Predefined VSF WDT capability that can be reimplemented in specific hal drivers. The vsf_wdt_capability_t structure defines the features supported by the WDT hardware. When reimplementing this structure, all existing members must be preserved. More...
|
|
struct | vsf_wdt_op_t |
| WDT operation function pointer type, used for WDT Multi Class support. More...
|
|
struct | vsf_wdt_t |
| WDT instance structure, used for WDT Multi Class support, not needed in non Multi Class mode. More...
|
|
|
#define | VSF_WDT_CFG_MULTI_CLASS ENABLED |
| Enable multi-class support by default for maximum availability.
|
|
#define | VSF_WDT_CFG_PREFIX vsf |
| We can redefine macro VSF_WDT_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code. Example:
|
|
#define | VSF_WDT_CFG_FUNCTION_RENAME ENABLED |
| After define VSF_WDT_CFG_FUNCTION_RENAME to DISABLED, calling any vsf_wdt_xxx() function will not be renamed. It has higher priority than VSF_WDT_CFG_PREFIX.
|
|
#define | VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE DISABLED |
| In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE to redefine enum vsf_wdt_mode_t.
|
|
#define | VSF_WDT_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
| In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_CFG to redefine struct vsf_wdt_cfg_t. For compatibility, members should not be deleted when redefining it.
|
|
#define | VSF_WDT_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
| In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_CAPABILITY to redefine struct vsf_wdt_capability_t. For compatibility, members should not be deleted when redefining it.
|
|
#define | VSF_WDT_CFG_INHERIT_HAL_CAPABILITY ENABLED |
| In specific hardware driver, we can enable macro VSF_WDT_CFG_INHERIT_HAL_CAPABILITY to inherit the structure vsf_peripheral_capability_t.
|
|
#define | VSF_WDT_APIS(__prefix) |
| WDT API template, used to generate WDT type, specific prefix function declarations, etc.
|
|
◆ VSF_WDT_CFG_MULTI_CLASS
#define VSF_WDT_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.
◆ VSF_WDT_CFG_PREFIX
#define VSF_WDT_CFG_PREFIX vsf |
We can redefine macro VSF_WDT_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code. Example:
#define VSF_WDT_CFG_PREFIX my_device
vsf_err_t vsf_wdt_init(vsf_wdt_t *wdt_ptr, vsf_wdt_cfg_t *cfg_ptr)
Initialize a WDT instance.
Definition wdt_common.c:38
- Note
- This macro is only valid when VSF_WDT_CFG_FUNCTION_RENAME is ENABLED.
◆ VSF_WDT_CFG_FUNCTION_RENAME
#define VSF_WDT_CFG_FUNCTION_RENAME ENABLED |
After define VSF_WDT_CFG_FUNCTION_RENAME to DISABLED, calling any vsf_wdt_xxx() function will not be renamed. It has higher priority than VSF_WDT_CFG_PREFIX.
◆ VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE
#define VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE DISABLED |
In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE to redefine enum vsf_wdt_mode_t.
◆ VSF_WDT_CFG_REIMPLEMENT_TYPE_CFG
#define VSF_WDT_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_CFG to redefine struct vsf_wdt_cfg_t. For compatibility, members should not be deleted when redefining it.
◆ VSF_WDT_CFG_REIMPLEMENT_TYPE_CAPABILITY
#define VSF_WDT_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
In specific hardware driver, we can enable macro VSF_WDT_CFG_REIMPLEMENT_TYPE_CAPABILITY to redefine struct vsf_wdt_capability_t. For compatibility, members should not be deleted when redefining it.
◆ VSF_WDT_CFG_INHERIT_HAL_CAPABILITY
#define VSF_WDT_CFG_INHERIT_HAL_CAPABILITY ENABLED |
In specific hardware driver, we can enable macro VSF_WDT_CFG_INHERIT_HAL_CAPABILITY to inherit the structure vsf_peripheral_capability_t.
◆ VSF_WDT_APIS
#define VSF_WDT_APIS |
( |
|
__prefix | ) |
|
Value:
__VSF_HAL_TEMPLATE_API(__prefix,
void, wdt, fini,
VSF_MCONNECT(__prefix, _wdt_t) *wdt_ptr) \
__VSF_HAL_TEMPLATE_API(__prefix,
void, wdt, feed,
VSF_MCONNECT(__prefix, _wdt_t) *wdt_ptr)
vsf_err_t
Definition __type.h:42
struct VSF_MCONNECT(VSF_FLASH_CFG_IMP_PREFIX, _flash_t)
Definition flash.c:53
__le16 capability
Definition ieee80211.h:134
Predefined VSF WDT capability that can be reimplemented in specific hal drivers. The vsf_wdt_capabili...
Definition vsf_template_wdt.h:329
WDT configuration structure.
Definition vsf_template_wdt.h:310
fsm_rt_t
Definition vsf_fsm.h:315
#define __VSF_HAL_TEMPLATE_API
Definition vsf_template_instance_declaration.h:57
WDT API template, used to generate WDT type, specific prefix function declarations, etc.
- Parameters
-
[in] | __prefix | The prefix used for generating WDT functions. |
◆ vsf_wdt_mode_t
Predefined VSF WDT modes that can be reimplemented in specific HAL drivers.The following modes must be retained even if not supported by hardware. If hardware supports more modes, we can implement them in the hardware driver:
- VSF_WDT_MODE_NO_EARLY_WAKEUP
- VSF_WDT_MODE_EARLY_WAKEUP
- VSF_WDT_MODE_RESET_NONE
- VSF_WDT_MODE_RESET_CPU
- VSF_WDT_MODE_RESET_SOC
In specific drivers, we can implement optional modes. Optional modes require the driver to provide one or more enumeration options, and provide macros with the same name (users can determine whether to support the mode at compile time). If these options are N to 1, the corresponding MASK option is also required (users can select different modes at runtime).
◆ vsf_wdt_t
◆ vsf_wdt_isr_handler_t
typedef void vsf_wdt_isr_handler_t(void *target_ptr, vsf_wdt_t *wdt_ptr) |
WDT interrupt handler type declaration.
- Parameters
-
[in,out] | target_ptr | user defined target pointer |
[in,out] | wdt_ptr | vsf_wdt_t watchdog timer structure pointer |
◆ vsf_wdt_isr_t
WDT interrupt configuration structure.
◆ vsf_wdt_cfg_t
WDT configuration structure.
◆ vsf_wdt_capability_t
Predefined VSF WDT capability that can be reimplemented in specific hal drivers. The vsf_wdt_capability_t structure defines the features supported by the WDT hardware. When reimplementing this structure, all existing members must be preserved.
◆ vsf_wdt_op_t
WDT operation function pointer type, used for WDT Multi Class support.
◆ vsf_wdt_mode_t
Predefined VSF WDT modes that can be reimplemented in specific HAL drivers.The following modes must be retained even if not supported by hardware. If hardware supports more modes, we can implement them in the hardware driver:
- VSF_WDT_MODE_NO_EARLY_WAKEUP
- VSF_WDT_MODE_EARLY_WAKEUP
- VSF_WDT_MODE_RESET_NONE
- VSF_WDT_MODE_RESET_CPU
- VSF_WDT_MODE_RESET_SOC
In specific drivers, we can implement optional modes. Optional modes require the driver to provide one or more enumeration options, and provide macros with the same name (users can determine whether to support the mode at compile time). If these options are N to 1, the corresponding MASK option is also required (users can select different modes at runtime).
Enumerator |
---|
VSF_WDT_MODE_NO_EARLY_WAKEUP | No early wakeup.
|
VSF_WDT_MODE_EARLY_WAKEUP | Early wakeup.
|
VSF_WDT_MODE_RESET_NONE | No reset when timeout.
|
VSF_WDT_MODE_RESET_CPU | Reset CPU when timeout.
|
VSF_WDT_MODE_RESET_SOC | Reset SOC when timeout.
|
◆ anonymous enum
WDT mode completion, used to simplify the definition of WDT mode.
Enumerator |
---|
VSF_WDT_MODE_EARLY_WAKEUP_MASK | early wakeup mask
|
VSF_WDT_MODE_RESET_MASK | reset mask
|
VSF_WDT_MODE_ALL_BITS_MASK | |
◆ vsf_wdt_init()
Initialize a WDT instance.
- Parameters
-
- Returns
- vsf_err_t: VSF_ERR_NONE if WDT was initialized, or a negative error code
- Note
- It is not necessary to call vsf_wdt_fini() for deinitialization. vsf_wdt_init() should be called before any other WDT API except vsf_wdt_capability().
◆ vsf_wdt_fini()
Finalize a WDT instance.
- Parameters
-
- Returns
- none
◆ vsf_wdt_enable()
Enable a WDT instance.
- Parameters
-
- Returns
- fsm_rt_t: FSM_RT_CPL if WDT was enabled, fsm_rt_on_going if WDT is still enabling
◆ vsf_wdt_disable()
Disable a WDT instance.
- Parameters
-
- Returns
- fsm_rt_t: FSM_RT_CPL if WDT was disabled, fsm_rt_on_going if WDT is still disabling
◆ vsf_wdt_capability()
◆ vsf_wdt_feed()
WDT feed operation.
- Parameters
-