We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd70336 commit 6d652bdCopy full SHA for 6d652bd
libraries/mbed/common/mbed_interface.c
@@ -49,16 +49,24 @@ WEAK int mbed_interface_uid(char *uid) {
49
}
50
51
int mbed_interface_disconnect(void) {
52
+ int res;
53
if (mbed_interface_connected()) {
- return semihost_disabledebug();
54
+ if ((res = semihost_disabledebug()) != 0)
55
+ return res;
56
+ while (mbed_interface_connected());
57
+ return 0;
58
} else {
59
return -1;
60
61
62
63
int mbed_interface_powerdown(void) {
64
65
- return semihost_powerdown();
66
+ if ((res = semihost_powerdown()) != 0)
67
68
69
70
71
72
0 commit comments