mbed fault handler: changed the 2nd parameter type.

pull/11272/head
Andrew Chong 2019-08-21 17:02:34 +08:00
parent e90c5674d4
commit 9edfad4eea
2 changed files with 3 additions and 3 deletions

View File

@ -36,12 +36,12 @@ void print_context_info(void);
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *)(FAULT_CONTEXT_LOCATION);
#else
mbed_fault_context_t fault_context;
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *) &fault_context;
mbed_fault_context_t *const mbed_fault_context = &fault_context;
#endif
//This is a handler function called from Fault handler to print the error information out.
//This runs in fault context and uses special functions(defined in mbed_rtx_fault_handler.c) to print the information without using C-lib support.
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in)
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in)
{
mbed_error_status_t faultStatus = MBED_SUCCESS;

View File

@ -57,7 +57,7 @@ typedef struct {
//This is a handler function called from Fault handler to print the error information out.
//This runs in fault context and uses special functions(defined in mbed_fault_handler.c) to print the information without using C-lib support.
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in);
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in);
/**
* Call this function to retrieve the fault context after a fatal exception which triggered a system reboot. The function retrieves the fault context stored in crash-report ram area which is preserved over reboot.