|
From: Alain P. <apa...@us...> - 2002-05-10 12:29:53
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.105 1.106=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added specific functions for new bluetooth hardware from Texas Instruments.
The diff of the modified file(s):
--- btd.c 21 Oct 2001 10:33:10 -0000 1.105
+++ btd.c 10 May 2002 12:29:51 -0000 1.106
@@ -322,6 +322,8 @@
static void ericsson_init_hw(int spd);
static void infineon_init_phys(int fd);
static void infineon_init_hw(int spd);
+static void texasinstruments_init_phys(int fd);
+static void texasinstruments_init_hw(int spd);
static void usb_init_phys(int fd);
static void usb_init_hw(int spd);
static void generic_init_phys(int fd);
@@ -428,6 +430,7 @@
#define HW_GENERIC 5
#define HW_NO_INIT 6
#define HW_UNKNOWN 7
+#define HW_TEXASINSTRUMENTS 8
=20
/*=20
Bluetooth discipline define. Should reside in /include/asm/termios.h
@@ -3235,6 +3238,10 @@
infineon_init_phys(fd);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_phys(fd);
+ break;
+
case HW_USB:
usb_init_phys(fd);
break;
@@ -3275,6 +3282,10 @@
infineon_init_hw(spd);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_hw(spd);
+ break;
+
case HW_USB:
usb_init_hw(spd);
break;
@@ -3313,6 +3324,8 @@
hw_vendor =3D HW_ERICSSON;
else if (!strcmp(vendor, "Infineon"))
hw_vendor =3D HW_INFINEON;
+ else if (!strcmp(vendor, "Texas Instruments"))
+ hw_vendor =3D HW_TEXASINSTRUMENTS;
else if (!strcmp(vendor, "USB"))
hw_vendor =3D HW_USB;
else if (!strcmp(vendor, "Generic"))
@@ -3520,6 +3533,46 @@
hci_set_baudrate(spd);=20=20
#endif
}
+
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/* Texas Instruments specific commands =
*/
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+void texasinstruments_init_phys(int fd)
+{
+ fd_setup(fd, 115200, USE_FLOW_CTRL);
+}
+
+void
+texasinstruments_init_hw(int spd)
+{
+#ifndef BTD_USERSTACK
+ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+=20=20
+ sleep(1);
+ printf("Setting write_scan_enable in Texas Instruments chip!\n");
+ if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
+ {=20
+ perror("HCIWRITESCANENABLE");
+ exit(1);
+ }
+
+ sleep(1); // wait for HW...=20
+ printf("Setting baudrate in Texas Instruments module : not supported\n")=
;=20=20
+
+#else=20=20
+ printf("Setting write_scan_enable in Texas Instruments chip!\n");
+ hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);=20=20=20=20=
=20=20=20=20=20=20
+ sleep(1); /* wait for HW... */
+=20=20
+ tcflush(phys_fd, TCIOFLUSH);
+
+ printf("Setting baudrate in Texas Instruments chip : not supported\n");
+ hci_set_baudrate(spd);=20=20
+#endif
+}
+
+
=20
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
/* USB specific commands */
|