projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
141d94f
)
Short UUIDs are measured in bytes, not bits -- update Service Discovery Protocol...
author
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 20 May 2010 13:06:04 +0000
(13:06 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 20 May 2010 13:06:04 +0000
(13:06 +0000)
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.h
patch
|
blob
|
blame
|
history
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
patch
|
blob
|
blame
|
history
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/AVRISP.txt
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.h
b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.h
index
d50f6b4
..
48e8e47
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.h
+++ b/
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.h
@@
-55,6
+55,8
@@
/** Bluetooth specification defined channel number for connectionless data */
#define BT_CHANNEL_CONNECTIONLESS 0x0002
/** Bluetooth specification defined channel number for connectionless data */
#define BT_CHANNEL_CONNECTIONLESS 0x0002
+ #define BT_ACL_FIRST_AUTOFLUSH (1 << 13)
+
#define BT_SIGNAL_COMMAND_REJECT 0x01
#define BT_SIGNAL_CONNECTION_REQUEST 0x02
#define BT_SIGNAL_CONNECTION_RESPONSE 0x03
#define BT_SIGNAL_COMMAND_REJECT 0x01
#define BT_SIGNAL_CONNECTION_REQUEST 0x02
#define BT_SIGNAL_CONNECTION_RESPONSE 0x03
@@
-82,9
+84,7
@@
#define BT_CONFIGURATION_UNKNOWNOPTIONS 0x0003
#define BT_CONFIG_OPTION_MTU 1
#define BT_CONFIGURATION_UNKNOWNOPTIONS 0x0003
#define BT_CONFIG_OPTION_MTU 1
-
- #define BT_ACL_FIRST_AUTOFLUSH (1 << 13)
-
+
/* Type Defines: */
/** Bluetooth ACL header structure, common to all ACL data packets. */
typedef struct
/* Type Defines: */
/** Bluetooth ACL header structure, common to all ACL data packets. */
typedef struct
diff --git
a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
index
4eb2621
..
c140c17
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
+++ b/
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
@@
-76,10
+76,17
@@
const ServiceTable_t SDP_Services_Table[] =
},
};
},
};
-/* Base UUID value common to all standardized Bluetooth services */
+/*
*
Base UUID value common to all standardized Bluetooth services */
const uint8_t BaseUUID[] = {BASE_96BIT_UUID, 0x00, 0x00, 0x00, 0x00};
const uint8_t BaseUUID[] = {BASE_96BIT_UUID, 0x00, 0x00, 0x00, 0x00};
+/** Main Service Discovery Protocol packet processing routine. This function processes incomming SDP packets from
+ * a connected Bluetooth device, and sends back appropriate responses to allow other devices to determine the
+ * services the local device exposes.
+ *
+ * \param[in] Data Incomming packet data containing the SDP request
+ * \param[in] Channel Channel the request was issued to by the remote device
+ */
void ServiceDiscovery_ProcessPacket(void* Data, Bluetooth_Channel_t* Channel)
{
SDP_PDUHeader_t* SDPHeader = (SDP_PDUHeader_t*)Data;
void ServiceDiscovery_ProcessPacket(void* Data, Bluetooth_Channel_t* Channel)
{
SDP_PDUHeader_t* SDPHeader = (SDP_PDUHeader_t*)Data;
@@
-209,7
+216,7
@@
static uint8_t ServiceDiscovery_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES],
uint8_t UUIDLength = ServiceDiscovery_GetDataElementSize(CurrentParameter, &ElementHeaderSize);
memcpy(CurrentUUID, BaseUUID, sizeof(BaseUUID));
uint8_t UUIDLength = ServiceDiscovery_GetDataElementSize(CurrentParameter, &ElementHeaderSize);
memcpy(CurrentUUID, BaseUUID, sizeof(BaseUUID));
- memcpy(&CurrentUUID[(UUIDLength <=
32) ? (sizeof(BaseUUID) - 32
) : 0], *CurrentParameter, UUIDLength);
+ memcpy(&CurrentUUID[(UUIDLength <=
4) ? (UUID_SIZE_BYTES - 4
) : 0], *CurrentParameter, UUIDLength);
BT_SDP_DEBUG(2, "-- UUID (%d): 0x%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
UUIDLength,
BT_SDP_DEBUG(2, "-- UUID (%d): 0x%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
UUIDLength,
diff --git
a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h
b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h
index
ccbfed4
..
7986d5e
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h
+++ b/
Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h
@@
-59,7
+59,10
@@
#define SDP_ATTRIBUTE_PROVIDER 0x0002
#define SDP_ATTRIBUTE_AVAILABILITY 0x0008
#define SDP_ATTRIBUTE_PROVIDER 0x0002
#define SDP_ATTRIBUTE_AVAILABILITY 0x0008
+ /** Size of a full 128 bit UUID, in bytes */
#define UUID_SIZE_BYTES 16
#define UUID_SIZE_BYTES 16
+
+ /** First 96 bits common to all standadized Bluetooth services */
#define BASE_96BIT_UUID 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00
/** Defines a service attribute as a string of characters.
#define BASE_96BIT_UUID 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00
/** Defines a service attribute as a string of characters.
@@
-97,7
+100,7
@@
* \param ... Data to associate with the attribute
*/
#define SERVICE_ATTRIBUTE_LEN32(name, type, size, ...) const ServiceAttributeData32Bit_t name PROGMEM = \
* \param ... Data to associate with the attribute
*/
#define SERVICE_ATTRIBUTE_LEN32(name, type, size, ...) const ServiceAttributeData32Bit_t name PROGMEM = \
- {.Header = (type | 7), .Size = size, .Data = __VA_ARGS__}
+
{.Header = (type | 7), .Size = size, .Data = __VA_ARGS__}
/** Terminator for a service attribute table of type \ref ServiceAttributeTable_t. */
#define SERVICE_ATTRIBUTE_TABLE_TERMINATOR {.Data = NULL}
/** Terminator for a service attribute table of type \ref ServiceAttributeTable_t. */
#define SERVICE_ATTRIBUTE_TABLE_TERMINATOR {.Data = NULL}
diff --git
a/Projects/AVRISP-MKII/AVRISP.txt
b/Projects/AVRISP-MKII/AVRISP.txt
index
9a9b1b0
..
8d00d35
100644
(file)
--- a/
Projects/AVRISP-MKII/AVRISP.txt
+++ b/
Projects/AVRISP-MKII/AVRISP.txt
@@
-115,7
+115,7
@@
* <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>
*
* \section Sec_PDI PDI Connections
* <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>
*
* \section Sec_PDI PDI Connections
- * Connections to the device for PDI programming
<b><sup>1</sup></b>
(when enabled):
+ * Connections to the device for PDI programming (when enabled):
*
* <table>
* <tr>
*
* <table>
* <tr>
@@
-159,7
+159,7
@@
* <b><sup>2</sup></b> <i>The AVR's Tx and Rx become the DATA line when connected together via a pair of 220 ohm resistors</i> \n
*
* \section Sec_TPI TPI Connections
* <b><sup>2</sup></b> <i>The AVR's Tx and Rx become the DATA line when connected together via a pair of 220 ohm resistors</i> \n
*
* \section Sec_TPI TPI Connections
- * Connections to the device for TPI programming
<b><sup>1</sup></b>
(when enabled):
+ * Connections to the device for TPI programming (when enabled):
*
* <table>
* <tr>
*
* <table>
* <tr>
@@
-241,7
+241,8
@@
* <tr>
* <td>VTARGET_ADC_CHANNEL</td>
* <td>Makefile CDEFS</td>
* <tr>
* <td>VTARGET_ADC_CHANNEL</td>
* <td>Makefile CDEFS</td>
- * <td>ADC channel number (on supported AVRs) to use for VTARGET level detection, if NO_VTARGET_DETECT is not defined.</td>
+ * <td>ADC channel number (on supported AVRs) to use for VTARGET level detection, if NO_VTARGET_DETECT is not defined.
+ * <i>Ignored when compiled for targets lacking an ADC.</i></td>
* </tr>
* <tr>
* <td>ENABLE_ISP_PROTOCOL</td>
* </tr>
* <tr>
* <td>ENABLE_ISP_PROTOCOL</td>
@@
-257,7
+258,8
@@
* <td>NO_VTARGET_DETECT</td>
* <td>Makefile CDEFS</td>
* <td>Define to disable VTARGET sampling and reporting on AVR models with an ADC converter. This will cause the programmer
* <td>NO_VTARGET_DETECT</td>
* <td>Makefile CDEFS</td>
* <td>Define to disable VTARGET sampling and reporting on AVR models with an ADC converter. This will cause the programmer
- * to report a fixed 5V target voltage to the host regardless of the real target voltage.</td>
+ * to report a fixed 5V target voltage to the host regardless of the real target voltage. <i>Ignored when compiled for
+ * targets lacking an ADC.</i></td>
* </tr>
* <tr>
* <td>LIBUSB_DRIVER_COMPAT</td>
* </tr>
* <tr>
* <td>LIBUSB_DRIVER_COMPAT</td>