|
From: Peter K. <pk...@us...> - 2001-10-21 10:33:11
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.104 1.105=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added dummy versions of bt_use_bcsp() and bt_dfu_mode() for
user mode stack.
The diff of the modified file(s):
--- btd.c 2001/10/10 14:53:01 1.104
+++ btd.c 2001/10/21 10:33:10 1.105
@@ -205,6 +205,8 @@
void bt_rfcomm_connection_ready(int status);
void bt_sdp_connection_ready(int status);
int bt_initiated(void);
+int bt_use_bcsp(int new_use_bcsp);
+int bt_dfu_mode(int new_dfu_mode);
extern int bt_read_proc(char *buf, int len);
bt_stat_struct bt_stat;
static int bt_initdone =3D 0;
@@ -2469,6 +2471,16 @@
int bt_initiated(void)
{
return bt_initdone;
+}
+
+int bt_use_bcsp(int new_use_bcsp)
+{
+ return 0;
+}
+
+int bt_dfu_mode(int new_dfu_mode)
+{
+ return 0;
}
=20
/* TCP socket */
|
|
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 */
|
|
From: Peter K. <pk...@us...> - 2002-09-27 12:52:49
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.106 1.107=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added dummy bt_handle_hw_error().
The diff of the modified file(s):
--- btd.c 10 May 2002 12:29:51 -0000 1.106
+++ btd.c 27 Sep 2002 12:52:48 -0000 1.107
@@ -2486,6 +2486,12 @@
return 0;
}
=20
+void
+bt_handle_hw_error(u8 error)
+{
+ printf(__FUNCTION__ ": Received error with code 0x%02X, ignoring\n", err=
or);
+}
+
/* TCP socket */
static int open_tcpsocket(char *addrstr, int role)
{
|
|
From: Peter K. <pk...@us...> - 2003-05-05 10:43:53
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.107 1.108=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Made the user mode stack build again after the latest changes.
If it actually works? I have no idea, but I would not bet on it...
The diff of the modified file(s):
--- btd.c 2002/09/27 12:52:48 1.107
+++ btd.c 2003/05/05 10:43:49 1.108
@@ -1611,6 +1611,8 @@
else if(sscanf(buf, "bb_conn %x:%x:%x:%x:%x:%x",
&bd[5], &bd[4], &bd[3], &bd[2], &bd[1], &bd[0]) =3D=3D 6)
{
+ unsigned char class_of_dev[3] =3D { 0, 0, 0 };
+
for (i =3D 0; i < 6; i++)
{
tmp_bd[i] =3D (unsigned char)bd[i];
@@ -1621,13 +1623,13 @@
=20
/* we must store bd address in l2cap con to keep track of peer */
=20
- l2cap_create_con(tmp_bd);
+ l2cap_create_con(tmp_bd, class_of_dev);
lp_connect_req(tmp_bd);
}
else if(sscanf(buf, "bb_disc %d", &i) =3D=3D 1)
{
printf("Disconnecting hci handle %d\n", i);
- lp_disconnect((unsigned short)i);
+ lp_disconnect((unsigned short)i, TRUE);
}
=20=20=20
#endif /* BTD_USERSTACK */
@@ -2574,6 +2576,11 @@
}
=20
return client_sockfd;
+}
+
+unsigned long min(unsigned long a, unsigned long b)
+{
+ return a < b ? a : b;
}
=20
#endif /* BTD_USERSTACK */
|