Edit reset_reason_api.h

Edit file, mostly for correct grammar.
pull/10911/head
Amanda Butler 2019-06-26 15:58:32 -05:00 committed by Martin Kojtal
parent fa76620afd
commit bd5de8d769
1 changed files with 16 additions and 16 deletions

View File

@ -65,7 +65,7 @@ extern "C" {
* \defgroup hal_reset_reason_tests ResetReason HAL tests
* Greentea tests for the ResetReason HAL.
*
* To run the ResetReason HAL tests use the command:
* To run the ResetReason HAL tests, use the command:
*
* mbed test -t <toolchain> -m <target> -n tests-mbed_hal-reset_reason
*
@ -76,7 +76,7 @@ extern "C" {
typedef enum {
RESET_REASON_POWER_ON, /**< Set when power is initially applied to the board. The power-on-reset circuit causes a POWER_ON reset when this occurs */
RESET_REASON_PIN_RESET, /**< Set when a reset is triggered by the hardware pin on the board */
RESET_REASON_BROWN_OUT, /**< Triggered when the voltage drops below the low voltage detect (LVD) threshold the system will be held in a reset until the voltage rises above the threshold */
RESET_REASON_BROWN_OUT, /**< Triggered when the voltage drops below the low voltage detect (LVD) threshold; the system is held in a reset until the voltage rises above the threshold */
RESET_REASON_SOFTWARE, /**< Set during software reset, typically triggered by writing the SYSRESETREQ bit in the Application Interrupt and Reset Control register */
RESET_REASON_WATCHDOG, /**< Set when a running watchdog timer fails to be refreshed */
RESET_REASON_LOCKUP, /**< Set when the core is locked because of an unrecoverable exception */
@ -88,50 +88,50 @@ typedef enum {
RESET_REASON_UNKNOWN /**< Unknown or unreadable reset reason **/
} reset_reason_t;
/** Fetch the reset reason for the last system reset
/** Fetch the reset reason for the last system reset.
*
* This function must return the contents of the system reset reason registers
* cast to an appropriate platform independent reset reason. If multiple reset
* reasons are set this function should return ::RESET_REASON_MULTIPLE. If the
* reset reason does not match any existing platform independent value this
* reasons are set, this function should return ::RESET_REASON_MULTIPLE. If the
* reset reason does not match any existing platform independent value, this
* function should return ::RESET_REASON_PLATFORM. If no reset reason can be
* determined this function should return ::RESET_REASON_UNKNOWN.
* determined, this function should return ::RESET_REASON_UNKNOWN.
*
* This function is not idempotent, there is no guarantee that the system
* This function is not idempotent; there is no guarantee the system
* reset reason will not be cleared between calls to this function altering the
* return value between calls.
*
* Note: Some platforms contain reset reason registers that persist through
* system resets. If the registers haven't been cleared before calling this
* function multiple reasons may be set within the registers. If multiple reset
* reasons are detected this function will return ::RESET_REASON_MULTIPLE.
* function, multiple reasons may be set within the registers. If multiple reset
* reasons are detected, this function returns ::RESET_REASON_MULTIPLE.
*
* @return enum containing the last reset reason for the board.
*/
reset_reason_t hal_reset_reason_get(void);
/** Fetch the raw platform specific reset reason register value
/** Fetch the raw platform specific reset reason register value.
*
* This function must return the raw contents of the system reset reason
* registers cast to a uint32_t value. If the platform contains reset reasons
* that span multiple registers/addresses the value should be concatenated into
* that span multiple registers/addresses, the value should be concatenated into
* the return type.
*
* This function is not idempotent, there is no guarantee that the system
* This function is not idempotent; there is no guarantee the system
* reset reason will not be cleared between calls to this function altering the
* return value between calls.
*
* @return value containing the reset reason register for the given platform.
* If the platform contains reset reasons across multiple registers they
* If the platform contains reset reasons across multiple registers, they
* will be concatenated here.
*/
uint32_t hal_reset_reason_get_raw(void);
/** Clear the reset reason from registers
/** Clear the reset reason from registers.
*
* Reset the value of the reset status registers, the reset reason will persist
* between system resets on certain platforms so the registers should be cleared
* Reset the value of the reset status registers. The reset reason persists
* between system resets on certain platforms, so the registers should be cleared
* before the system resets. Failing to do so may make it difficult to determine
* the cause of any subsequent system resets.
*/