mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
wireless/bluetooth: Support removable bluetooth modules.
This bluetooth stack remains in an inconsistent state when the bluetooth HCI module is removed. This change adds a bt_netdev_unregister function that can be used to clean up after a module is removed. Some global variables are also set to their default values.
This commit is contained in:
@@ -119,4 +119,21 @@ struct bt_driver_s
|
||||
|
||||
int bt_netdev_register(FAR struct bt_driver_s *btdev);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: bt_netdev_unregister
|
||||
*
|
||||
* Description:
|
||||
* Unregister a network driver registered by bt_netdev_register.
|
||||
*
|
||||
* Input Parameters:
|
||||
* btdev - An instance of the low-level driver interface structure.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. Otherwise a negated errno value is
|
||||
* returned to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int bt_netdev_unregister(FAR struct bt_driver_s *btdev);
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_WIRELESS_BLUETOOTH_BT_DRIVER_H */
|
||||
|
||||
Reference in New Issue
Block a user