Commit Graph

308 Commits

Author SHA1 Message Date
Dean Camera 0c2ad9eb34 Add missing SVN eol-style property to files where it was missing. 2011-07-15 08:46:08 +00:00
Dean Camera fdb82cd1e8 Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices. 2011-07-12 07:22:36 +00:00
Dean Camera 85e85befc4 More endianness porting of the LUFA device mode class drivers.
Add endianness information to the class driver and core structure definitions.

Move out the unused Ethernet_Frame_Info_t structure definition to the RNDIS device demos where it is needed.
2011-07-11 09:50:54 +00:00
Dean Camera b775995867 Oops: Fix compile error in the low level KeyboardMouse demo. 2011-07-02 08:40:52 +00:00
Dean Camera 04660d3793 Seperate out the device demos and project's configuration descriptor structure definitions to clearly indicate what descriptors belong to which interface. 2011-07-01 05:26:25 +00:00
Dean Camera 75da0d1877 Update AudioInput and AudioOutput Class Driver device mode demos to use a switch statement when selecting the audio request type for clarity. 2011-06-29 05:36:26 +00:00
Dean Camera 84ddf237db Oops - Mouse ClassDriver multi-arch demo changes were applied to trunk, rather than the correct branch. 2011-06-20 15:06:17 +00:00
Dean Camera 3bd36f811c Update Mouse demo to support the UC3 devices in the MultiArchDemos branch. 2011-06-20 14:46:09 +00:00
Dean Camera ca9f89ce82 Add new "checksource" target to the library makefiles, for automated source file existance checking. 2011-06-20 14:38:21 +00:00
Dean Camera d8fe01f19a Rename new Audio class driver functions, callbacks and events to ensure that they contain the USB mode (Device or Host) in the function names. 2011-06-16 06:49:08 +00:00
Dean Camera 57eedebd19 Fix Doxygen documentation errors. 2011-06-14 12:55:32 +00:00
Dean Camera 1191da7b7b Add missing AS4 and project description files to the new Audio Host demos.
Correct errors in the existing Audio demo description files due to the new demo features (variable sampling rate vs. a fixed sampling rate).
2011-06-09 04:23:19 +00:00
Dean Camera 1f1d0710f3 Add new Audio Class Driver Host demos.
Fix errors in the new Audio Host mode Class Driver, which would have prevented data from being sent or received properly by the device.

Add microphone/square wave generation compile time switch to the Low Level AudioOutput Host demo.
2011-06-09 04:08:03 +00:00
Dean Camera 567f7ecce0 Fix errors in the Audio device demos and class driver regarding multiple sample frequency support. 2011-06-07 02:05:19 +00:00
Dean Camera 1a25b6f5f1 Update the Low Level Audio Input and Audio Output demos to support multiple sample rates.
Remove custom PIDs on the Class Driver Audio device demos and revert back to the original Audio PIDs, as the low level and class driver demo versions are now descriptor compatible once again.
2011-06-06 09:43:09 +00:00
Dean Camera 7dffa15c16 Massive corrections to the project documentation and code comments, thanks to Russian translation services provided by Andrey from Microsin.ru. 2011-06-05 13:55:56 +00:00
Dean Camera 2731c3a8ae Added new callback to the Audio Class driver to allow for endpoint control manipulations such as data sample rates.
Modified the Class Driver AudioInput and AudioOutput demos to support multiple sample rates.

Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed.

Fix broken LowLevel audio demo descriptors.

Minor documentation fixes.
2011-06-03 07:56:12 +00:00
Dean Camera f01a05415c Spell check library source code files. 2011-06-01 14:33:40 +00:00
Dean Camera 2a26efc691 Altered the definition of the USB_Audio_Descriptor_Format_t descriptor so that the user is now responsible for supplying the supported audio sampling rates, to allow for multiple audio interfaces with different numbers of supported rates and/or continuous sample rates. 2011-05-30 11:07:57 +00:00
Dean Camera f0ff633962 Lower the size of the HID report endpoint from 16 bytes to 8 bytes, to allow for Low Speed USB compatibility in the KeyboardMouseMultiReport demo (thanks to Kevin Chernoff). 2011-05-26 10:24:47 +00:00
Dean Camera 24ea531fab Update MediaController project to remove the Record usage (not often needed) and explicitly declare each usage for maximum clarity. 2011-05-23 13:19:13 +00:00
Dean Camera 3cba88e4c0 Add RNDIS Device support to the Webserver project, so that the files stored on the device can be viewed from a web-browser while the board is plugged into a host machine. 2011-05-22 08:28:40 +00:00
Dean Camera 9d733d44b4 Add new RNDIS_Host_IsPacketReceived(), RNDIS_Device_ReadPacket() and RNDIS_Device_WritePacket() functions to the Device RNDIS Class Driver.
Modify RNDIS demos to suit the simplified Ethernet_Frame_Info_t structure.
2011-05-18 14:33:34 +00:00
Dean Camera 852b5e612d Remove redundant type information for bitfield elements, other than the signed/unsignedness of the element.
Change type of USB_SelectedPipe and USB_SelectedEndpoint for the AVR32 UC3 architecture to uint32_t to reduce the compiled code size.
2011-04-10 06:43:02 +00:00
Dean Camera 899df7d331 Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functions to use the number of bits instead of a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures.
Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures.
2011-04-04 12:52:30 +00:00
Dean Camera 8f5ab27dc9 Use the MIN() macro where possible instead of manual "(x < y) ? x : y" constructs. 2011-03-23 09:26:41 +00:00
Dean Camera aba7932a5c F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports. 2011-03-21 10:20:42 +00:00
Dean Camera f6f4ac588c Fix bugs in the new VirtualSerialMassStorage demo (thanks to Martin Degelsegger). 2011-03-16 22:54:31 +00:00
Dean Camera fe62770a1e Added new VirtualSerialMassStorage Device Class Driver demo. 2011-03-16 05:58:58 +00:00
Dean Camera 3d4d8e7f62 Add new ARCH option to the makefiles to (eventually) specify the target device architecture. Update non-usb peripheral drivers to reflect future multiple architecture support. 2011-02-19 18:37:22 +00:00
Dean Camera 782614dbb5 Add static keyword to all project globals whose scope should be restricted to the same module as they are declared in.
Tighten up the HID class bootloader code slightly, document that it currently exceeds 2KB of bootloader space for all models other than the Series 2 USB AVRs.
2011-02-10 17:55:49 +00:00
Dean Camera 5430e1973c Add missing svn:eol-style properties to the new KeyboardMouseMultiReport demo. 2011-02-09 18:22:17 +00:00
Dean Camera 5995c3f880 Oops - fix missing constants in the TempDataLogger FatFS diskio.h header file.
Add const to all project descriptor definitions for safety.
2011-02-06 18:03:29 +00:00
Dean Camera b1d7568651 Fix incorrect #include filenames in the RNDIS demos. 2011-02-06 12:18:41 +00:00
Dean Camera 43c4735305 Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString() functions to *_SendData(), and added new versions of the *_SendString() routines that expect a null terminated string instead.
Added new Serial_SendData() function to the Serial driver.
2011-01-30 21:02:31 +00:00
Dean Camera afd828c095 Removed SerialStream module, rolled functionality into the base USART Serial peripheral driver instead through the new Serial_CreateStream() and Serial_CreateBlockingStream() methods.
Renamed the Serial byte send/receive functions to remain consistent with the CDC driver's byte functions.

Altered the serial byte receive function to make it non-blocking.
2011-01-30 19:47:31 +00:00
Dean Camera 30f6d2bfd8 Oops - forgot to add in LOGICAL MINIMUM and LOGICAL MAXIMUM report items into the standard library Joystick HID report descriptor macro. Add in support for joystick resolution reporting via PHYSICAL_MINIMUM and PHYSICAL_MAXIMUM items. 2011-01-30 14:40:24 +00:00
Dean Camera e6dc951630 Add new HID_DESCRIPTOR_VENDOR() macro, change over all projects and Device ClassDriver demos to use it.
Fix reversed byte ordering of multi-byte HID data.

Added support to the HID parser for extended USAGE items that contain the usage page as well as the usage index.

Removed the HID_IOF_NON_VOLATILE and HID_IOF_VOLATILE flags from HID INPUT items where the flag is invalid. Changed over HID OUTPUT items to use HID_IOF_NON_VOLATILE.

Change over MagStripe project to use HID_DESCRIPTOR_KEYBOARD() for its HID report. Change over MouseHostDevice demo to use HID_DESCRIPTOR_MOUSE() for its HID report.
2011-01-30 14:14:04 +00:00
Dean Camera a852ea8e43 Added new KeyboardMouseMultiReport Device ClassDriver demo.
Fixed ReportID not being removed from the feature/out report data array in the HID class driver when Report IDs are used.

Added new MAX() and MIN() convenience macros.
2011-01-26 21:33:07 +00:00
Dean Camera 6c7ed7ecd6 Added new HID_DESCRIPTOR_MOUSE, HID_DESCRIPTOR_KEYBOARD and HID_DESCRIPTOR_JOYSTICK macros for easy automatic creation of basic USB HID device reports. 2011-01-23 20:02:51 +00:00
Dean Camera 6d67b1df3c Change over Joystick demo HID report descriptor to use USAGE_MINIMUM and USAGE_MAXIMUM when describing the joystick buttons, to allow for easy extension of the number of supported buttons. 2011-01-23 17:41:16 +00:00
Dean Camera efd57cfe51 Abuse the the C preprocessor so that the HID macros can automatically encode data into the array from the HID macros automagically, by specifying the bit-width of the data, and the data itself as a single integer value of that width. 2011-01-17 19:44:48 +00:00
Dean Camera 039a714ee4 New HID report item macros (with HID_RI_ prefix) to allow for easy creation and editing of HID report descriptors.
Changed over all project and demo HID report descriptors to use the new HID report item macros.

Moved the HIDParser.c source file to the LUFA/Drivers/USB/Class/Common/ directory from the LUFA/Drivers/USB/Class/Host/.
2011-01-16 19:34:28 +00:00
Dean Camera 187ccb2e15 Fix typos and outdated information. 2011-01-10 21:53:38 +00:00
Dean Camera f555ad7ced Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter now points to a location where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction should be performed in one chunk).
Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions.

Removed the NO_STREAM_CALLBACKS compile time option due to the new partial stream transfer feature replacing it.

Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov).
2011-01-10 18:43:34 +00:00
Dean Camera 1d433d4506 Update copyright year on all source files. 2011-01-01 13:00:56 +00:00
Dean Camera a8b66f318d Documentation improvements - put driver example code into its own section, fix incorrect and missing section names. 2010-12-26 14:55:26 +00:00
Dean Camera a57287a59f Fix a few more incorrectly ordered endpoint initialisations in the device demos. 2010-12-17 20:26:14 +00:00
Dean Camera 9f7883fa2b Added ability to write protect Mass Storage disk write operations from the host OS. 2010-11-26 04:16:47 +00:00
Dean Camera c43605612d Lower bulk endpoint polling rate in the descriptors to the lowest possible value to give maximum throughput. 2010-11-22 05:24:33 +00:00
Dean Camera 50390867e7 Fixed incorrect PollingIntervalMS values in the demo/project/bootloader endpoint descriptors (thanks to MCS Electronics). 2010-11-10 12:38:25 +00:00
Dean Camera 0ce2950d81 Added board hardware driver support for the Adafruit U4 breakout board.
Fixed calculation of timer register reload values derived from F_CPU; must subtract one from the division result for the compare value to be correct.

Change AVRISP-MKII rescue clock speed to 4MHz to ensure that a 125KHz ISP speed works regardless of the target's fuses (i.e. DIV8 set).
2010-11-08 03:41:48 +00:00
Dean Camera fb76acb084 Renamed the EVENT_USB_Device_UnhandledControlRequest() event to EVENT_USB_Device_ControlRequest() as it is now fired before the library request handlers, not afterwards. 2010-11-05 05:15:20 +00:00
Dean Camera 99a9e415ef Loop in the ClassDriver MIDI device/host demos until there are no more incomming events to process. Only clear the endpoint/pipe bank in the LowLevel MIDI device/host demos when the endpoint is empty after an event read. 2010-11-05 03:43:11 +00:00
Dean Camera b8dfa976ce Added standard keyboard HID report scancode defines (thanks to László Monda). 2010-10-28 23:11:49 +00:00
Dean Camera cb779e3d7d Changed over www.fourwalledcubicle.com links to the new www.lufa-lib.org redirect domain, including the new aliased links for LUFA-related pages such as the various download/source control mirrors and support lists. 2010-10-28 06:08:58 +00:00
Dean Camera 08de757811 Changed AudioInput and AudioOutput demos to reload the next sample via an interrupt rather than polling the sample timer. 2010-10-26 06:52:09 +00:00
Dean Camera 55538dcef3 Add descriptor class, subclass and protocol constants to the class drivers, modify all demos to use them where possible.
Move out private/internal host class driver constants to the common class driver headers, so that they can be used in the Low Level host mode demos.

Ensure all demos, projects and bootloaders use the class driver constants where possible to minimise code repetition.
2010-10-25 12:42:55 +00:00
Dean Camera b37d77eab3 All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be seperately included.
All LowLevel demos changed to use the constants and types defined in the USB class drivers.
2010-10-24 22:53:57 +00:00
Dean Camera bd337aced3 Added default test tone generation mode to the Device mode AudioInput demos. 2010-10-20 07:39:11 +00:00
Dean Camera 911170bf0b Add missing ENDPOINT_ATTR_NO_SYNC and ENDPOINT_USAGE_DATA attributes to the descriptors in the ClassDriver MassStorageKeyboard demo. 2010-10-13 21:10:48 +00:00
Dean Camera 3661ae8dfb Minor documentation corrections. 2010-10-13 14:10:24 +00:00
Dean Camera 5a4def7478 Clean up excessive whitespace at the end of each line using the wspurify tool made by Laszlo Monda 2010-10-13 14:05:35 +00:00
Dean Camera f78b3eb4ef Remove MIDI ClassDriver device demo's accidental inclusion of the unused ADC peripheral driver header file. 2010-10-10 06:32:48 +00:00
Dean Camera d36c96d6a5 Oops - revert changes to the Device mode Class Driver VirtualSerial demo makefile. 2010-10-01 11:22:54 +00:00
Dean Camera d06febbb59 Fix device mode for the U4 parts. 2010-10-01 11:22:24 +00:00
Dean Camera 158afe9109 Reverted Endpoint/Pipe non-sequential configuration hack, placed restriction on the configuration order instead to ensure maximum reliability.
Altered all low level device and host mode demos to ensure that endpoints and pipes are configured in ascending order properly.

Rewrote all low level host mode demos' configuration descriptor parser code to ensure that pipes are enumerated in ascending order, and to ensure maximum compatibility with devices.

Incremented all device mode demo's device descriptor revision numbers to ensure that any descriptor changes are re-fetched on machines which have enumerated previous versions.
2010-09-30 06:23:38 +00:00
Dean Camera c0e4f52e8f Fix up incorrect version numbers in demo/project descriptors.
Add class name prefixes to missed constants in the class drivers to give all class driver elements a consistent namespace.
2010-09-28 14:59:16 +00:00
Dean Camera 713670043a Move out many of the common class driver constants into grouped enums, to make them more managable.
Add new CDC descriptor structs to the CDC class driver, so that the CDC demos can use human readable field names.

Rename prefix for Still Image Host class driver functions from "SImage_" to "SI_" to remain consistent with the rest of the driver.
2010-09-28 12:14:06 +00:00
Dean Camera 800485bd95 Remove dfu-programmer program switches, to ensure maximum compatibility with all dfu-programmer versions. 2010-09-24 06:59:28 +00:00
Dean Camera bd85422d2b Added the --suppress-bootloader-mem option to the makefile dfu target, to ensure that writes to the bootloader section of the AVR's flash memory are ignored (thanks to Axel Rohde).
Fixed incorrect command name for EEPROM memory programming in the makefile dfu-ee target.

Makefile whitespace fixes.
2010-09-24 06:45:11 +00:00
Dean Camera 01fecac0a7 Ensure device address latch bit is not set at the same time as the new address, as per datasheet.
Minor documentation fixes.

Fix broken USB host mode due to the USB frame counter not being updated during the early enumeration steps, causing USB_Host_DelayMS() to spinloop forever.
2010-09-19 05:46:17 +00:00
Dean Camera 6d2f091cec Make project makefiles correctly clean intermeditary build files from assembly and C++ sources (thanks to Daniel Czigany). 2010-09-15 03:00:29 +00:00
Dean Camera fdcb486e22 Fix typos in the project overview text files. 2010-09-09 13:39:52 +00:00
Dean Camera c166dfc64e Added class specific descriptor type defines with standard USB-IF element naming. 2010-09-09 13:05:57 +00:00
Dean Camera 4dece08bef Clarify in the project documentation files what the each of the different USB AVR device "series" comprises of. 2010-08-31 12:33:21 +00:00
Dean Camera 092f82e06f Changed the signature of the CALLBACK_USB_GetDescriptor() callback function so that the descriptor pointer is const, to remove the need for extra casting inside the callback (thanks to Jonathan Kollasch). 2010-08-24 13:02:38 +00:00
Dean Camera e966219834 Clarify in the documentation that the Audio demos and driver is for the Audio 1.0 specification, not the newer (and more advanced/less supported) 2.0 specification. 2010-08-21 11:38:39 +00:00
Dean Camera 38d2e694ef Remove unneccesary call to USB_Device_EnableSOFEvents() in the MassStorage and MIDI Device Class demos. 2010-08-21 08:21:17 +00:00
Dean Camera 4f114e5766 Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger).
Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant SCSI_Codes.h file as these values are part of the MassStorage Class Driver.
2010-08-18 10:33:21 +00:00
Dean Camera 508e905d8d Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions depending of if the given bank size is a compile time constant, as the compiler does a better job of optimizing with basic code.
Changed over all device demos to use a clearer algorithm for the configuring of the application's endpoints.
2010-08-09 10:20:10 +00:00
Dean Camera 5f3a1b2629 Fix invocations of avr-size in all makefiles broken on unpatched *nix systems, due to the recent update to the latest WinAVR makefile template. 2010-08-08 08:30:42 +00:00
Dean Camera 48c5cdced4 Hide the PROGMEM attribute from Doxygen, as it appears to confuse the parser in some situations. 2010-08-02 08:53:23 +00:00
Dean Camera 0f45b9c8e0 More spell checking of all source files -- correct missed errors, switch to EN-GB spelling dictionary. 2010-07-30 09:48:35 +00:00
Dean Camera 37c601dbf6 Fix typo in DualVirtualSerial.c due to the changed CDC Device APIs that was preventing the demo from being compiled. 2010-07-30 04:20:41 +00:00
Dean Camera 24e621a8d8 Altered the CDC Deivice and Host Class drivers' receive byte routines, so that no data is indicated by a negative return value.
Added auto flushing of OUT data to the CDC Host Class driver's USBTask function to automatically flush the send pipe buffer.
2010-07-30 03:52:11 +00:00
Dean Camera 28401f7bb7 Spell check all source files once again to find any typos. 2010-07-29 16:20:45 +00:00
Dean Camera de5b16909a Added support to the AVRISP-MKII project for ISP speeds slower than 125KHz via a new software SPI driver.
Added new SPI_ORDER_* data order masks to the SPI peripheral driver.
2010-07-29 07:09:57 +00:00
Dean Camera 0803cf00ac Add missing INTERRUPT_CONTROL_ENDPOINT compile time option to the Mass Storage device projects/demos and incomplete Test and Measurement Class demo, which was accidentally removed during the makefile updates.
Alter Test and Measurement Class demo's request handlers to accept, process and correctly return the fields indicated in the specification.
2010-07-26 04:57:50 +00:00
Dean Camera 89a32baf58 Add stream callback flags and class specific control request handler code to the incomplete Test and Measurement Class device demo.
Change over the keyboard demo's manufacturer name back to the primary author of the demo.
2010-07-26 04:26:47 +00:00
Dean Camera e6f37221fa Fix up minor whitespace formatting errors. 2010-07-22 05:00:39 +00:00
Dean Camera 6bda628718 Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
2010-07-21 16:19:32 +00:00
Dean Camera 97143bf814 Add missing const qualifiers to class drivers.
Indent core library function parameters so that there is only one parameter per line, to increase readability.
2010-07-21 14:00:51 +00:00
Dean Camera 6b5e684c77 Update makefiles to use the latest WinAVR/Atmel toolchain makefile template.
Add new module source variables to the library core makefile, so that module sources can be added to a project's makefile on a per-module rather than per-file basis.
2010-07-19 14:00:44 +00:00
Dean Camera 42ac34b484 Change over all makefiles to use C99 standards mode, rather than C99 + GNU Extensions. 2010-07-18 07:31:57 +00:00
Dean Camera 9299735c75 Disable strict aliasing explicitly in the project makefiles, as this is apparently enabled by default in newer AVR-GCC builds, and aliasing is used heavily for type-punning through the LUFA and third party library's codebase. 2010-07-15 17:13:33 +00:00
Dean Camera f4710f6f86 Removed the automated checking of event names in the demo, project and bootloader makefiles due to inconsistancies between the behaviour of the command line tools used to perform the check on each platform.
Removed the internal endpoint and pipe memory allocation macros, as this is already performed directly in the code. Simplify the endpoint and pipe reset procedure.
2010-07-15 16:45:26 +00:00
Dean Camera 40631e9fe5 Fix pointer aliasing warning in the Mass Storage demos. 2010-07-15 10:34:29 +00:00
Dean Camera 0313034245 Added const attributes to some of the class driver function parameters that were missing it. 2010-07-13 10:01:13 +00:00
Dean Camera 3a3a4e2abf Add AVRStudio 4 project files to the ClassDriver Device mode demos. 2010-07-13 05:38:51 +00:00