Watchdog Peripheral Abstraction Layer.
Clock sources for the WDG PAL. Implements : wdg_clock_source_t_Class.
Enumerator |
---|
WDG_PAL_BUS_CLOCK |
Bus clock
|
WDG_PAL_LPO_CLOCK |
LPO clock
|
WDG_PAL_SOSC_CLOCK |
SOSC clock
|
WDG_PAL_SIRC_CLOCK |
SIRC clock
|
Definition at line 55 of file wdg_pal.h.
Enumeration with the types of peripherals supported by Watchdog PAL.
This enumeration contains the types of peripherals supported by Watchdog PAL. Implements : wdg_inst_type_t_Class
Enumerator |
---|
WDG_INST_TYPE_WDOG |
|
Definition at line 45 of file wdg_pal_mapping.h.
Clears the Timeout Interrupt Flag.
This function clears the Timeout Interrupt Flag.
- Parameters
-
[in] | instance | The name of the instance. |
Definition at line 471 of file wdg_pal.c.
De-initializes the WDG PAL.
This function resets all configuration to default and disable the WDG PAL instance.
- Parameters
-
[in] | instance | The name of the instance. |
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed due to WDG PAL was locked.
- STATUS_UNSUPPORTED : Operation was unsupported.
Definition at line 285 of file wdg_pal.c.
Gets the value of the WDG PAL counter.
This function gets counter of WDG PAL module. Note that: Counter will be reset to timeout value if WDG PAL uses SWT. The counter will continue to run if WDG PAL uses WDOG.
- Parameters
-
[in] | instance | The name of the instance. |
[out] | value | Pointer to the counter value |
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed due to SWT was lock by hard lock.
- STATUS_UNSUPPORTED : Operation was unsupported.
Definition at line 427 of file wdg_pal.c.
Gets default configuration of the WDG PAL.
This function gets the default configuration of the WDG PAL.
- Parameters
-
[out] | configures | the default configuration |
Definition at line 209 of file wdg_pal.c.
Initializes the WDG PAL.
This function initializes the WDG instance by user configuration
- Parameters
-
[in] | instance | The name of the instance. |
[in] | configPtr | Pointer to the WDG PAL user configuration structure |
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed. Possible causes: previous clock source or the one specified in the configuration structure is disabled; WDG PAL configuration updates are not allowed.
- STATUS_UNSUPPORTED : Operation was unsupported.
Definition at line 83 of file wdg_pal.c.
Refreshes the WDG PAL counter.
This function resets the WDG PAL counter
- Parameters
-
[in] | instance | The name of the instance. |
Definition at line 246 of file wdg_pal.c.
Set interrupt for WDG PAL.
This function enables/disables the WDG PAL timeout interrupt and sets a function to be called when a timeout interrupt is received, before reset.
- Parameters
-
[in] | instance | The name of the instance. |
[in] | enable |
- true : Enable interrupt
- false : Disable interrupt
|
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed. Possible causes: failed to WDG PAL configuration updates not allowed.
- STATUS_UNSUPPORTED: Operation was unsupported.
Definition at line 319 of file wdg_pal.c.
Sets the value of the WDG PAL timeout.
This function sets the value of the WDG PAL timeout.
- Parameters
-
[in] | instance | The name of the instance. |
[in] | value | The value of the WDG PAL timeout. |
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed due to WDG PAL was locked.
- STATUS_UNSUPPORTED : Operation was unsupported.
Definition at line 354 of file wdg_pal.c.
Set window mode and window value of the WDG PAL.
This function set window mode, window value is set when window mode enabled.
- Parameters
-
[in] | instance | The name of the instance. |
[in] | enable |
- true : Enable window mode
- false : Disable window mode
|
[in] | value | The value of the WDG PAL window. |
- Returns
- operation status
- STATUS_SUCCESS : Operation was successful.
- STATUS_ERROR : Operation failed due to WDG PAL was locked.
- STATUS_UNSUPPORTED : Operation was unsupported.
Definition at line 389 of file wdg_pal.c.