projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5de3641
)
Minor code cleanups for clarity.
author
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 11 Nov 2009 09:09:39 +0000
(09:09 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 11 Nov 2009 09:09:39 +0000
(09:09 +0000)
Bootloaders/DFU/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/TeensyHID/TeensyHID.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/CDC/CDC.c
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/Sideshow/Sideshow.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/SerialStream.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/SerialStream.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/DevChapter9.c
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/DeviceSupport.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/FutureChanges.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/LUFAPoweredProjects.txt
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/DFU/Descriptors.c
b/Bootloaders/DFU/Descriptors.c
index
6fcdc4b
..
eb5c580
100644
(file)
--- a/
Bootloaders/DFU/Descriptors.c
+++ b/
Bootloaders/DFU/Descriptors.c
@@
-108,7
+108,7
@@
USB_Descriptor_Configuration_t ConfigurationDescriptor =
\r
.Attributes = (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),
\r
\r
\r
.Attributes = (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),
\r
\r
- .DetachTimeout = 0x0000,
\r
+ .DetachTimeout
= 0x0000,
\r
.TransferSize = 0x0c00,
\r
\r
.DFUSpecification = VERSION_BCD(01.01)
\r
.TransferSize = 0x0c00,
\r
\r
.DFUSpecification = VERSION_BCD(01.01)
\r
diff --git
a/Bootloaders/TeensyHID/TeensyHID.c
b/Bootloaders/TeensyHID/TeensyHID.c
index
f3d86a6
..
4b9224a
100644
(file)
--- a/
Bootloaders/TeensyHID/TeensyHID.c
+++ b/
Bootloaders/TeensyHID/TeensyHID.c
@@
-41,7
+41,6
@@
*/
\r
bool RunBootloader = true;
\r
\r
*/
\r
bool RunBootloader = true;
\r
\r
-
\r
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
\r
* runs the bootloader processing routine until instructed to soft-exit.
\r
*/
\r
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
\r
* runs the bootloader processing routine until instructed to soft-exit.
\r
*/
\r
@@
-105,7
+104,7
@@
void EVENT_USB_Device_UnhandledControlRequest(void)
{
\r
Endpoint_ClearSETUP();
\r
\r
{
\r
Endpoint_ClearSETUP();
\r
\r
- /* Wait until the command
(report)
has been sent by the host */
\r
+ /* Wait until the command has been sent by the host */
\r
while (!(Endpoint_IsOUTReceived()));
\r
\r
/* Read in the write destination address */
\r
while (!(Endpoint_IsOUTReceived()));
\r
\r
/* Read in the write destination address */
\r
@@
-123,7
+122,7
@@
void EVENT_USB_Device_UnhandledControlRequest(void)
boot_spm_busy_wait();
\r
\r
/* Write each of the FLASH page's bytes in sequence */
\r
boot_spm_busy_wait();
\r
\r
/* Write each of the FLASH page's bytes in sequence */
\r
- for (uint8_t PageByte = 0; PageByte <
128
; PageByte += 2)
\r
+ for (uint8_t PageByte = 0; PageByte <
SPM_PAGESIZE
; PageByte += 2)
\r
{
\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */
\r
if (!(Endpoint_BytesInEndpoint()))
\r
{
\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */
\r
if (!(Endpoint_BytesInEndpoint()))
\r
diff --git
a/Demos/Device/ClassDriver/CDC/CDC.c
b/Demos/Device/ClassDriver/CDC/CDC.c
index
5d74cb1
..
8940ae0
100644
(file)
--- a/
Demos/Device/ClassDriver/CDC/CDC.c
+++ b/
Demos/Device/ClassDriver/CDC/CDC.c
@@
-130,10
+130,10
@@
void CheckJoystickMovement(void)
{
\r
ActionSent = true;
\r
\r
{
\r
ActionSent = true;
\r
\r
- /
/ Write the string to the virtual COM port via the created character stream
\r
+ /
* Write the string to the virtual COM port via the created character stream */
\r
fputs(ReportString, &USBSerialStream);
\r
\r
fputs(ReportString, &USBSerialStream);
\r
\r
- /
/ Alternatively, without the stream:
\r
+ /
* Alternatively, without the stream: */
\r
// CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));
\r
}
\r
}
\r
// CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));
\r
}
\r
}
\r
diff --git
a/Demos/Device/Incomplete/Sideshow/Sideshow.c
b/Demos/Device/Incomplete/Sideshow/Sideshow.c
index
151d282
..
45dfb74
100644
(file)
--- a/
Demos/Device/Incomplete/Sideshow/Sideshow.c
+++ b/
Demos/Device/Incomplete/Sideshow/Sideshow.c
@@
-32,8
+32,8
@@
SideShow Class demonstration application. This give a reference
\r
for implementing Microsoft SideShow compatible devices in an
\r
embedded environment. SideShow allows for gadget data displayed
\r
SideShow Class demonstration application. This give a reference
\r
for implementing Microsoft SideShow compatible devices in an
\r
embedded environment. SideShow allows for gadget data displayed
\r
- on a
Vista machine to also be displayed on an externally connected
\r
-
interactive display. Upon enumeration on a Vista system
, this will
\r
+ on a
Windows Vista or later machine to also be displayed on an
\r
+
externally connected interactive display. Upon enumeration
, this will
\r
appear as a new SideShow device which can have gadgets loaded onto
\r
it.
\r
\r
appear as a new SideShow device which can have gadgets loaded onto
\r
it.
\r
\r
diff --git
a/LUFA/Drivers/Peripheral/SerialStream.c
b/LUFA/Drivers/Peripheral/SerialStream.c
index
fec5f73
..
f8839c9
100644
(file)
--- a/
LUFA/Drivers/Peripheral/SerialStream.c
+++ b/
LUFA/Drivers/Peripheral/SerialStream.c
@@
-28,18
+28,19
@@
this software.
\r
*/
\r
\r
this software.
\r
*/
\r
\r
+#define INCLUDE_FROM_SERIALSTREAM_C
\r
#include "SerialStream.h"
\r
\r
FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);
\r
\r
#include "SerialStream.h"
\r
\r
FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);
\r
\r
-int SerialStream_TxByte(char DataByte, FILE *Stream)
\r
+
static
int SerialStream_TxByte(char DataByte, FILE *Stream)
\r
{
\r
Serial_TxByte(DataByte);
\r
\r
return 0;
\r
}
\r
\r
{
\r
Serial_TxByte(DataByte);
\r
\r
return 0;
\r
}
\r
\r
-int SerialStream_RxByte(FILE *Stream)
\r
+
static
int SerialStream_RxByte(FILE *Stream)
\r
{
\r
return Serial_RxByte();
\r
}
\r
{
\r
return Serial_RxByte();
\r
}
\r
diff --git
a/LUFA/Drivers/Peripheral/SerialStream.h
b/LUFA/Drivers/Peripheral/SerialStream.h
index
293fda0
..
d93ea52
100644
(file)
--- a/
LUFA/Drivers/Peripheral/SerialStream.h
+++ b/
LUFA/Drivers/Peripheral/SerialStream.h
@@
-70,8
+70,10
@@
extern FILE USARTStream;
\r
\r
/* Function Prototypes: */
\r
extern FILE USARTStream;
\r
\r
/* Function Prototypes: */
\r
- int SerialStream_TxByte(char DataByte, FILE *Stream) ATTR_NON_NULL_PTR_ARG(2);
\r
- int SerialStream_RxByte(FILE *Stream) ATTR_NON_NULL_PTR_ARG(1);
\r
+ #if defined(INCLUDE_FROM_SERIALSTREAM_C)
\r
+ static int SerialStream_TxByte(char DataByte, FILE *Stream) ATTR_NON_NULL_PTR_ARG(2);
\r
+ static int SerialStream_RxByte(FILE *Stream) ATTR_NON_NULL_PTR_ARG(1);
\r
+ #endif
\r
#endif
\r
\r
/* Public Interface - May be used in end-application: */
\r
#endif
\r
\r
/* Public Interface - May be used in end-application: */
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index
bb6104f
..
6e7b2c7
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@
-129,11
+129,11
@@
static void USB_Device_SetAddress(void)
return;
\r
}
\r
\r
return;
\r
}
\r
\r
- UDADDR = ((1 << ADDEN) | DeviceAddress);
\r
-
\r
if (DeviceAddress)
\r
USB_DeviceState = DEVICE_STATE_Addressed;
\r
\r
if (DeviceAddress)
\r
USB_DeviceState = DEVICE_STATE_Addressed;
\r
\r
+ UDADDR = ((1 << ADDEN) | DeviceAddress);
\r
+
\r
return;
\r
}
\r
\r
return;
\r
}
\r
\r
@@
-192,10
+192,7
@@
static void USB_Device_SetConfiguration(void)
\r
Endpoint_ClearStatusStage();
\r
\r
\r
Endpoint_ClearStatusStage();
\r
\r
- if (USB_ConfigurationNumber)
\r
- USB_DeviceState = DEVICE_STATE_Configured;
\r
- else
\r
- USB_DeviceState = DEVICE_STATE_Addressed;
\r
+ USB_DeviceState = (USB_ConfigurationNumber) ? DEVICE_STATE_Configured : DEVICE_STATE_Addressed;
\r
\r
EVENT_USB_Device_ConfigurationChanged();
\r
}
\r
\r
EVENT_USB_Device_ConfigurationChanged();
\r
}
\r
@@
-225,10
+222,10
@@
static void USB_Device_GetInternalSerialDescriptor(void)
int16_t UnicodeString[20];
\r
} SignatureDescriptor;
\r
\r
int16_t UnicodeString[20];
\r
} SignatureDescriptor;
\r
\r
- SignatureDescriptor.Header.
Size = sizeof(SignatureDescriptor)
;
\r
- SignatureDescriptor.Header.
Type = DTYPE_String
;
\r
+ SignatureDescriptor.Header.
Type = DTYPE_String
;
\r
+ SignatureDescriptor.Header.
Size = sizeof(SignatureDescriptor)
;
\r
\r
\r
- uint8_t
SigReadAddress = 0x0E;
\r
+ uint8_t SigReadAddress = 0x0E;
\r
\r
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
\r
{
\r
\r
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
\r
{
\r
@@
-358,16
+355,16
@@
static void USB_Device_ClearSetFeature(void)
\r
if (Endpoint_IsEnabled())
\r
{
\r
\r
if (Endpoint_IsEnabled())
\r
{
\r
- if (USB_ControlRequest.bRequest == REQ_
Clear
Feature)
\r
+ if (USB_ControlRequest.bRequest == REQ_
Set
Feature)
\r
{
\r
{
\r
- Endpoint_ClearStall();
\r
- Endpoint_ResetFIFO(EndpointIndex);
\r
- Endpoint_ResetDataToggle();
\r
+ Endpoint_StallTransaction();
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- Endpoint_StallTransaction();
\r
- }
\r
+ Endpoint_ClearStall();
\r
+ Endpoint_ResetFIFO(EndpointIndex);
\r
+ Endpoint_ResetDataToggle();
\r
+ }
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
aaa811f
..
b3a3d92
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-17,13
+17,13
@@
* - Added new Joystick Host ClassDriver and LowLevel demos
\r
* - Added new Printer Host mode Class driver
\r
* - Added new Printer Host mode ClassDriver demo
\r
* - Added new Joystick Host ClassDriver and LowLevel demos
\r
* - Added new Printer Host mode Class driver
\r
* - Added new Printer Host mode ClassDriver demo
\r
- * - Added optional support for double banked endpoints
in the Device
mode Class drivers
\r
- * - Added new stream creation function to the CDC Class drivers, to easily make standard streams from CDC Class driver instances
\r
+ * - Added optional support for double banked endpoints
and pipes in the Device and Host
mode Class drivers
\r
+ * - Added new stream creation function to the CDC Class drivers, to easily make standard
I/O
streams from CDC Class driver instances
\r
*
\r
* <b>Changed:</b>
\r
* - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library
\r
* - MIDI device demos now receive MIDI events from the host and display note ON messages via the board LEDs
\r
*
\r
* <b>Changed:</b>
\r
* - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library
\r
* - MIDI device demos now receive MIDI events from the host and display note ON messages via the board LEDs
\r
- * - Cleanups to the Device mode Mass Storage demo application
s'
SCSI routines
\r
+ * - Cleanups to the Device mode Mass Storage demo application SCSI routines
\r
* - Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer
\r
* samples to and from the device (allowing more time for sample processing and output)
\r
* - Audio class Device mode demos now work at both 16MHz and 8MHz, rather than just at 8MHz
\r
* - Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer
\r
* samples to and from the device (allowing more time for sample processing and output)
\r
* - Audio class Device mode demos now work at both 16MHz and 8MHz, rather than just at 8MHz
\r
diff --git
a/LUFA/ManPages/DeviceSupport.txt
b/LUFA/ManPages/DeviceSupport.txt
index
b9793ff
..
832edc9
100644
(file)
--- a/
LUFA/ManPages/DeviceSupport.txt
+++ b/
LUFA/ManPages/DeviceSupport.txt
@@
-29,7
+29,7
@@
* - ATAVRUSBRF01
\r
* - XPLAIN (AT90USB1287 only)
\r
*
\r
* - ATAVRUSBRF01
\r
* - XPLAIN (AT90USB1287 only)
\r
*
\r
- * Currently supported third-party board
s
:
\r
+ * Currently supported third-party board
(via hardware drivers)
:
\r
* - BUMBLEB (using officially recommended peripheral layout)
\r
* - Any Other Custom User Boards (with Board Drivers, \see Page_WritingBoardDrivers)
\r
*/
\r
* - BUMBLEB (using officially recommended peripheral layout)
\r
* - Any Other Custom User Boards (with Board Drivers, \see Page_WritingBoardDrivers)
\r
*/
\r
diff --git
a/LUFA/ManPages/FutureChanges.txt
b/LUFA/ManPages/FutureChanges.txt
index
750fb15
..
93a9a51
100644
(file)
--- a/
LUFA/ManPages/FutureChanges.txt
+++ b/
LUFA/ManPages/FutureChanges.txt
@@
-12,10
+12,10
@@
* or post your suggestion as an enhancement request to the project bug tracker.
\r
*
\r
* <b>Targeted for the Next Release (SVN Development Only):</b>
\r
* or post your suggestion as an enhancement request to the project bug tracker.
\r
*
\r
* <b>Targeted for the Next Release (SVN Development Only):</b>
\r
- * - Add hub support to match Atmel's stack
\r
- * - Add ability to get number of bytes not written with pipe/endpoint write routines after an error
\r
*
\r
* <b>Targeted for Future Releases:</b>
\r
*
\r
* <b>Targeted for Future Releases:</b>
\r
+ * - Add hub support to match Atmel's stack
\r
+ * - Add ability to get number of bytes not written with pipe/endpoint write routines after an error
\r
* - Add standardized descriptor names to class driver structures
\r
* - Remake AVRStudio project files
\r
* - Add detailed overviews of how each demo works
\r
* - Add standardized descriptor names to class driver structures
\r
* - Remake AVRStudio project files
\r
* - Add detailed overviews of how each demo works
\r
diff --git
a/LUFA/ManPages/LUFAPoweredProjects.txt
b/LUFA/ManPages/LUFAPoweredProjects.txt
index
4c5a694
..
a548b8f
100644
(file)
--- a/
LUFA/ManPages/LUFAPoweredProjects.txt
+++ b/
LUFA/ManPages/LUFAPoweredProjects.txt
@@
-41,6
+41,7
@@
* - Opendous-JTAG, an open source JTAG device: http://code.google.com/p/opendous-jtag/
\r
* - Openkubus, an open source hardware-based authentication dongle: http://code.google.com/p/openkubus/
\r
* - Orbee, a USB connected RGB Orb for notifications: http://www.franksworkshop.com.au/Electronics/Orbee/Orbee.htm
\r
* - Opendous-JTAG, an open source JTAG device: http://code.google.com/p/opendous-jtag/
\r
* - Openkubus, an open source hardware-based authentication dongle: http://code.google.com/p/openkubus/
\r
* - Orbee, a USB connected RGB Orb for notifications: http://www.franksworkshop.com.au/Electronics/Orbee/Orbee.htm
\r
+ * - Programmable XBOX controller: http://richard-burke.dyndns.org/wordpress/pan-galactic-gargantuan-gargle-brain-aka-xbox-360-usb-controller/
\r
* - Reprap with LUFA, a LUFA powered 3D printer: http://code.google.com/p/at90usb1287-code-for-arduino-and-eclipse/
\r
* - SEGA Megadrive/Genesis Development Cartridge: http://www.makestuff.eu/wordpress/?page_id=398
\r
* - SEGA Megadrive/Super Nintendo Cartridge Reader: http://www.snega2usb.com
\r
* - Reprap with LUFA, a LUFA powered 3D printer: http://code.google.com/p/at90usb1287-code-for-arduino-and-eclipse/
\r
* - SEGA Megadrive/Genesis Development Cartridge: http://www.makestuff.eu/wordpress/?page_id=398
\r
* - SEGA Megadrive/Super Nintendo Cartridge Reader: http://www.snega2usb.com
\r