aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-06-01 11:07:29 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-06-01 11:07:29 +0000
commit3f3fdb01a9d06d7ea20f02fcf8c464055f72b5bb (patch)
treef3de5f246bc245a81b01508176d919638d62bcb1 /Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h
parentcb52e4371e770e79b3648120452fc4df908887a3 (diff)
downloadlufa-3f3fdb01a9d06d7ea20f02fcf8c464055f72b5bb.tar.gz
lufa-3f3fdb01a9d06d7ea20f02fcf8c464055f72b5bb.tar.bz2
lufa-3f3fdb01a9d06d7ea20f02fcf8c464055f72b5bb.zip
Much faster attribute range lookup - look through short list of attributes and compare to range, rather than looking up by each possible value within the range.
Cleanups to SDP code. Add missing RFCOMM language base ID offset attribute. Fix incorrect definition of the SWAPENDIAN_32() macro.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h b/Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h
index 92fe226bc..0fd0aa4ed 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/SDPServices.h
@@ -49,13 +49,13 @@
#define SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE 0x0000
#define SDP_ATTRIBUTE_ID_SERVICECLASSIDS 0x0001
#define SDP_ATTRIBUTE_ID_LANGIDOFFSET 0x0006
- #define SDP_ATTRIBUTE_ID_AVAILABILITY 0x0008
#define SDP_ATTRIBUTE_ID_VERSION 0x0200
#define SDP_ATTRIBUTE_ID_SERVICENAME 0x0100
#define SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION 0x0101
#define SWAPENDIAN_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))
- #define SWAPENDIAN_32(x) (SWAPENDIAN_16(((x) & 0xFFFF0000) >> 16) | SWAPENDIAN_16(((x) & 0x0000FFFF) << 16))
+ #define SWAPENDIAN_32(x) ((((x) & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8) | \
+ (((x) & 0x0000FF00) << 8) | (((x) & 0x000000FF) << 24))
/** Terminator for a service attribute table of type \ref ServiceAttributeTable_t. */
#define SERVICE_ATTRIBUTE_TABLE_TERMINATOR {.Data = NULL}