Skip to content

Commit ad66ebb

Browse files
authored
Merge pull request #89 from ARMmbed/DeprecatedAPIs
Deprecated API updates
2 parents 0af9cdb + 43c2ce9 commit ad66ebb

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

drivers/COMPONENT_WIFI_ISM43362.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/wifi-ism43362/#1c040113be0fe2a14c4b6107e1db3ec24e8b20b6
1+
https://github.com/ARMmbed/wifi-ism43362/#1978369b2310ea3955715b67869b717fd224a74c

main.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ----------------------------------------------------------------------------
2-
// Copyright 2016-2019 ARM Ltd.
2+
// Copyright 2016-2020 ARM Ltd.
33
//
44
// SPDX-License-Identifier: Apache-2.0
55
//
@@ -36,6 +36,7 @@ static M2MResource* m2m_get_res;
3636
static M2MResource* m2m_put_res;
3737
static M2MResource* m2m_post_res;
3838
static M2MResource* m2m_deregister_res;
39+
static SocketAddress sa;
3940

4041
EventQueue queue(32 * EVENTS_EVENT_SIZE);
4142
Thread t;
@@ -139,8 +140,12 @@ int main(void)
139140
printf("NetworkInterface failed to connect with %d\n", status);
140141
return -1;
141142
}
142-
143-
printf("Network initialized, connected with IP %s\n\n", network->get_ip_address());
143+
status = network->get_ip_address(&sa);
144+
if (status!=0) {
145+
printf("get_ip_address failed with %d\n", status);
146+
return -2;
147+
}
148+
printf("Network initialized, connected with IP %s\n\n", sa.get_ip_address());
144149

145150
// Run developer flow
146151
printf("Start developer flow\n");
@@ -224,7 +229,7 @@ int main(void)
224229
} else if (in_char == 'r') {
225230
(void) fcc_storage_delete(); // When 'r' is pressed, erase storage and reboot the board.
226231
printf("Storage erased, rebooting the device.\n\n");
227-
wait(1);
232+
ThisThread::sleep_for(1*1000);
228233
NVIC_SystemReset();
229234
} else if (in_char > 0 && in_char != 0x03) { // Ctrl+C is 0x03 in Mbed OS and Linux returns negative number
230235
value_increment(); // Simulate button press

0 commit comments

Comments
 (0)