mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-10 11:10:03 +00:00
Added return value (success / failure ) to nimble_port_init
This commit is contained in:
committed by
Abhinav Kudnar
parent
9b6c19b398
commit
6336a6de85
@@ -21,7 +21,7 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
nimble_port_init();
|
||||
int ret = nimble_port_init();
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ int main(int argc, char *argv[])
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
nimble_port_init();
|
||||
ble_hci_sock_init();
|
||||
ret = nimble_port_init();
|
||||
|
||||
/* This example provides GATT Alert service */
|
||||
ble_svc_gap_init();
|
||||
|
||||
@@ -79,8 +79,8 @@ int main(int argc, char *argv[])
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
nimble_port_init();
|
||||
ble_hci_sock_init();
|
||||
ret = nimble_port_init();
|
||||
|
||||
ble_svc_gap_init();
|
||||
ble_svc_gatt_init();
|
||||
|
||||
@@ -87,7 +87,12 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
printf("port init\n");
|
||||
nimble_port_init();
|
||||
|
||||
ret = nimble_port_init();
|
||||
if (ret != 0) {
|
||||
printf(" Failed to init nimble %d \n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
printf("hci init\n");
|
||||
ble_hci_sock_init();
|
||||
|
||||
Reference in New Issue
Block a user