VSF Documented
|
Go to the source code of this file.
Data Structures | |
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... | |
Macros | |
#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_name) |
WDT API template, used to generate WDT type, specific prefix function declarations, etc. | |
Typedefs | |
typedef enum vsf_wdt_mode_t | 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: | |
typedef struct vsf_wdt_t | vsf_wdt_t |
WDT forward declaration. | |
typedef void | vsf_wdt_isr_handler_t(void *target_ptr, vsf_wdt_t *wdt_ptr) |
WDT interrupt handler type declaration. | |
typedef struct vsf_wdt_isr_t | vsf_wdt_isr_t |
WDT interrupt configuration structure. | |
typedef struct vsf_wdt_cfg_t | vsf_wdt_cfg_t |
WDT configuration structure. | |
typedef struct vsf_wdt_capability_t | 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. | |
typedef struct vsf_wdt_op_t | vsf_wdt_op_t |
WDT operation function pointer type, used for WDT Multi Class support. | |
Enumerations | |
enum | vsf_wdt_mode_t { VSF_WDT_MODE_NO_EARLY_WAKEUP = (0 << 0) , VSF_WDT_MODE_EARLY_WAKEUP = (1 << 0) , VSF_WDT_MODE_RESET_NONE = (0 << 1) , VSF_WDT_MODE_RESET_CPU = (1 << 1) , VSF_WDT_MODE_RESET_SOC = (2 << 1) } |
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: More... | |
enum | { VSF_WDT_MODE_EARLY_WAKEUP_MASK , VSF_WDT_MODE_RESET_MASK , VSF_WDT_MODE_ALL_BITS_MASK } |
WDT mode completion, used to simplify the definition of WDT mode. More... | |
Functions | |
vsf_err_t | vsf_wdt_init (vsf_wdt_t *wdt_ptr, vsf_wdt_cfg_t *cfg_ptr) |
Initialize a WDT instance. | |
void | vsf_wdt_fini (vsf_wdt_t *wdt_ptr) |
Finalize a WDT instance. | |
fsm_rt_t | vsf_wdt_enable (vsf_wdt_t *wdt_ptr) |
Enable a WDT instance. | |
fsm_rt_t | vsf_wdt_disable (vsf_wdt_t *wdt_ptr) |
Disable a WDT instance. | |
vsf_wdt_capability_t | vsf_wdt_capability (vsf_wdt_t *wdt_ptr) |
Get the capability of WDT instance. | |
void | vsf_wdt_feed (vsf_wdt_t *wdt_ptr) |
WDT feed operation. | |
#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_name | ) |
WDT API template, used to generate WDT type, specific prefix function declarations, etc.
[in] | __prefix_name | The prefix used for generating WDT functions. |
typedef enum vsf_wdt_mode_t 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:
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).
typedef void vsf_wdt_isr_handler_t(void *target_ptr, vsf_wdt_t *wdt_ptr) |
WDT interrupt handler type declaration.
[in,out] | target_ptr | user defined target pointer |
[in,out] | wdt_ptr | vsf_wdt_t watchdog timer structure pointer |
typedef struct vsf_wdt_isr_t vsf_wdt_isr_t |
WDT interrupt configuration structure.
typedef struct vsf_wdt_cfg_t vsf_wdt_cfg_t |
WDT configuration structure.
typedef struct vsf_wdt_capability_t 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.
typedef struct vsf_wdt_op_t vsf_wdt_op_t |
WDT operation function pointer type, used for WDT Multi Class support.
enum 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:
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).
anonymous enum |
|
extern |
Initialize a WDT instance.
[in] | wdt_ptr | a pointer to structure vsf_wdt_t |
[in] | cfg_ptr | a pointer to structure vsf_wdt_cfg_t |
|
extern |
Enable a WDT instance.
[in] | wdt_ptr | a pointer to structure vsf_wdt_t |
Disable a WDT instance.
[in] | wdt_ptr | a pointer to structure vsf_wdt_t |
|
extern |
Get the capability of WDT instance.
[in] | wdt_ptr | a pointer to structure vsf_wdt_t |