mirror of https://github.com/ARMmbed/mbed-os.git
parent
f084bd5a9d
commit
e2ba0bb533
|
@ -15,11 +15,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup drivers_reset_reason_tests
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef MBED_DRIVERS_RESET_REASON_TESTS_H
|
||||
#define MBED_DRIVERS_RESET_REASON_TESTS_H
|
||||
|
||||
|
@ -36,6 +31,3 @@ void test_reset_reason();
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/** @}*/
|
||||
|
||||
|
|
|
@ -23,15 +23,19 @@
|
|||
|
||||
namespace mbed {
|
||||
/** \addtogroup drivers */
|
||||
/** ResetReason API. When the system is restarted, the reason for the restart is
|
||||
* contained in the system registers at boot time in a platform specific manner,
|
||||
* this API provides a generic method of fetching the reason for the restart.
|
||||
/** A platform-independent method of checking the cause of the last system reset.
|
||||
*
|
||||
* When the system is restarted, the reason for the restart is contained in
|
||||
* the system registers at boot time in a platform specific manner. This API
|
||||
* provides a generic method of fetching the reason for the restart.
|
||||
*
|
||||
* @ingroup drivers
|
||||
*/
|
||||
class ResetReason {
|
||||
public:
|
||||
/** Get the platform-independent reason code for the last system reset.
|
||||
*
|
||||
* @return enum containing the last reset reason for the board.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
@ -47,12 +51,16 @@ public:
|
|||
|
||||
/** Get the platform specific reason code for the last system reset.
|
||||
*
|
||||
* Platform specific reasons that are not covered by the reset_reason_t enum
|
||||
* Platform specific reasons that are not covered by the ::reset_reason_t enum
|
||||
* will cause the ResetReason::get() function to return
|
||||
* RESET_REASON_PLATFORM. In order to get the actual reason the register
|
||||
* ::RESET_REASON_PLATFORM. In order to get the actual reason the register
|
||||
* value must be fetched directly using this function and interpreted in a
|
||||
* platform specific manner.
|
||||
*
|
||||
* @return value containing the reset reason register for the given platform.
|
||||
* If the platform contains reset reasons across multiple registers they
|
||||
* will be concatenated here.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* if (ResetReason::get() == RESET_REASON_PLATFORM) {
|
||||
|
|
Loading…
Reference in New Issue