|
From: Mattias ?g. <mat...@us...> - 2001-03-02 14:28:15
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_vendor.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
added baudrate setting call for CSR
removed unused code
minor changes
The diff of the modified file(s):
--- bt_vendor.c 2001/03/02 10:59:57 1.1
+++ bt_vendor.c 2001/03/02 14:29:32 1.2
@@ -321,6 +321,7 @@
/* Set the phys device to CSR default, 115200 */=20
void init_phys(int fd)
{
+ syslog(LOG_INFO, "Setting default baud 115200");
fd_setup(fd, 115200, USE_FLOW_CTRL);
}
=20
@@ -349,6 +350,17 @@
perror("HCIWRITESCANENABLE");
exit(1);
}
+
+ sleep(1);
+
+ syslog(LOG_INFO, "Setting baudrate in CSR module!\n");=20=20
+
+ bt_set_baudrate(bt_cfd, spd);
+=20=20
+ /* Now set phys device speed to whatever HW was set to use */
+ fd_setup(phys_fd, spd, USE_FLOW_CTRL);
+ tcflush(phys_fd, TCIOFLUSH);
+
#else
printf("Setting write_scan_enable in CSR module!\n");
hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);
@@ -367,14 +379,6 @@
=20
}
=20=20
-void
-reset_hw(void)
-{
- printf("ERROR! Do not know how to reset hardware.\n");
-}
-
-
-
#elif HW_USED(HW_GENERIC)
/* =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*/
/* Generic specific commands */
@@ -404,13 +408,6 @@
#endif
}
=20
-void
-reset_hw(void)
-{
- printf("ERROR! Do not know how to reset hardware.\n");
-}
-
-
#elif HW_USED(HW_NOINIT)
/* =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*/
/* HW No init commands */
@@ -427,12 +424,6 @@
printf("No hw init done\n");
}
=20
-void
-reset_hw(void)
-{
- printf("ERROR! No hardware.\n");
-}
-
#else
/* =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*/
/* Default */
@@ -448,11 +439,6 @@
printf("ERROR: init_hw() not implemented!\n");
}
=20
-void
-reset_hw(void)
-{
- printf("ERROR: reset_hw() not implemented!\n");
-}
=20
#endif /* HW_USED() */
=20
|