Skip to contentSkip to conversation

[5342] Add a "null" bluetooth HCI and a header file for bluetooth.

Qemu-devel Andrzej Zaborowski 1 participant 1 message Sep 28, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 5342

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5342
Author:   balrog
Date:     2008-09-28 23:19:47 +0000 (Sun, 28 Sep 2008)

Log Message:
-----------
Add a "null" bluetooth HCI and a header file for bluetooth.

Modified Paths:
--------------
trunk/Makefile
trunk/hw/nseries.c
trunk/net.h
trunk/qemu-common.h
trunk/vl.c

Added Paths:
-----------
trunk/hw/bt.c
trunk/hw/bt.h

Modified: trunk/Makefile
===================================================================

Makefile +1 -0
@@ -81,6 +81,7 @@
 OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
 OBJS+=sd.o ssi-sd.o
+OBJS+=bt.o
 
 ifdef CONFIG_BRLAPI
 OBJS+= baum.o

Added: trunk/hw/bt.c
===================================================================

hw/bt.c +123 -0

123 lines not on this page · raw message

Added: trunk/hw/bt.h
===================================================================

hw/bt.h +105 -0

105 lines not on this page · raw message

Modified: trunk/hw/nseries.c
===================================================================

hw/nseries.c +1 -4
@@ -31,6 +31,7 @@
 #include "devices.h"
 #include "flash.h"
 #include "hw.h"
+#include "bt.h"
 
 /* Nokia N8x0 support */
 struct n800_s {
@@ -122,10 +123,6 @@
 
 #define N8X0_BD_ADDR			0x00, 0x1a, 0x89, 0x9e, 0x3e, 0x81
 
-typedef struct {
-    uint8_t b[6];
-} __attribute__((packed)) bdaddr_t;	/* XXX: move to BT headers */
-
 static void n800_mmc_cs_cb(void *opaque, int line, int level)
 {
     /* TODO: this seems to actually be connected to the menelaus, to

Modified: trunk/net.h
===================================================================

net.h +14 -0
@@ -48,6 +48,20 @@
 extern int nb_nics;
 extern NICInfo nd_table[MAX_NICS];
 
+/* BT HCI info */
+
+struct HCIInfo {
+    int (*bdaddr_set)(struct HCIInfo *hci, const uint8_t *bd_addr);
+    void (*cmd_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void (*sco_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void (*acl_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void *opaque;
+    void (*evt_recv)(void *opaque, const uint8_t *data, int len);
+    void (*acl_recv)(void *opaque, const uint8_t *data, int len);
+};
+
+struct HCIInfo *qemu_next_hci(void);
+
 /* checksumming functions (net-checksum.c) */
 uint32_t net_checksum_add(int len, uint8_t *buf);
 uint16_t net_checksum_finish(uint32_t sum);

Modified: trunk/qemu-common.h
===================================================================

qemu-common.h +1 -0
@@ -116,6 +116,7 @@
 /* A load of opaque types so that device init declarations don't have to
    pull in all the real definitions.  */
 typedef struct NICInfo NICInfo;
+typedef struct HCIInfo HCIInfo;
 typedef struct AudioState AudioState;
 typedef struct BlockDriverState BlockDriverState;
 typedef struct DisplayState DisplayState;

Modified: trunk/vl.c
===================================================================

vl.c +56 -0

68 lines not on this page · raw message