Skip to content

Commit 9edfad4

Browse files
committed
mbed fault handler: changed the 2nd parameter type.
1 parent e90c567 commit 9edfad4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

platform/source/TARGET_CORTEX_M/mbed_fault_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ void print_context_info(void);
3636
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *)(FAULT_CONTEXT_LOCATION);
3737
#else
3838
mbed_fault_context_t fault_context;
39-
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *) &fault_context;
39+
mbed_fault_context_t *const mbed_fault_context = &fault_context;
4040
#endif
4141

4242
//This is a handler function called from Fault handler to print the error information out.
4343
//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.
44-
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in)
44+
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in)
4545
{
4646
mbed_error_status_t faultStatus = MBED_SUCCESS;
4747

platform/source/TARGET_CORTEX_M/mbed_fault_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef struct {
5757

5858
//This is a handler function called from Fault handler to print the error information out.
5959
//This runs in fault context and uses special functions(defined in mbed_fault_handler.c) to print the information without using C-lib support.
60-
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in);
60+
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in);
6161

6262
/**
6363
* 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.

0 commit comments

Comments
 (0)