Diff between ec7a4ee8cfe5c89c52019a5aa6ca0c1e29999250 and fefe4edf13f576523e130bc74916daf25f6fb557

Changed Files

File Additions Deletions Status
emulator/btdev.c +8 -0 modified
emulator/btdev.h +2 -0 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 700c6a8..048a5fd 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -268,6 +268,14 @@ void btdev_destroy(struct btdev *btdev)
 	free(btdev);
 }
 
+void btdev_set_bdaddr(struct btdev *btdev, uint8_t *bdaddr)
+{
+	if (!btdev)
+		return;
+
+	memcpy(btdev->bdaddr, bdaddr, 6);
+}
+
 void btdev_set_send_handler(struct btdev *btdev, btdev_send_func handler,
 							void *user_data)
 {
diff --git a/emulator/btdev.h b/emulator/btdev.h
index db170d3..1a4be37 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
@@ -38,6 +38,8 @@ struct btdev;
 struct btdev *btdev_create(enum btdev_type type, uint16_t id);
 void btdev_destroy(struct btdev *btdev);
 
+void btdev_set_bdaddr(struct btdev *btdev, uint8_t *bdaddr);
+
 void btdev_set_send_handler(struct btdev *btdev, btdev_send_func handler,
 							void *user_data);