summaryrefslogtreecommitdiff
path: root/tools/hciattach.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-10-29 15:48:52 -0700
committerMarcel Holtmann <marcel@holtmann.org>2012-10-29 15:48:52 -0700
commit2c33d253f500ce604315e6f8ffbc7b2efcc3d20f (patch)
tree7c22e169fae5c423495ceb3466e578c7d3d05586 /tools/hciattach.c
parent1dbe2217a4cc18f1263408027749e52a2ec9a190 (diff)
downloadbluez-2c33d253f500ce604315e6f8ffbc7b2efcc3d20f.tar.gz
hciattach: Allow creating AMP controller over UART
Diffstat (limited to 'tools/hciattach.c')
-rw-r--r--tools/hciattach.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/hciattach.c b/tools/hciattach.c
index d19fa33fc..09aed24d1 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -68,6 +68,7 @@ struct uart_t {
};
#define FLOW_CTL 0x0001
+#define AMP_DEV 0x0002
#define ENABLE_PM 1
#define DISABLE_PM 0
@@ -1154,6 +1155,10 @@ struct uart_t uart[] = {
{ "3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 115200,
0, DISABLE_PM, NULL, NULL, NULL },
+ /* AMP controller UART */
+ { "amp", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200,
+ AMP_DEV, DISABLE_PM, NULL, NULL, NULL },
+
{ NULL, 0 }
};
@@ -1187,6 +1192,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
if (raw)
flags |= 1 << HCI_UART_RAW_DEVICE;
+ if (u->flags & AMP_DEV)
+ flags |= 1 << HCI_UART_CREATE_AMP;
+
fd = open(dev, O_RDWR | O_NOCTTY);
if (fd < 0) {
perror("Can't open serial port");