Fixed Set/Clear Feature requests directed to a non-configured endpoint not returning...
[pub/USBasp.git] / Demos / Host / Incomplete / BluetoothHost / Lib / ServiceDiscoveryProtocol.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2010.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 #ifndef _SERVICEDISCOVERYPROTOCOL_H_
32 #define _SERVICEDISCOVERYPROTOCOL_H_
33
34 /* Includes: */
35 #include <avr/io.h>
36 #include <string.h>
37 #include <stdbool.h>
38 #include <stdio.h>
39
40 #include <LUFA/Common/Common.h>
41 #include <LUFA/Drivers/Peripheral/SerialStream.h>
42
43 #include "BluetoothStack.h"
44
45 /* Macros: */
46 #define BT_SDP_DEBUG(l, s, ...) do { if (SDP_DEBUG_LEVEL >= l) printf_P(PSTR("(SDP) " s "\r\n"), __VA_ARGS__); } while (0)
47 #define SDP_DEBUG_LEVEL 2
48
49 #define SDP_PDU_ERRORRESPONSE 0x01
50 #define SDP_PDU_SERVICESEARCHREQUEST 0x02
51 #define SDP_PDU_SERVICESEARCHRESPONSE 0x03
52 #define SDP_PDU_SERVICEATTRIBUTEREQUEST 0x04
53 #define SDP_PDU_SERVICEATTRIBUTERESPONSE 0x05
54 #define SDP_PDU_SERVICESEARCHATTRIBUTEREQUEST 0x06
55 #define SDP_PDU_SERVICESEARCHATTRIBUTERESPONSE 0x07
56
57 /* Type Defines: */
58 typedef struct
59 {
60 uint8_t PDU;
61 uint16_t TransactionID;
62 uint16_t ParameterLength;
63 } SDP_PDUHeader_t;
64
65 /* Function Prototypes: */
66 void ServiceDiscovery_ProcessPacket(void* Data, uint16_t Length, Bluetooth_Channel_t* Channel);
67
68 #endif