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:
55aadf9
)
Minor demo/project documentation and style fixes.
author
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 11 Jul 2011 05:49:53 +0000
(
05:49
+0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 11 Jul 2011 05:49:53 +0000
(
05:49
+0000)
Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/XPLAINBridge.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c
b/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c
index
360dfad
..
be6bf10
100644
(file)
--- a/
Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c
+++ b/
Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c
@@
-41,7
+41,7
@@
*
* This routine checks to ensure that the attached device's VID and PID matches Google's for Android devices.
*
*
* This routine checks to ensure that the attached device's VID and PID matches Google's for Android devices.
*
- * \return An error code from the \ref
Bluetooth
Host_GetDeviceDescriptorDataCodes_t enum.
+ * \return An error code from the \ref
Android
Host_GetDeviceDescriptorDataCodes_t enum.
*/
uint8_t ProcessDeviceDescriptor(void)
{
*/
uint8_t ProcessDeviceDescriptor(void)
{
@@
-55,9
+55,9
@@
uint8_t ProcessDeviceDescriptor(void)
if (DeviceDescriptor.Header.Type != DTYPE_Device)
return InvalidDeviceDataReturned;
if (DeviceDescriptor.Header.Type != DTYPE_Device)
return InvalidDeviceDataReturned;
- /* Validate returned device
Class, SubClass and Protocol values against the Bluetooth
spec values */
+ /* Validate returned device
Vendor ID against the Android ADK
spec values */
if (DeviceDescriptor.VendorID != ANDROID_VENDOR_ID)
if (DeviceDescriptor.VendorID != ANDROID_VENDOR_ID)
-
return IncorrectAndroidDevice;
+ return IncorrectAndroidDevice;
/* Check the product ID to determine if the Android device is in accessory mode */
if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
/* Check the product ID to determine if the Android device is in accessory mode */
if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
diff --git
a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
index
b25a37e
..
48d6035
100644
(file)
--- a/
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
+++ b/
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
@@
-68,13
+68,13
@@
static uint8_t MassStore_SendCommand(MS_CommandBlockWrapper_t* const SCSICommand
{
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
{
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
- /* Each transmission should have a unique tag value, increment before use */
- SCSICommandBlock->Tag = ++MassStore_Tag;
-
/* Wrap Tag value when invalid - MS class defines tag values of 0 and 0xFFFFFFFF to be invalid */
/* Wrap Tag value when invalid - MS class defines tag values of 0 and 0xFFFFFFFF to be invalid */
- if (MassStore_Tag == 0xFFFFFFFF)
+ if (
++
MassStore_Tag == 0xFFFFFFFF)
MassStore_Tag = 1;
MassStore_Tag = 1;
+ /* Each transmission should have a unique tag value, increment before use */
+ SCSICommandBlock->Tag = MassStore_Tag;
+
/* Select the OUT data pipe for CBW transmission */
Pipe_SelectPipe(MASS_STORE_DATA_OUT_PIPE);
Pipe_Unfreeze();
/* Select the OUT data pipe for CBW transmission */
Pipe_SelectPipe(MASS_STORE_DATA_OUT_PIPE);
Pipe_Unfreeze();
@@
-95,7
+95,7
@@
static uint8_t MassStore_SendCommand(MS_CommandBlockWrapper_t* const SCSICommand
/* Freeze pipe after use */
Pipe_Freeze();
/* Freeze pipe after use */
Pipe_Freeze();
- /* Send data if any */
+ /* Send data if any
has been given
*/
if ((BufferPtr != NULL) &&
((ErrorCode = MassStore_SendReceiveData(SCSICommandBlock, BufferPtr)) != PIPE_READYWAIT_NoError))
{
if ((BufferPtr != NULL) &&
((ErrorCode = MassStore_SendReceiveData(SCSICommandBlock, BufferPtr)) != PIPE_READYWAIT_NoError))
{
diff --git
a/Projects/XPLAINBridge/XPLAINBridge.c
b/Projects/XPLAINBridge/XPLAINBridge.c
index
41ebabd
..
d79c62d
100644
(file)
--- a/
Projects/XPLAINBridge/XPLAINBridge.c
+++ b/
Projects/XPLAINBridge/XPLAINBridge.c
@@
-64,16
+64,16
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
};
/** Circular buffer to hold data from the host before it is sent to the device via the serial port. */
};
/** Circular buffer to hold data from the host before it is sent to the device via the serial port. */
-RingBuffer_t USBtoUART_Buffer;
+RingBuffer_t
USBtoUART_Buffer;
/** Underlying data buffer for \ref USBtoUART_Buffer, where the stored bytes are located. */
/** Underlying data buffer for \ref USBtoUART_Buffer, where the stored bytes are located. */
-static uint8_t
USBtoUART_Buffer_Data[128];
+static uint8_t USBtoUART_Buffer_Data[128];
/** Circular buffer to hold data from the serial port before it is sent to the host. */
/** Circular buffer to hold data from the serial port before it is sent to the host. */
-RingBuffer_t UARTtoUSB_Buffer;
+RingBuffer_t
UARTtoUSB_Buffer;
/** Underlying data buffer for \ref UARTtoUSB_Buffer, where the stored bytes are located. */
/** Underlying data buffer for \ref UARTtoUSB_Buffer, where the stored bytes are located. */
-static uint8_t
UARTtoUSB_Buffer_Data[128];
+static uint8_t UARTtoUSB_Buffer_Data[128];
/** Main program entry point. This routine contains the overall program flow, including initial
/** Main program entry point. This routine contains the overall program flow, including initial