chengkai15 commented on code in PR #14224:
URL: https://github.com/apache/nuttx/pull/14224#discussion_r1804040566
##########
arch/sim/src/sim/sim_hcisocket.c:
##########
@@ -332,35 +305,17 @@ int sim_bthcisock_register(int dev_id)
return -ENOMEM;
}
-#if defined(CONFIG_BLUETOOTH_BRIDGE)
- ret = bt_bridge_register(&dev->drv, &btdrv, &bledrv);
- if (ret < 0)
- {
- goto end;
- }
-
- ret = bthcisock_driver_register(btdrv, dev_id, true);
- if (ret < 0)
- {
- goto end;
- }
-
- ret = bthcisock_driver_register(bledrv, dev_id, false);
- if (ret < 0)
- {
- goto end;
- }
-
-end:
-#else
- ret = bthcisock_driver_register(&dev->drv, dev_id, true);
-#endif
-
+#ifdef CONFIG_DRIVERS_BLUETOOTH
+ ret = bt_driver_register_with_id(&dev->drv, dev_id);
if (ret < 0)
{
+ wlerr("bt_driver_register error: %d\n", ret);
bthcisock_free(dev);
return ret;
}
+#else
+# error "Please select CONFIG_DRIVERS_BLUETOOTH"
Review Comment:
done, like this
```
#else
# error "Please select CONFIG_DRIVERS_BLUETOOTH"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]