Skip to content

Commit 383b8f9

Browse files
committed
Fix internal JIRA. Add check if cybsp_init() is successful
1 parent 3d031ce commit 383b8f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "cybsp.h"
2323
#include "cy_mbed_post_init.h"
2424
#include "mbed_power_mgmt.h"
25+
#include "mbed_error.h"
2526
#if MBED_CONF_RTOS_PRESENT
2627
#include "rtos_idle.h"
2728
#endif // MBED_CONF_RTOS_PRESENT
@@ -75,7 +76,9 @@ void mbed_sdk_init(void)
7576
SystemInit();
7677

7778
/* Set up the device based on configurator selections */
78-
cybsp_init();
79+
if (CY_RSLT_SUCCESS != cybsp_init()) {
80+
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_FAILED_OPERATION), "cybsp_init");
81+
}
7982

8083
cy_mbed_post_bsp_init_hook();
8184

0 commit comments

Comments
 (0)