Commit Graph

571 Commits

Author SHA1 Message Date
Dean Camera 2a072db703 Make Bluetooth signalling handler routines use the generic Bluetooth_SendPacket() routine for their responses. Use a better method of controlling the debug output verbosity. 2010-04-06 13:39:18 +00:00
Dean Camera c77f136661 Add bidirectional channel configuration -- remote device is not ACKing sent Configuration Requests, needs further debugging. Implement Bluetooth spec's channel states.
Use abbreviations for the structure and function names where possible to try to cut down on the code verbosity.
2010-04-06 08:14:08 +00:00
Dean Camera b9c7d19615 Add packet reception and send routines to the ACL layer of the incomplete Bluetooth Host demo. 2010-04-06 03:56:45 +00:00
Dean Camera ee74b4948f Add information request/response signal handler to the Bluetooth Host demo.
Ensure that the AVRISP-MKII project's Windows avrdude compatibility define is named properly in all parts of the code.
2010-04-06 02:48:47 +00:00
Dean Camera 083d797aca Add Bluetooth signalling echo request/response handlers, disconnection request/response handlers.
Add Bluetooth connection request/complete/disconnection callbacks.

Remove debugging from HCI layer, as it is now operational -- add guards to ACL debug statements to reduce logging chattyness so that the overall command sequences can be observed and debugged.
2010-04-05 12:13:33 +00:00
Dean Camera fa1a092901 Add user callback function to the Bluetooth host demo to filter out connections from remote devices. Add in ability to reject connections based on their bluetooth device address.
Clean up RelayBoard project code.

Make AVRISP project clear the XMEGA target's reset register twice; this does not appear to take affect properly the first time under some circumstances.
2010-04-05 08:09:12 +00:00
Dean Camera fd96b28882 More improvements to the incomplete BluetoothHost demo - add Disconnection Event processing.
Remove unused macro in the host mode demos for the maximum Configuration Descriptor size.
2010-04-01 04:30:21 +00:00
Dean Camera a2e6d54336 Massive cleanups to the incomplete BluetoothHost demo, to make the HCL layer code much easier to read, block less and work correctly. 2010-03-31 14:32:03 +00:00
Dean Camera 9257f4ab8e Add briefs for the library core structures. 2010-03-29 13:32:36 +00:00
Dean Camera 0557676013 Add file-level brief documentation.
Remove accidentally duplicated model-specific peripheral driver files.
2010-03-29 07:49:58 +00:00
Dean Camera ec19436d54 Add new LUFA logo by Ryo Yamauchi. 2010-03-25 08:13:39 +00:00
Dean Camera 74353374c3 All Class Driver Host mode demos now correctly set the board LEDs to READY once the enumeration process has completed.
Fixed Still Image Host class driver not resetting the transaction ID when a new session is opened, fixed driver not sending a valid session ID to the device.
2010-03-25 06:34:38 +00:00
Dean Camera f79f9abd28 Fixed compilation error in the AudioInput demos when MICROPHONE_BIASED_TO_HALF_RAIL is defined (thanks to C. Scott Ananian).
Minor documentation cleanups.

Make sure HID class driver uses properly cast pointers when writing to the report buffer.
2010-03-24 05:50:09 +00:00
Dean Camera c58c53dba9 Added incomplete MIDIToneGenerator project. 2010-03-23 09:16:47 +00:00
Dean Camera 49b09a2042 Standardized the naming scheme given to configuration descriptor sub-elements in the Device mode demos, bootloaders and projects.
Fix errors in the MouseHostWithParser demo from incorrect use of the HID_ALIGN_DATA() macro.
2010-03-22 07:12:25 +00:00
Dean Camera 6d256c5109 Fixed LowLevel MassStorage demo broken on the U2 AVRs due to double-banked endpoints. 2010-03-19 07:33:30 +00:00
Dean Camera 72527867f6 Remove redundant check in the software PDI programming code of the AVRISP project. 2010-03-17 13:07:22 +00:00
Dean Camera 9a5ae36a4f Software PDI mode breaks unless the software USART has 100 cycles between bits. 2010-03-17 11:48:39 +00:00
Dean Camera 39d56aeffe Fixed PDI programming mode in the AVRISP programmer project not exiting programming mode correctly (clear target Reset key twice, set /RESET pin to pullup).
Add newlines to the MIDI event printf() statements in the MIDI host demos.
2010-03-16 11:47:11 +00:00
Dean Camera 2b51944a4b Make sure the button report set masks use OR in all circumstances, to prevent user confusion. While the first set of the buttons report item can be a direct assignment, it is not immediately clear to new developers why this is the case. 2010-02-16 12:25:31 +00:00
Dean Camera 35a0fe9384 Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes.
Moved the USB_GetHIDReportItemInfo() calls into the main report item passing loop in the *HostWithParser demos - it is fast enough not to effect performance, and avoids duplicate code.

Make Webserver project report the LUFA version as part of the HTTP header.
2010-02-09 12:30:51 +00:00
Dean Camera 3ab0b3a027 Fix LowLevel Keyboard demo -- accidentally trying to dereference a uint8_t type in ProcessLEDReport(). 2010-02-08 03:32:31 +00:00
Dean Camera 7ae91099e9 Fix AVRISP-MKII clone project's TPI Chip Erase command processing - ensure erase location is the high byte in the given address space, check NVMBUSY for completion rather than the NVM Bus Enable bit.
Change If-Else chains over to switch statements in XPROGProtocol.c for clarity.
2010-02-08 03:16:09 +00:00
Dean Camera 6a48efd3bd Split out LED report processing from the host into a seperate routine in the LowLevel KeyboardMouse device demo, to avoid duplicate code. 2010-02-07 14:03:48 +00:00
Dean Camera 0c5d6f5f97 Added Keyboard LED report masks (KEYBOARD_LED_*) to the HID class driver and demos. 2010-02-07 13:56:36 +00:00
Dean Camera 196724c62d Added keyboard modifier masks (HID_KEYBOARD_MODIFER_*) to the HID class driver and Keyboard demos. 2010-02-07 07:31:53 +00:00
Dean Camera 15f84bb8f5 New BOARD value option BOARD_NONE (equivelent to not specifying BOARD) which will remove all board hardware drivers which do not adversely affect the code operation (currently only the LEDs driver).
Spell-check code/comments in the Webserver/AVRISP-MKII projects.
2010-02-04 02:27:09 +00:00
Dean Camera 77e86e7d82 Exlude the "INCLUDE_FROM_*" macros from the individual project's documentation. 2010-02-03 00:57:49 +00:00
Dean Camera 53eca61d02 Minor fixups to the documentation and preprocessor tokens. 2010-02-02 13:29:07 +00:00
Dean Camera 254a0c1ae8 Update driver INF files - change manufacturer name from the original template's name to the Four Walled Cubicle website. 2010-01-29 06:32:20 +00:00
Dean Camera e81a4c950f Removed the stream example code from the Low Level VirtualSerial demos, as they were buggy and only served to add clutter. 2010-01-28 14:12:26 +00:00
Dean Camera 5f776f4785 Fix up project documentation files' overview tables, so that multiple items occupy multiple lines in the same cell, rather than multiple cells. 2010-01-28 13:17:36 +00:00
Dean Camera db420853ce Add Webserver project Doxygen configuration file and overview document.
Fix Doxygen configuration files' input file exclusion filters.
2010-01-25 12:46:57 +00:00
Dean Camera 431db89b00 Fixed CDC and RNDIS host demos and class drivers - bidirectional endpoints should use two seperate pipes, not one half-duplex pipe. 2010-01-25 11:50:41 +00:00
Dean Camera b68f7f1649 Added explicit ADC channel masks for the standard set of ADC channels, as the single-ended channel MUX masks are not equal to the channel number on some AVR models. Changed demos to use the new channel masks when using the ADC driver. 2010-01-25 00:52:45 +00:00
Dean Camera 03ee87b35a Fix up the incomplete Webserver project so that it integrates with the uIP stack correctly. Add simple HTTP webserver as a placeholder until FatFS can be integrated.
Begin to look into the RNDIS Host Class Driver, which seems to crash on test hardware after many packets have been received.
2010-01-21 13:45:44 +00:00
Dean Camera 60fd0ff418 Changed XPLAINBridge project to be both a USB to USART bridge and a PDI programmer, based on the state of a mode select pin. 2010-01-19 05:27:58 +00:00
Dean Camera 89e4d73289 Fixed incorrect interface values in the VirtualSerialMouse and KeyboardMouse demo class driver structures.
Added caveat information to the CDC device class driver.
2010-01-12 00:42:00 +00:00
Dean Camera efb6c35778 Update Doxygen configuration files to the latest Doxygen version. 2010-01-06 13:37:29 +00:00
Dean Camera d97db1120b Added support to the MIDI Class drivers for packed data, where multiple MIDI events are packed into a single USB packet. Added new MIDI Class driver flush routines to override packing behaviour. 2010-01-05 13:52:34 +00:00
Dean Camera 6122ba93cf Fix MassStorageKeyboard demo USE_INTERNAL_SERIAL check being performed before the required library headers were included, causing a compilation error.
Added notes to the class driver functions indicating which functions require what Device/Host state machine states to function.
2010-01-04 13:34:02 +00:00
Dean Camera 58a39c6666 Clean up MassStorageKeyboard demo. 2010-01-03 03:48:40 +00:00
Dean Camera 7f9f97c792 Update copyright year to 2010. 2009-12-30 23:49:19 +00:00
Dean Camera 0ea819f781 Fix TemperatureDataLogger - sample tick timer wasn't being initialized in the correct CTC mode. 2009-12-30 13:35:24 +00:00
Dean Camera d4ca7fb44c Fix MIT license language to make its intent clearer. 2009-12-28 00:34:20 +00:00
Dean Camera 6648234157 Test with -Wextra, fix library warnings due to unused function parameters. 2009-12-13 14:43:34 +00:00
Dean Camera 3705330dd3 Use -pedantic compile time option to find and correct several minor code errors. 2009-12-13 14:09:25 +00:00
Dean Camera 7ace314cc1 Increase timeout of Mass Storage and Still Image host commands to 10 seconds (up from 5) to account for slow-processing devices.
Added brace guards to macros with parameters to prevent unintended changed evaluation of the macro expression.

Minor code cleanups (remove redundant comments, fix spacing, etc.).
2009-12-09 00:50:55 +00:00
Dean Camera 2281750b5f Make sure that USB_STREAM_TIMEOUT_MS is set in the MassStorageHost ClassDriver demo, so that slow devices don't time out the data pipe. Increase pipe timeout in both MassStorageHost demos to 5 seconds to account for the really slow devices.
Fix TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting the AVR.
2009-12-08 07:43:33 +00:00
Dean Camera 3757b1760f Fix newly renamed VirtualSerial demos' include filename references so that they compile. 2009-12-07 04:49:37 +00:00
Dean Camera cf22a744ec Additional file renames and modifications to change CDC demos to VirtualSerial. 2009-12-07 04:35:59 +00:00
Dean Camera 7a9b3d3641 Rename CDC demos to VirtualSerial. 2009-12-07 04:18:07 +00:00
Dean Camera c49bdcb7c9 Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a STALL to a GET MAX LUN request (thanks to Martin Luxen). 2009-12-04 09:08:48 +00:00
Dean Camera 2919aeeaab Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items.
Added new HID_ALIGN_DATA() macro to return the pre-retrieved value of a HID report item, left-aligned to a given datatype.

Added new PreviousValue to the HID Report Parser report item structure, for easy monitoring of previous report item values.
2009-12-04 01:06:26 +00:00
Dean Camera 1b2cd16976 Added CDC_Host_Flush() function to the CDC Host Class driver to flush sent data to the attached device. 2009-11-30 02:20:26 +00:00
Dean Camera 958d28d05d Better checking of whether a packet is received in the RNDISEthernetHost Class driver demo - show busy LED status while packets are being printed out. 2009-11-27 06:32:26 +00:00
Dean Camera 9ba8da7412 Make the RNDISEthernetHost Class driver demo print out incomming packets from the attached RNDIS device. 2009-11-26 11:29:06 +00:00
Dean Camera 2a28862dcc Make MIDI device demos also turn off the on board LEDs if MIDI Note On messages are sent with a velocity of zero, which some devices use instead of Note Off messages (thanks to Robin Green). 2009-11-26 11:16:20 +00:00
Dean Camera 5aa2b26261 Added new RNDIS Host class driver and the beginnings of a RNDISEthernetHost Class Driver demo.
Fixed all Class drivers to ensure they have appropriate guards on each function to ensure the device is enumerated before running, fixed error codes on all guards to return "DeviceDisconnected" where possble.

Renamed HOST_SENDCONTROL_DeviceDisconnect enum value to HOST_SENDCONTROL_DeviceDisconnected to be in line with the rest of the library enum error codes.
2009-11-26 04:46:31 +00:00
Dean Camera ab602a8b48 Fix typo in the StillImageHost LowLevel demo, and the CDC Host Class Driver. 2009-11-25 04:23:40 +00:00
Dean Camera a04131cf04 Fix more Doxygen errors from missing parameter documentation. 2009-11-25 04:13:14 +00:00
Dean Camera 50f4a3b625 Fix build and Doxygen errors. 2009-11-25 03:56:51 +00:00
Dean Camera 8c6c27d88b Added new RNDISHost Host LowLevel demo. Fixed misnamed Pipe_SetPipeToken() macro for setting a pipe's direction. Fixed CDCHost failing on devices with bidirectional endpoints. 2009-11-25 03:26:57 +00:00
Dean Camera d3f11eb528 Make the StandaloneProgrammer project seamlessly read out drive contents from either an attached FAT formatted drive when in host mode, or the onboard FAT formatted dataflash when in device mode. 2009-11-24 14:10:28 +00:00
Dean Camera 702bec892d Fixed misnamed SI_Host_USBTask() and SI_Host_ConfigurePipes() functions. 2009-11-23 13:35:52 +00:00
Dean Camera 8b009bc113 Added new ReportType parameter to the HID Device Class driver CALLBACK_HID_Device_CreateHIDReport() callback to indicate the report type to generate. 2009-11-23 13:22:33 +00:00
Dean Camera c438d01f87 Fixed incorrect values for REPORT_ITEM_TYPE_* enum values causing corrupt data in the HID Host Parser. 2009-11-23 13:01:50 +00:00
Dean Camera aaa0bed556 The incomplete StandaloneProgrammer project now uses Host and Device Mass storage classes, so that program data can either be loaded onto the device's Dataflash storage, or read off an attached USB memory stick.
The USB target family and allowable USB mode tokens are now public and documented (USB_CAN_BE_*, USB_SERIES_*_AVR).

The SCSI_Request_Sense_Response_t and SCSI_Inquiry_Response_t type defines are now part of the Mass Storage Class driver common defines, rather than being defined in the Host mode Class driver section only.

The USB_MODE_HOST token is now defined even when host mode is not available.

Added missing CDC_Host_CreateBlockingStream() function code to the CDC Host Class driver.
2009-11-23 12:40:14 +00:00
Dean Camera 6e867f7d9b Removed code to zero reports between two keyboard reports with differing number of pressed keys, as this relied on non-standard OS behaviour. 2009-11-23 05:45:59 +00:00
Dean Camera 6c38ca2890 Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when the given data length is zero. 2009-11-20 06:56:43 +00:00
Dean Camera 7ef58eef7a Fixed LowLevel Keyboard demo not saving the issued report only after it has been written to the endpoint.
Added support for multiple keyboard keycodes in a single report to the LowLevel and ClassDriver Keyboard demos.
2009-11-20 04:39:41 +00:00
Dean Camera d753512cca Fix doxygen documentation - doxygen was getting confused on the variable-length ATTR_NON_NULL_PTR_ARG() macro used on function prototypes and was generating many return types for several functions in the documentation (thanks to David Lyons). 2009-11-17 11:28:07 +00:00
Dean Camera 9b20114555 Make RNDISHost demo validate the set Packet Filter to ensure that it is being sent correctly.
Add new (incomplete) StandaloneProgrammer project, using the ELM Petite FAT library to read files stored on the board's dataflash by the host.
2009-11-17 10:32:17 +00:00
Dean Camera 21cc9c9e19 Cleanups to the MassStorage Device demos, and the MassStorage Device Class driver. 2009-11-15 12:50:23 +00:00
Dean Camera 588886878e Corrections, improvements and additions to the incomplete RNDISHost demo.
Change device demos which use the joystick to use the natural UP, DOWN, LEFT, RIGHT ordering in all demos when checking the joystick's position.
2009-11-13 13:24:04 +00:00
Dean Camera e625fd6df3 Corrected the name of the misnamed USB_GetDeviceConfigDescriptor() function to USB_Host_GetDeviceConfigDescriptor(). 2009-11-13 10:07:25 +00:00
Dean Camera 2626ecb261 Extend incomplete RNDISHost demo -- can not enumerate a RNDIS device correctly and set the packet filter. No packets are received yet from the test device, need to investigate additional SET commands to see if any critical OIDs have been missed. 2009-11-13 07:23:31 +00:00
Dean Camera 6a46f0025a Add beginnings of a RNDIS Ethernet Host demo. 2009-11-12 10:43:07 +00:00
Dean Camera 04774208b6 Minor code cleanups for clarity. 2009-11-11 09:09:39 +00:00
Dean Camera c1782ac024 Added new stream creation function to the CDC Class drivers, to easily make standard streams from CDC Class driver instances. 2009-11-10 06:22:03 +00:00
Dean Camera d6edfe35c8 Spell check all source code variables, comments and strings. 2009-11-09 13:15:28 +00:00
Dean Camera 8bb007f80b Fixed HID host Class driver report send/receive report broken when issued through the control pipe.
Make Mass Storage device Class driver accept resets at any time, rather than just after a command block has been processed.

Remove the HID device parser from the boot protocol Keyboard/Mouse demos.
2009-11-09 08:24:01 +00:00
Dean Camera 4dde844e9f Remove dependancies from the LowLevel demos to the ClassDriver demos, since the use of ClassDriver headers now outputs an error when NO_STREAM_CALLBACKS is used. 2009-11-08 21:56:18 +00:00
Dean Camera 34dc7f241f Make Low Level host demos use void pointers for the configuration descriptor, to prevent warnings when passed to the altered configuration descriptor parsing routines.
Added preprocessor checks to give a human readable error when the class drivers are used when the incompatible NO_STREAM_CALLBACKS compile time option is used.
2009-11-07 07:23:03 +00:00
Dean Camera 64e5c4084f Add optional pipe double banking support to the Host mode Class drivers.
Descriptor processing routines now pass around void pointers rather than uint8_t pointers, as their destination datatype is know well known -- they are just streams of bytes until they are cast to the correct destination type by DESCRIPTOR_CAST.
2009-11-07 03:51:24 +00:00
Dean Camera f29fc1abc4 Add double banking property to LUFA powered projects in the Projects directory. Add guards to macro parameters to ensure that formulas passed as parameters don't mess up the internal macro structure. 2009-11-06 14:32:01 +00:00
Dean Camera f7ab433c67 Add optional double-banking support to the Device mode Class Drivers, on a per-endpoint, per-interface level. 2009-11-06 13:43:18 +00:00
Dean Camera 8ba51f090f Added new Printer Host mode Class driver.
Added new Printer Host mode ClassDriver demo.

Added table of supported classes and modes to the main USB Class Driver documentation.
2009-11-04 13:16:53 +00:00
Dean Camera ba8ffa4cb7 Add support for Mouse Scrollwheel to the MouseHostWithParser demos. 2009-11-04 05:18:43 +00:00
Dean Camera 87b2572ae5 Added new JoystickHostWithParser demos to the library.
Add some missing documentation to some of the library demos.
2009-11-04 04:55:10 +00:00
Dean Camera f93f732108 Update DevChapter9.c - use the Endpoint_ClearStatusStage() function where possible to reduce code size and (potentially) allow for centralized status stage timeouts.
Fix Joystick device demo HID descriptors - buttons should be placed outside the Pointer collection.
2009-11-04 04:17:11 +00:00
Dean Camera 0899deaae3 Add new CDCMouse ClassDriver device demo, combining a CDC Virtual Serial Port and a HID Mouse. 2009-11-03 12:12:07 +00:00
Dean Camera 5832bab02f Rename the AT90USBXXX67 internal driver directory to AVRU4U6U7. 2009-11-03 11:11:51 +00:00
Dean Camera de8c9445d4 Make HID device class driver ignore the previous HID report comparison buffer when the user sets it to NULL, disabling automatic report comparisons. Update HID device class driver documentation giving previous report buffer limitations. 2009-10-26 11:44:36 +00:00
Dean Camera de70f0f1cf Moved USBtoSerial demo the Projects directory, as it is simply an expanded CDC demo. Added const qualifier to Endpoint/Pipe stream write routines. 2009-10-18 05:35:48 +00:00
Dean Camera c3dfc58707 Fix invalid Event name rule in demo/project makefiles. 2009-10-16 08:04:51 +00:00
Dean Camera e53c120a22 Fix AudioOutput and AudioInput class driver demos' descriptors -- incorrect value was being supplied in the audio descritors field giving the number of discrete audio formats the device supports. 2009-10-14 09:42:11 +00:00
Dean Camera dc68de15b6 Make Audio device demos compatible with AVRs running at 16MHz instead of 8MHz.
Fix up demo documentation device compatibility list to be as general as possible to reduce changes required as Atmel releases more devices within the same USB AVR series.
2009-10-12 05:59:55 +00:00
Dean Camera be9d0a5aa9 Added stdio.h stream examples for the virtual CDC UART in the CDC host demos.
Removed accidental reference to the incomplete MIDI class bootloader in the Bootloader folder makefile.
2009-10-11 06:14:08 +00:00
Dean Camera c7bc3ec391 Add new MIDI Host Class driver to the library, and new MIDIHost ClassDriver demo.
Make MouseHost and KeyboardHost ClassDriver demos use the HID Class driver's structures for the boot protocol Mouse/Keyboard report data, rather than rolling their own.
2009-10-08 08:46:27 +00:00
Dean Camera 664a292181 Application documentation/comment cleanup. 2009-10-08 07:18:28 +00:00
Dean Camera bdedbd558c Add new MIDIHost LowLevel demo application.
Make unfinished device mode applications use the VID/PID reserved for LUFA development devices.
2009-10-08 07:00:44 +00:00
Dean Camera 046fff2aff Fix broken Endpoint/Pipe stream templates.
Simplify AudioOutput demos, to reduce the number of cycles needed to process each incomming sample.
2009-10-04 07:57:15 +00:00
Dean Camera 433399b05d Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer samples to and from the device (allowing more time for processing and output).
Fixed ClassDriver AudioOutput demo not selecting an audio output mode.
2009-10-03 07:59:32 +00:00
Dean Camera b7eead83aa Cleanups to the Device mode Mass Storage demo applications' SCSI routines. 2009-10-02 07:40:24 +00:00
Dean Camera 2f643f6143 Added new HID_HOST_BOOT_PROTOCOL_ONLY compile time token to reduce the size of the HID Host Class driver when Report protocol is not needed. 2009-09-30 08:16:42 +00:00
Dean Camera 89c837ee34 Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library.
MIDI device demos now receive MIDI events from the host and display note ON messages via the board LEDs.

Added beginnings of a MIDI class bootloader.
2009-09-30 04:40:36 +00:00
Dean Camera 059ebd01a3 Fix missing semicolons in the *WithParser Host mode demos. 2009-09-29 07:21:47 +00:00
Dean Camera 512977322b Fix missing semicolons in the *WithParser Host mode demos. 2009-09-29 07:21:35 +00:00
Dean Camera fa8d25ef29 Remove old OTG demo directory with useless TestApp demo. Add new DualRole directory with new Class Driver powered Mouse dual role demonstration application showing a dual role device using the HID host/device Class drivers. 2009-09-29 07:13:42 +00:00
Dean Camera e57e08c672 Fixed PrinterHost demo returning invalid Device ID data when the attached device does not have a device ID (thanks to Andrei Krainev). 2009-09-28 15:56:27 +00:00
Dean Camera 409c49f057 Doxygen fixes to \param directives to give data direction in all projects. Make HID item filtering routines clearer in the HID WithParser demos. 2009-09-24 02:05:33 +00:00
Dean Camera 573a27d90a Fix incorrect names for the HID Host protocol setting routines. 2009-09-24 01:52:57 +00:00
Dean Camera f0fcffd146 Fix more build errors in the LowLevel "WithParser" HID Host demos. 2009-09-22 10:05:17 +00:00
Dean Camera 073a58cd29 Fix broken Host ClassDriver MouseHostWithParser demo. 2009-09-22 09:52:25 +00:00
Dean Camera 849b9535e7 Add new error condition to the HID Report Parser for when a report is parsed but no unfiltered items are encountered (i.e. nothing of interest in the device report). Make all host HID "WithParser" demos print the new error condition. 2009-09-22 08:07:48 +00:00
Dean Camera 576f40f5ae Move Dataflash operational checking code out from SCSI.c into the DataflashManager.c in the Device mode Mass Storage demos. 2009-09-22 07:53:57 +00:00
Dean Camera 242303c160 Add new attributes to the HID Report Parser and HID Host Mode Class driver to keep track of the largest report the device can send for buffer allocation purposes. Change MouseHostWithParser and KeyboardHostWithParser demos to only allocate the needed number of bytes. 2009-09-21 12:23:09 +00:00
Dean Camera 3ffa7543a0 Finish initial draft of the Host Mode HID Class driver.
Add new MouseHostWithParser and KeyboardHostWithParser Host Class driver demos.
2009-09-21 10:49:06 +00:00
Dean Camera f5c645296c Added new MassStorageKeyboard Device Class Driver demo (thanks to Matthias Hullin). 2009-09-21 08:07:26 +00:00
Dean Camera 6bbd2a99c2 Fix building of KeyboardHostWithParser and MouseHostWithParser demos broken by HIDParser API changes. 2009-09-21 06:32:16 +00:00
Dean Camera 0029cb454e Fix broken KeyboardMouse ClassDriver device demo - use internal HID Class Driver structures for boot protocol reports. 2009-09-21 06:13:00 +00:00
Dean Camera 9d6a373cb6 Add const qualifiers to Host mode Class drivers.
Fix KeyboardHost ClassDriver demo; boot protocol keyboard report structure in the Host Mode HID Class driver uses the full keycode array from the attached device.
2009-09-21 06:08:39 +00:00
Dean Camera 0d5e30e69f Remove type definitions of the keyboard and mouse boot protocol report layouts from the Device Class Driver demos, as they are now located inside the class driver. 2009-09-20 12:52:35 +00:00
Dean Camera 6c5c9212d8 Add KeyboardHost HID Host Class driver demo to the library. 2009-09-20 12:46:26 +00:00
Dean Camera aa640330a1 Finish Class Driver MouseHost demo. Update HID Host Class driver; boot protocol now works, still need to finish and test report protocol mode. 2009-09-20 12:34:07 +00:00
Dean Camera 51566d1a81 Added new Pipe_IsFrozen() macro to determine if the currently selected pipe is frozen.
Added new USB_GetHIDReportSize() function to the HID report parser to retrieve the size of a given report by its ID.

More additions to the unfinished HID Host Class Driver.
2009-09-20 12:01:25 +00:00
Dean Camera cd0adb7574 Added support for the officially recommended layout of the external peripherals connected to the BUMBLEB board.
Added flag to the HID Host Class driver to indicate the currently selected reporting protocol.
2009-09-17 23:34:16 +00:00
Dean Camera 7c6b2019a3 Fix Mass Storage Host Class driver GetMaxLUN command - incorrect function return codes used in comparison to check for success.
Add HID Host Class driver functions to set the report protocol, add more class driver documentation.
2009-09-17 13:12:21 +00:00
Dean Camera 93b24a25df Fixed Low Level USBtoSerial demo not storing received characters (thanks to Michael from DirectAid.ca). 2009-09-13 08:29:31 +00:00
Dean Camera b221e7d175 Remove USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token, split out standard descriptors into seperate USB_Descriptor_* and USB_StdDescriptor_* structures so that both can be used within the one project.
Add guard to the HID Host Class driver SetProtocol command, to ensure that the device supports boot protocol mode before issuing the request.
2009-09-09 13:17:04 +00:00
Dean Camera 524decdeb3 Change HID report parser so that it can calculate and record the sizes (IN, OUT and FEATURE) of each report within the device, by report ID. This will be required in host mode, so that the host can determine how many bytes of data must be read in for each report.
Add to MouseHostWithParser and KeyboardHostWithParser demos to print out the report sizes when a valid device is connected.
2009-09-09 08:34:24 +00:00
Dean Camera 331929833d Add Host mode Class driver demo summaries. 2009-09-09 04:22:49 +00:00
Dean Camera d2068d878c Finish Still Image Host class driver. 2009-09-09 04:18:37 +00:00
Dean Camera 6f993a2f75 Add link to third-party signed version of the official FLIP DFU driver for 64-bit Windows OSes to the DFU bootloader readme file.
Add HTML anchor links to URLs in the documentation to ensure that they are rendered correctly in the generated documentation.
2009-09-07 10:50:58 +00:00
Dean Camera 7882da1ed8 Remove information about 64 bit Windows OS signing requirements for the CDC based demos -- apparently the native CDC driver can be installed without first disabling the OS's driver signing requirements. 2009-09-07 08:11:17 +00:00
Dean Camera 0486f12e3e Add in new invalid event hook check targets to project makefiles to produce compilation errors when invalid event names are used in a project.
Re-add in flip, flip-ee, dfu and dfu-ee targets to project makefiles (thanks to Opendous Inc.)

Fix allowable F_CPU values comment in project makefiles.
2009-09-06 05:58:40 +00:00
Dean Camera f6700c0ea5 Added 64 bit OS driver installation instructions to the readme for all CDC based projects. 2009-09-06 04:22:46 +00:00
Dean Camera 064e6a2f32 Changed Still Image Host class driver to auto-fill TransactionID element of sent headers depending on the current session state.
CDC based demos and project now work under 64 bit versions of Windows (thanks to Ronny Hanson, Thomas Bleeker).

The Benito Programmer project now has its own unique VID/PID pair allocated from the Atmel donated LUFA VID/PID pool.
2009-09-06 04:15:35 +00:00
Dean Camera 6783bc4594 Add StillImage Host Class Driver functions for opening and closing sessions. Ensure IsActive is set on the interface to allow device functions to run.
Fix spelling of "Received" in all source files where it is misspelt "Recieved".
2009-09-02 13:08:55 +00:00
Dean Camera 205b35d131 Add user-filtering to the HID report parser, so that the user code can decide which items are to be stored into the HID_ReportInfo_t structure and which should be discarded to save on RAM usage. 2009-09-02 07:16:52 +00:00
Dean Camera ecf7c18cf2 Fixed error in PrinterHost preventing the full page data from being sent to the attached device. 2009-09-02 00:27:52 +00:00
Dean Camera 5908e28e8d Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header.
Added basic PIMA commands to the StillImage Host Class driver - need to extend to PIMA specific command functions.
2009-09-01 13:35:30 +00:00
Dean Camera bda4bd4501 Move check for devices not supporting internal serials in demos which make use of USE_INTERNAL_SERIAL to Descriptors.c from Descriptors.h so that the warning is only generated at most once per compilation. 2009-09-01 11:16:57 +00:00
Dean Camera f9f1bcc25c Oops - with new changes to the way the device Configuration Descriptor is retrieved from the device, ensure that the correct position pointer is cast when extracting descriptor parameters. 2009-08-31 08:27:48 +00:00
Dean Camera 7fbb759287 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. 2009-08-31 07:48:32 +00:00
Dean Camera 813e6f0318 Remove deleted source files from the Device mode Class driver demos to enable them to be built. 2009-08-30 11:42:16 +00:00
Dean Camera 3dce79d68c Added start of the Still Image Host Class driver demo and driver code.
Re-enabled building of the Host mode demos ClassDriver directory.
2009-08-30 11:36:04 +00:00
Dean Camera 0f51db56c0 Replace -finline-limit with -fno-inline-small-functions in project makefiles. 2009-08-30 06:52:03 +00:00
Dean Camera 922e60192d Condensed SCSI command functions in the LowLevel Mass Storage Host demo, to save on FLASH space.
Fixed issue in AVRISP project where the target RESET line was being toggled before it was tristated, causing problems synchronising to some targets (thanks to Mike Alex).
2009-08-27 13:12:44 +00:00
Dean Camera 754ea083d4 Fix memory corruption in Host mode Mass Storage Class driver. 2009-08-27 08:01:33 +00:00
Dean Camera 559ca2ba04 Added MS_Host_TestUnitReady() and MS_Host_ReadDeviceCapacity() to the host mode Mass Storage Class driver. 2009-08-26 08:20:55 +00:00
Dean Camera a765f71727 Add SCSICodes.h to the Class Driver Common folder, and automatically include it in both the Host and Device Mass Storage Class drivers. Delete existing version from the ClassDriver MassStorage device demo's /Lib/ folder. 2009-08-26 07:51:40 +00:00
Dean Camera 31d8ebebc0 Oops: Really disable building of Projects/Host/ClassDriver directory in the Projects/Host/ makefile.
Add more skeleton functions and definitions to the Mass Storage Host mode Class driver.

Made Endpoint_Write_DWord_* functions echo the structure of the matching Endpoint routines for clarity.
2009-08-26 07:34:31 +00:00
Dean Camera ee744abb7e More work on the Mass Storage Host mode Class driver.
Added  ATTR_NON_NULL_PTR_ARG() attributes to the class drivers to improve user code reliability by disallowing explicit NULL pointers as pointer parameters in function calls where the parameter must not be NULL.

Disabled building of the Demos/Host/ClassDriver directory until Host Mode Class drivers are complete to prevent build errors in the meantime.
2009-08-26 07:01:32 +00:00
Dean Camera f229502d9a Fixed AVRISP programmer demo -- can now connect to a target and read/write Sig/Lock/Fuse/OSCCAL bytes successfully.
Changed SPI_Init() to allow for the clock polarity and data sample modes to be set.

Changed Dataflash_Init() to no longer call SPI_Init() automatically.
2009-08-23 08:37:11 +00:00
Dean Camera fa8beef82d Moved out the handling of V2 Protocol parameters to a seperate set of files. Added parameter privellages, so that an error can be returned to the host when trying to perform a get/set value action on a parameter without the correct privellages. 2009-08-19 08:29:08 +00:00
Dean Camera 5d4478b3b4 Fix misspelt event name in the Class driver USBtoSerial demo, preventing correct operation. 2009-08-16 12:37:28 +00:00
Dean Camera 3a85962f94 Fix USBtoSerial device demos -- ensure the UDR1 register contents is read in under all circumstances which fire the ISR, so that the receive complete interrupt is cleared correctly to prevent freezes. 2009-08-16 10:57:47 +00:00
Dean Camera b71ff7c8cd Added new EVENT_USB_Device_StartOfFrame() event, controlled by the new USB_Device_EnableSOFEvents() and USB_Device_DisableSOFEvents() macros to give bus-synchronised millisecond interrupts when in USB device mode. 2009-08-16 08:51:54 +00:00
Dean Camera 25ddbb9e3b Adjust endpoint polling intervals for HID demos, to make them compliant with the 10ms minimum polling period for Low Speed devices. 2009-08-13 08:26:59 +00:00
Dean Camera 99abd1a8b7 Added explicit attribute masks to the device mode demos' descriptors. 2009-08-13 08:14:16 +00:00
Dean Camera df5500e81c Added CDC_Device_Flush() command to the CDC Device mode class driver.
Minor updates to the unfinished SideShow demo for clarity.

Added unfinished MassStorageHost class driver demo.
2009-08-13 06:43:17 +00:00
Dean Camera a7ade9f28d Add CDC Host class driver EVENT_CDC_Host_ControLineStateChanged() event.
Minor documentation fixes.
2009-08-11 10:02:50 +00:00
Dean Camera c86491af8b Add new functions to the HID host class driver, refine HID interface protocol matching.
Remove stray state variable from the CDC host class driver.
2009-08-11 09:12:29 +00:00
Dean Camera a2001ac1cc Fixed swapped paremeters in the HID state memory copy call while processing a HID PUSH item in the HID report parser.
Fixed memory corruption HID report parser when too many COLLECTION or PUSH items were processed.

Make RNDIS device class driver include the CDC device class driver header, so that it can inherrit the required CDC functional descriptor macro.

Make HID host class driver include the HID report parser.
2009-08-11 08:36:25 +00:00
Dean Camera 8711dc7ced Fix issue in CDC device class driver where received data the size of the data endpoint could lock up the driver.
Further work on the new CDC and HID host mode class drivers.

Reset changelog et. al. to reset development information for the new version currently under development.
2009-08-11 01:52:15 +00:00
Dean Camera d423090b26 Cleanups to RNDIS device demos. Fix issue in RNDIS demos where the memory would become corrupted due to an incorrect bounds check when iterating over the port state table, causing random resets.
Revert change to Template_Endpoint_Control_R.c, which broke control stream reads.

Remove uneeded ADC.h include in the class driver AudioOutput demo.
2009-08-07 06:55:31 +00:00
Dean Camera 85c2716f2d Make Benito ping-pong LED code more explicit, using masks of the TX and RX LED masks for ping-pong toggle rather than the ambiguous LED "Busy" mask.
Fix incorrect event name in MassStorageHost.c.
2009-08-07 00:27:11 +00:00
Dean Camera 33a5715e91 Simplify CDC device demos, by directly assigning the string to transmit to the pointer, rather than using an intermediatary table to hold all the possible transmit strings. 2009-08-06 14:30:53 +00:00
Dean Camera c830fcb0e1 Make Endpoint control transfers more reliable; early-abort when an incomplete packet is sent from the host (indicating end of transfer), add check for control reads to ensure that no more than wLength bytes are read from the interface.
Condense sequential printf_P/puts_P calls to single printf_P calls for size and clarity.
2009-08-06 14:22:04 +00:00
Dean Camera 99c447c754 Fixed issue in USBtoSerial demos where the USART Rx line was not having its pullup enabled at startup, leading to noise being received from the Rx pin when left floating.
Removed unused relative Common.h header include from the DriverStubs board stub drivers.

Fixed Benito programmer, use the correct LED functions where needed to ensure correct status display at all times.
2009-08-05 13:16:36 +00:00
Dean Camera 4421782b7f Make Control Endpoint stream transfers more reliable by adding in early aborts for unexpected new SETUP tokens, or unexpected status stage during control stream writes.
Fix corruption in Device RNDIS demos TCP stack when too many connections attempted simultaneously, freezing the device when a page was re-fetched before the first connection was closed.

Fix incorrect model compatibility information in the Host LowLevel demo overview text files.
2009-08-05 11:39:28 +00:00
Dean Camera a9d5e129b7 Changed over manual loops waiting for endpoints to be ready to use the library Endpoint_WaitUntilReady() function for robustness. Fixes issues with terminated transfers on the host locking up USB devices. 2009-08-05 09:37:45 +00:00
Dean Camera 042d3288ad Fix incorrect Event call name in USBInterrupt.c. 2009-08-05 07:18:08 +00:00
Dean Camera c5038f1bf4 Renamed all library events to properly seperate out Device and Host mode events. Changed the firing conditions for some events to ensure that events are fired by their own USB mode only.
Remove VBUS events - not needed as the library takes care of VBUS detection and feedback on supported AVRs via the USB_Device_Connected and USB_Device_Disconnected events.

Fixed incorrect Host state assignment in the incomplete BluetoothHost demo.
2009-08-05 06:36:31 +00:00
Dean Camera 357ccc577b Better fix for LowLevel CDC demo issue where sending data before the line encoding is set will cause a failure of the host to open the port. Added fix to the DualCDC and USBtoSerial LowLevel demos. 2009-08-04 08:36:30 +00:00
Dean Camera eff07bb877 Fix issue with CDC device demos causing broken communications when the device tries to send data before the host has set the line encoding. 2009-08-04 08:06:26 +00:00
Dean Camera ab2ae13d81 Fix build error in TestApp demo caused by previous commit. 2009-08-02 23:17:47 +00:00
Dean Camera 6f4cc344ab Rename TOTAL_NUM_CONFIGURATIONS to FIXED_NUM_CONFIGURATIONS, to match the existing FIXED_CONTROL_ENDPOINT_SIZE compile time option. Add FIXED_NUM_CONFIGURATIONS to the descriptors of each project using the option. 2009-08-02 23:14:30 +00:00
Dean Camera bbf89d81fa Make both LowLevel and ClassDriver AudioOutput demos always output to board LEDs, regardless of output mode (removed AUDIO_OUT_LEDS compile time option from the demo). This allows for positive feedback to the user of audio activity regardless of output mode. 2009-08-02 11:43:16 +00:00
Dean Camera ac593611c9 Fixed the ClassDriver GenericHID demo so that it echoes back reports as indicated in the demo overview. 2009-07-31 03:35:24 +00:00
Dean Camera eb41086947 Fix demos based on the device mode HID class driver, as well as the driver itself. Changed HID device class driver to require the user to give a buffer and size to hold the previously generated report, for comparison purposes, and altered the prototype of the CALLBACK_HID_Device_CreateHIDReport() function so that reports can be sent to the host even if there are no apparent changes (useful for relative movements in mice, etc.). 2009-07-31 03:22:08 +00:00
Dean Camera 7df6b9563c Add new HID_Device_MillisecondElapsed() function to the HID device Class driver, to move the burden of managing the Idle period of each instance to the library and not the user application. 2009-07-30 14:59:57 +00:00
Dean Camera 72932e2780 Fix to HID device mode Class driver, so that new reports are compared against the old, and updated reports made within the idle period are sent immediately to the host. 2009-07-30 14:35:42 +00:00
Dean Camera ec079c71d8 Minor cleanups to DualCDC ClassDriver device demo for clarity. 2009-07-30 14:12:00 +00:00
Dean Camera 41babf1cb7 Fix incorrect configuration in the ClassDriver AudioOutput demo.
Make all audio device Class Driver functions require a reference to the Audio class instance, so that the endpoint size can be checked (and to standardize the APIs).

Make LEDs more responsive in the AudioOutput device demos.
2009-07-30 14:06:52 +00:00
Dean Camera 41b54a2acd Set all CDC and MassStorage device mode demos (LowLevel and ClassDriver) to use the USE_INTERNAL_SERIAL feature, add compile time warnings for devices which do not have an internal serial. 2009-07-30 11:03:58 +00:00
Dean Camera ce3ea6fb25 Added standard stream example to the ClassDriver CDC device demo.
Fix incorrect HWB button mask in the STK526 Buttons driver.
2009-07-30 10:54:57 +00:00
Dean Camera 5ca1d7bf8f Fix redefinition warning when USB_DEVICE_ONLY is set on an AVR which does not support USB host mode. 2009-07-30 07:45:36 +00:00
Dean Camera bb05712efe Added 404 errors to the RNDIS Webserver example. 2009-07-29 01:40:42 +00:00
Dean Camera 7f3f39b575 Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits.
Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered.
2009-07-28 15:14:54 +00:00
Dean Camera 3472af91a5 Change project makefiles so that the current target settings and not just the board selection is printed during the build process.
Fix warning in AudioOutput demos when AUDIO_OUT_STEREO output mode is selected.
2009-07-28 13:53:52 +00:00
Dean Camera 23c1653efe Make LowLevel AudioOutput demo work in the same way as the ClassDriver AudioOutput demo for LEDs output. 2009-07-28 10:49:33 +00:00
Dean Camera 61ff4824a9 Changed AudioOutput demos to explicitly use timer 3 - the smaller USB AVRs where timer 1 was needed instead did not have the endpoint size neccesary for good audio throughput anyway.
Fix Benito documentation indicating erronously that the project used the HID USB class instead of the CDC class.
2009-07-28 10:46:20 +00:00
Dean Camera 864196c884 State information for class drivers is now zeroed out during enumeration (both in device and host mode) to ensure sane values after each enumeration. User code should no longer explicitly set state information as this is no longer preserved. 2009-07-27 23:19:17 +00:00
Dean Camera b9dd51cd63 Collapse configuration descriptor size retrieval and size testing into a single if statement within the new host mode class driver demos for clarity. 2009-07-27 10:55:21 +00:00
Dean Camera 84c3c4a3d9 Change Host mode class driver Pipe configuration routines -- better to let the application fetch the configuration descriptors once, and then pass them to each class driver in turn. 2009-07-27 10:48:55 +00:00
Dean Camera 5251bc6e4e Add new MouseHost Class Driver demo, unfinished, to allow for better testing of the new prototype Host Mode Class Driver framework. Flesh out start of a HID class Host mode class driver. 2009-07-27 10:31:07 +00:00
Dean Camera 05fa6e0c43 Corrected new Pipe_IsEndpointBound() function.
Completed host CDC class driver enumeration code.
2009-07-26 10:45:33 +00:00
Dean Camera 200821fe82 Added new LEDs_ToggleLEDs() function to the Board LEDs driver. 2009-07-24 01:44:01 +00:00
Dean Camera a6e85d6ed8 Added new Benito project, a simple modified USB-to-Serial bridge for the programming of AVRs using the official Arduino bootloader. 2009-07-23 10:39:10 +00:00
Dean Camera 5dbfdaa17d Ensure that the USB_DeviceState variable is properly set upon wakeup events, to the Addressed or Configured state as needed.
Add explicit support for the AT90USB646 to the Teensy bootloader now that PJRC have released the Teensy++ board.

Ensure unfinished SideShow demo uses an unallocated PID value within the LUFA range.
2009-07-23 08:00:12 +00:00
Dean Camera e071f3897a Added new USB_DeviceState variable to keep track of the current Device mode USB state.
Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers.

Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality.

Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead.

Fixed possible enumeration errors from spinloops which may fail to exit if the USB connection is severed before the exit condition becomes true.
2009-07-21 13:31:21 +00:00
Dean Camera 44179abcf8 Add PrinterHost demo to the documentation. 2009-07-21 10:29:56 +00:00
Dean Camera d0db78432f Add extra tests to the MassStorage device demo and class driver for validating command blocks from the host. 2009-07-21 04:46:48 +00:00
Dean Camera 67f390fe74 Add explicit guards to all device mode tasks to ensure the device is connected and configured before running the task, to prevent any user tasks from locking up the main USB task if the device has not been properly configured. 2009-07-21 02:48:41 +00:00
Dean Camera bf50959b80 Simplify SideShow GUID compares via a macro. 2009-07-20 14:51:19 +00:00
Dean Camera 86819ba9d8 Fixes to unfinished SideShow demo to re-enable correct building after previous commit. 2009-07-20 14:27:14 +00:00
Dean Camera 292fc9b65e Move unfinished SideShow source files to nested Lib directory for clarity. 2009-07-20 14:23:47 +00:00
Dean Camera 18f7cd3325 Ensure control pipe is selected in the PrinterHost demo before trying to send control requests. 2009-07-20 14:12:05 +00:00
Dean Camera 4f747e7b76 Change Doxygen configuration files to not produce 4096 directories for the documentation files -- the LUFA components do not generate enough documentation files to justify the large performance hit of creating so many directories.
Fix missing Doxygen documentation in the Class Driver Mass Storage Device demo.
2009-07-20 14:07:02 +00:00
Dean Camera 73a21890f6 Added missing DoxyGen configuration file to the PrinterHost demo. 2009-07-20 13:52:45 +00:00
Dean Camera 8a28fd8e6c Added extra DoxyGen documentation to the new PrinterHost demo. 2009-07-20 13:49:26 +00:00
Dean Camera 3ee3ed2d6d Add PrinterHost to the project file and Host LowLevel directory makefile. 2009-07-20 13:41:37 +00:00
Dean Camera 2a90f66de2 Moved PrinterHost demo from Incomplete to LowLevel, as it is now near-complete. 2009-07-20 13:37:20 +00:00
Dean Camera f3c061d5c8 Fixed PrinterHost demo Printer_GetDeviceID() routine not removing the Device ID string length from the start of the returned array (thanks to John Andrews).
Fixed error in new pipe stream function template system not setting the right device token for R/W operations (also thanks to John Andrews).
2009-07-20 10:19:13 +00:00
Dean Camera 211712d66d Remove ClearPipeStall routine from the StillImageHost demo, as there is now a version of the function built into the library itself. 2009-07-20 03:14:41 +00:00
Dean Camera 4c035b14f1 Cleaner solution to the PrinterHost data send routine problem of embedded NULLs - use a special structure to hold the data string plus the length in bytes of the data. 2009-07-20 03:07:27 +00:00
Dean Camera 5d8cdd9bea Fix unfinished printer host demo - some printer languages use embedded NULLs and so strlen() won't work in all cases. Ensure NULL terminator for the test page is not transmitted to the device. 2009-07-20 02:59:16 +00:00
Dean Camera 8a68203d34 Added error codes to most StillImageHost demo commands. 2009-07-20 02:27:32 +00:00
Dean Camera cf313989e6 Don't send terminal RESET codes via serial - just set the foreground colour and assume the user has the background set to something sane, so that the demos don't wipe out custom user terminal settings. 2009-07-19 13:17:38 +00:00
Dean Camera cc879df4f0 Use sane ANSI terminal escape codes for the Host mode demos, so that they do not cause eye-searing, unreadable text on terminals which parse the escape codes properly. 2009-07-19 13:08:48 +00:00
Dean Camera 786479faf0 Add partial project documentation to the incomplete PrinterHost demo.
Change over Printer_GetDeviceID() to require a pointer to the destination buffer plus the buffer size, rather than using a pointer to a special structure.

Make new Printer_SendData() function to hide the implementation of sending data to an attached printer, cleaning up the main demo source file body.
2009-07-19 12:36:19 +00:00
Dean Camera d3fb6273aa Fix PrinterHost demo so that it will only enumerate printers with Bidirectional protocol encapsulation. Change enumeration code to automatically select the correct alternate setting for the printer interface to select the bidirectional protocol. 2009-07-19 09:36:16 +00:00
Dean Camera 9d2613d908 Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews). 2009-07-19 09:04:25 +00:00
Dean Camera b243c2b80b Magstripe Project: Ensure that empty tracks still print out a newline seperator so that the host always knows what track data is being sent.
Updates to PrinterHost demo to include some PCL test data plus fixes to the GetDeviceID routine.
2009-07-19 07:30:37 +00:00
Dean Camera d6543dee0d Minor updates to the Magstripe and MissileLauncher projects to fix bugs and improve performance.
Fixed error in GenericHID descriptors preventing it from passing the USB-IF HID tests (thanks to Søren Greiner).
2009-07-16 15:00:10 +00:00
Dean Camera 37f8a84f35 Added new TOTAL_NUM_CONFIGURATIONS option, removed USE_SINGLE_DEVICE_CONFIGURATION compile time option (but silently convert it to USE_SINGLE_DEVICE_CONFIGURATION internally for compatibility).
Added new USE_FLASH_DESCRIPTORS compile time option. By default, descriptors can now lie in mixed memory spaces (specified by a new parameter to the CALLBACK_USB_GetDescriptor() function) unless one of the USE_*_DESCRIPTORS compile time option is specified.
2009-07-16 08:15:27 +00:00
Dean Camera f85a53a31b Fix HID class device driver -- if a SetIDle request is issued with the LSB of wValue set to zero, the idle period must be set for all HID interfaces.
Fix Keyboard and Mouse demos, Idle period is now multiplied by 4 as the period is read into and sent out of the device to ensure it is always stored as a multiple of 1ms. Fixes Keyboard demo using an initial Idle period of 2s rather than 500ms (thanks to Brian Dickman).

Move out the internal device serial descriptor reading routine into a seperate static function, rather than being part of USB_Device_GetDescriptor.
2009-07-15 05:49:19 +00:00
Dean Camera 312748702a Added better module summaries. 2009-07-14 07:33:06 +00:00
Dean Camera 73d9fafc0f Added new EEPROM and FLASH buffer versions of the Endpoint and Pipe stream functions. Changed Endpoint.c and Pipe.c to use a templated system to build the seperate functions, rather than duplicating each function's code many times. 2009-07-13 12:38:30 +00:00
Dean Camera 1d26e78258 Added compatibility list to the documentation of each individual demo.
Documented FAST_STREAM_TRANSFERS compile time option.

Reduced the TCP window size for the RNDIS demos (Class and LowLevel) to make them compatible with the AT90USB64x.
2009-07-13 06:44:14 +00:00
Dean Camera 0fcbe22c9e Added new HOST_STATE_WaitForDeviceRemoval host state machine state for non-blocking disabling of device communications until the device has been removed (for use when an error occurs or communications with the device have completed). Changed over all host mode demos to use the new state.
Added verbose documentation for each of the USB Host state machine states.
2009-07-13 05:34:43 +00:00
Dean Camera a54ed0085b Seperated out parts of the PrinterHost incomplete demo into a seperate Lib subdirectory.
Fixed Host mode to Device mode UID change not causing a USB Disconnect event when a device was connected.
2009-07-13 04:46:52 +00:00
Dean Camera 23f3c3deee Fixed compilation error in incomplete BluetoothHost demo. 2009-07-11 15:07:07 +00:00
Dean Camera e0af6014a7 Added incomplete PrinterHost demo application.
Seperated out Lib components of the incomplete BluetoothHost demo application out into a seperate Lib subfolder.

Changed F_CLOCK entries in project makefiles to alias to F_CPU by default, as this is the most common case.
2009-07-11 15:05:56 +00:00
Dean Camera b462f2d457 Minor correction to MagStripe demo to fix build problems. 2009-06-29 11:11:51 +00:00
Dean Camera 86e6ed7f31 Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the next command immediately after returning, no need to call Dataflash_ToggleSelectedChipCS() afterwards.
Added new DATAFLASH_CHIP_MASK() macro to the Dataflash driver, which returns the Dataflash select mask for the given chip index.

Updated MassStorage device block write routines to use ping-pong Dataflash buffering to increase throughput by around 30%.
2009-06-29 09:30:06 +00:00
Dean Camera f1076ac4d6 Added const modifiers to device mode class drivers.
Added parameter directions to function parameter documentation.

Added new experimental FAST_STREAM_FUNCTIONS compile time option to speed up stream transfers at the expense of a higher FLASH consumption (needs testing to verify improved throughput).
2009-06-28 13:39:08 +00:00
Dean Camera 3cbdcd3686 Reduce struct name pollution - group typedef struct names by class driver name where appropriate. 2009-06-26 11:43:56 +00:00
Dean Camera 1756087c3e Optimize vendor/product description string display code in MassStorageHost.
Remove all Host mode class demos other than the CDCHost class driver demo, so that they can be re-added as they are made once the host mode class framework is designed.

Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails.

Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used.
2009-06-26 09:58:43 +00:00
Dean Camera b2cf4d3222 Oops - SCSI INQUIRY data uses fixed-length, non-terminated strings -- need to copy the strings to a temp buffer and terminate before using them in printf. 2009-06-23 09:38:22 +00:00
Dean Camera 64937a6206 MassStorageHost demo now retrieves Inquiry data from the device during enumeration, and prints the device's Vendor and Product IDs. 2009-06-23 09:01:23 +00:00
Dean Camera bb23e55f11 Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command. 2009-06-23 08:45:46 +00:00
Dean Camera a3a04aa671 Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling the existing \ref Pipe_SetFiniteINRequests() function. 2009-06-23 08:03:09 +00:00
Dean Camera 7f81803aaa Fixed CDCHost demo unfreezing IN pipes during configuration, rather than during use.
Changed Pipe stream functions to automatically set the pipe token, allowing them to be used on bidirectional pipes without having to explicitly call Pipe_SetPipeToken() beforehand.
2009-06-23 07:55:18 +00:00
Dean Camera 189d0c7e66 Add demos/bootloaders/projects overview to the manual. 2009-06-22 11:32:51 +00:00
Dean Camera 7d7573e4e5 Corrected the ADC driver for the ATMEGA16U4 and ATMEGA32U4 (thanks to Opendous Inc.). 2009-06-22 10:23:47 +00:00
Dean Camera 730624f745 Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number, added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code. Updated Mass Storage and CDC based demos to use the new device serial number if the device it is compiled for supports it. 2009-06-21 09:22:31 +00:00