xref: /haiku/src/servers/bluetooth/HCITransportAccessor.cpp (revision cfc3fa87da824bdf593eb8b817a83b6376e77935)
1 /*
2  * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3  *
4  * All rights reserved. Distributed under the terms of the MIT License.
5  *
6  */
7 
8 
9 #include <String.h>
10 
11 #include "BluetoothServer.h"
12 #include "HCITransportAccessor.h"
13 #include "Output.h"
14 
15 HCITransportAccessor::HCITransportAccessor(BPath* path) : HCIDelegate(path)
16 {
17 
18 
19 }
20 
21 status_t
22 HCITransportAccessor::IssueCommand(raw_command rc, size_t size)
23 {
24 	if (GetID() < 0 || fFD < 0)
25 		return B_ERROR;
26 
27 printf("### Command going: len = %ld\n", size);
28 for (uint16 index = 0 ; index < size; index++ ) {
29 	printf("%x:",((uint8*)rc)[index]);
30 }
31 printf("### \n");
32 
33 
34 	return ioctl(fFD, ISSUE_BT_COMMAND, rc, size);
35 }
36