Commit 5aef0b621b3e8854479ea5d95970acd4666c5f19
1 parent
8f7e33bb
--no commit message
Showing
2 changed files
with
34 additions
and
0 deletions
Project/applications/smartcities/callbacks.c
0 → 100644
1 | +#include "callbacks.h" | ||
2 | + | ||
3 | +void dhcp_connect_result_cb(int result) | ||
4 | +{ | ||
5 | + libwismart_ip_addr_t ip; | ||
6 | + if(result==LIBWISMART_DHCP_ADDRESS_ASSIGNED) | ||
7 | + { | ||
8 | + libwismart_GetCurrentIP(&ip,NULL,NULL); | ||
9 | + printf("IP: %d.%d.%d.%d \r\n",ip.addr[3],ip.addr[2],ip.addr[1],ip.addr[0]); | ||
10 | + } | ||
11 | + else if(result==LIBWISMART_DHCP_TIMEOUT) | ||
12 | + { | ||
13 | + printf("DHCP timeout\r\n"); | ||
14 | + } | ||
15 | + else | ||
16 | + { | ||
17 | + printf("DHCP error\r\n"); | ||
18 | + } | ||
19 | + | ||
20 | +} | ||
21 | + | ||
22 | +void wifi_connect_result_cb(int result) | ||
23 | +{ | ||
24 | + printf("WiFi Connect indication: %s\r\n", (result == WISMART_WIFI_CONNECTED) ? "Connected": "Failed\r\n"); | ||
25 | +} | ||
0 | \ No newline at end of file | 26 | \ No newline at end of file |
Project/applications/smartcities/include/callbacks.h
0 → 100644