![]() |
PDL for FM0+
Version1.0
Peripheral Driverl Library for FM0+
|
Data Structures | |
struct | stc_reset_result |
Datatype for Reset Cause return structure. More... | |
Typedefs | |
typedef struct stc_reset_result | stc_reset_result_t |
Datatype for Reset Cause return structure. | |
Functions | |
en_result_t | Reset_GetCause (stc_reset_result_t *pstcResult) |
Get current Reset Cause Register contents. | |
en_result_t | Reset_GetStoredCause (stc_reset_result_t *pstcResult) |
Get stored Reset Cause. | |
Variables | |
stc_reset_result_t | stcStoredResetCause |
Global reset cause register. |
Provided functions of RESET module:
Reset_GetCause() reads the Reset Cause, clears the HW register, and stores the result in a global variable. This is needed, if the SystemInit function uses this function for retrieving the reset cause (for RTC, etc.), but the application itself also needs the reset cause. Reset_GetStoredCause() reads out the global reset cause variable, without touching the reset cause register. Reset_GetCause() must be called before.
This driver does not need any configuration structure, but uses a result structure stc_reset_result_t, which has to be provided by the caller.
typedef struct stc_reset_result stc_reset_result_t |
Datatype for Reset Cause return structure.
en_result_t Reset_GetCause | ( | stc_reset_result_t * | pstcResult | ) |
Get current Reset Cause Register contents.
This function reads the Reset Cause Register and stores the cause bits in the result structure pointer.
[out] | pstcResult | Reset Cause result structure |
Ok | Function done successfully |
Definition at line 108 of file reset.c.
References stc_reset_result::bAnomalousFrequency, stc_reset_result::bClockSupervisor, stc_reset_result::bHardwareWatchdog, stc_reset_result::bInitx, stc_reset_result::bPowerOn, stc_reset_result::bSoftware, stc_reset_result::bSoftwareWatchdog, FALSE, Ok, and TRUE.
en_result_t Reset_GetStoredCause | ( | stc_reset_result_t * | pstcResult | ) |