aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-08-31 07:48:32 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-08-31 07:48:32 +0000
commit7fbb75928749b74a0964ad159159066967191243 (patch)
treeac8533e4dcd4853c6a6f55f08a2e01d73ae3bf72 /Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c
parent813e6f0318090135c652eb7348b154576faa680c (diff)
downloadlufa-7fbb75928749b74a0964ad159159066967191243.tar.gz
lufa-7fbb75928749b74a0964ad159159066967191243.tar.bz2
lufa-7fbb75928749b74a0964ad159159066967191243.zip
Changed the parameters and behaviour of the USB_GetDeviceConfigDescriptor() function so that it now performs size checks and data validations internally, to simplify user code.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c b/Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c
index f68f957c0..994352108 100644
--- a/Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c
+++ b/Demos/Host/Incomplete/BluetoothHost/DeviceDescriptor.c
@@ -41,7 +41,8 @@ uint8_t ProcessDeviceDescriptor(void)
/* Validate returned data - ensure the returned data is a device descriptor */
if (DeviceDescriptor.Header.Type != DTYPE_Device)
return InvalidDeviceDataReturned;
-
+
+ /* Validate returned device Class, SubClass and Protocol values against the Bluetooth spec values */
if ((DeviceDescriptor.Class != BLUETOOTH_DEVICE_CLASS) ||
(DeviceDescriptor.SubClass != BLUETOOTH_DEVICE_SUBCLASS) ||
(DeviceDescriptor.Protocol != BLUETOOTH_DEVICE_PROTOCOL))