Added return value (success / failure ) to nimble_port_init

This commit is contained in:
Rahul Tank
2024-02-14 18:51:52 +05:30
committed by Abhinav Kudnar
parent 9b6c19b398
commit 6336a6de85
6 changed files with 68 additions and 21 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
int main(int argc, char **argv)
{
nimble_port_init();
int ret = nimble_port_init();
return 0;
return ret;
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+6 -1
View File
@@ -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();