Commit Graph

703 Commits

Author SHA1 Message Date
Dean Camera cbafc306b2 Fixed incorrect endpoint initialisation order in the LowLevel DualVirtualSerial demo (thanks to Rick Drolet). 2010-12-17 19:54:03 +00:00
Dean Camera c879887dce Fixed broken HID_REQ_GetReport request handler in the Low Level GenericHID demo. 2010-11-29 03:01:31 +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 5ce8380a7d Fix XPLAINBridge code broken during the changes to the Rescue Clock generation in the AVRISP-MKII clone project.
Change over all low level host mode project's descriptor comparator routines to perform the descriptor casting in a temp variable to make the code clearer and easier to modify (despite being more verbose).
2010-11-02 11:16:36 +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 7aaced1e8b Remove USB_MODE_* macros, replace with a semantically linked USB_Modes_t enum.
Moved the USB device selection logic for ENDPOINT_TOTAL_ENDPOINTS further up in Endpoint.h to where the endpoint bank capabilities are determined, to reduce the total number of device-specific logic.

Change USB_Host_WaitMS() to test and disable the HSOFI interrupt before resuming the bus, so that it does not fire before the delay loop has run.

Add missing const qualifier to the parameter of USB_Host_ClearPipeStall().
2010-10-12 12:22:11 +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 c8942ef469 Fixed LowLevel JoystickHostWithParser demo not saving the chosen HID interface's report descriptor size.
Simplified low level Host demo configuration descriptor parser routines.
2010-10-01 12:01:54 +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 86367574e6 Fix incorrectly named configuration descriptor callback routines in the host mode class drivers.
Fix typo in MIDI low level device demo.
2010-09-30 08:07:29 +00:00
Dean Camera 7166c7ba3e Fix low level host mode demos not correctly fetching the next endpoint when an invalid interface is discarded.
Update the pipe configuration routines in the host mode class drivers so that they use the same new code to enumerate compatible devices to increase reliability. Add support to the host mode class drivers for non-sequential (but non-overlapping with other interface) pipe numbers.
2010-09-30 07:56:47 +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 b2a30cd48a Added CDC functional descriptor structs to the Low Level CDC demos and CDC class bootloader, to improve the readability of the descriptors.
Fixed BootloaderCDC project failing on some operating systems due to removed Line Encoding options (thanks to Alexey Belyaev).
2010-09-28 13:27:19 +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 5f3c4cc6e0 Reverted modifications to USBInterrupt.h that were intefering with correct host mode operation.
Fixed SUSPI interrupt not being cleared during device mode enumeration, causing accidental mis-fires on re-enumeration.

Fixed JTAG_DEBUG_POINT() and JTAG_DEBUG_BREAK() macros not compiling under pure C99 standards mode.
2010-09-22 04:20:45 +00:00
Dean Camera ed7067e89f Rename internal suspend and wake up USB interrupt macros so that they follow the same naming scheme as the other USB ISR macros. 2010-09-19 08:42:30 +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 7aaf9b2036 Added new PRNT_Host_BytesReceived() and PRNT_Host_ReceiveByte() functions to the Print Host Class driver. 2010-09-07 03:38:11 +00:00
Dean Camera 18cbd31605 Added new USB_Device_GetFrameNumber() and USB_Host_GetFrameNumber() functions to retrieve the current USB frame number.
Added new USB_Host_EnableSOFEvents(), USB_Host_DisableSOFEvents() and EVENT_USB_Host_StartOfFrame() for the user application handling of USB Start of Frame events while in USB Host mode.

Changed over all demos, drivers and internal functions to use the current frame number over the Start of Frame flag where possible to free up the Start of Frame flag for interrupt use in the user application.
2010-09-05 07:11:53 +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 b3c6599bb7 Remove remaining void* descriptor casts in the projects and demos that were not removed when the GetDescriptor callback function's signature was altered. 2010-08-29 13:21:14 +00:00
Dean Camera b7b8a9edfa Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value. 2010-08-24 13:16:16 +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 4cc7f5200b Changed all Device mode LowLevel demos and Device Class drivers so that the control request is acknowledged and any data transferred as quickly as possible without any processing inbetween sections, so that long callbacks or event handlers will not break communications with the host by exceeding the maximum control request stage timeout period. 2010-08-22 03:26:20 +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 ad4308b1d1 Added new SCSI_ASENSE_NOT_READY_TO_READY_CHANGE constant to the Mass Storage class driver, to indicate when a previously not ready removable medium has now become ready for the host's use (thanks to Martin Degelsegger) 2010-08-20 11:03:25 +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 eb060db71b Tighten up the code in the delta movement detection code in the MouseHostWithParser and JoystickHostWithParser demos. Make the ClassDriver JoystickHostWithParser demo use the HID_ALIGN_DATA() macro instead of manual shifting and casting. 2010-08-09 12:04:52 +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 be520aed52 Add notification endpoint to the incomplete TMC demo. 2010-08-09 07:21:53 +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 98947e3750 Ensure all demos now compile in C99 standards mode, and not GNU99 (C99 + GNU extensions). 2010-08-03 11:13:06 +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 9597b33c33 Fixed Serial peripheral driver not turning off the USART before reconfiguring it, which would cause incorrect operation to occur (thanks to Bob Paddock). 2010-07-31 06:55:47 +00:00
Dean Camera 612df774d9 Oops - fix mixed "initialize" and "initialise" - opt for American spelling due to its wide use in technical standards. 2010-07-30 10:58:16 +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 7c8d16fd7a Oops - need to turn off USART via control register B before reconfiguring, fix ordering of USART control register modifications in the Benito and USBtoSerial projects. 2010-07-30 01:11:04 +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 9a97f16b07 Add TMC header read and write functions, so that TMC data can now be exchanged in both directions.
Minor update to the LowLevel MassStorage device demo, so that the ReadInCommandBlock() performs the data OUT endpoint selection and packet arrival test.
2010-07-28 09:17:22 +00:00
Dean Camera be2a7d4598 Move over message ID specific header data to unions inside the standard TMC header structure, so that all header data is read in one chunk in the incomplete TMC demo. 2010-07-27 11:26:47 +00:00
Dean Camera cd39c38d5f Rename reserved members of all structs so that they are uniformly named across all demos/projects/bootloaders.
Added start of the Incomplete TMC demo's command parser code.
2010-07-26 07:28:40 +00:00
Dean Camera 6e2920bc84 Add comments to the currently completed portions of the incomplete Test and Measurement Class demo. 2010-07-26 05:02:55 +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 3a79548dc2 Add TMC device capabilities to the incomplete TMC demo. 2010-07-23 09:12:26 +00:00
Dean Camera 9b0e4b8356 Convert over internal pseudo-function macros to true inline functions for added type-safety and compile-checking. 2010-07-22 15:38:12 +00:00
Dean Camera ac0ece0141 Added start of a low level device Test and Measurement class demo (thanks to Peter Lawrence). 2010-07-22 07:19:41 +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
Dean Camera f985a8c176 Add AVRStudio 4 project files to the LowLevel Device mode demos. 2010-07-13 05:20:49 +00:00
Dean Camera 658da63e6c Add AVRStudio 4 project files to the ClassDriver Host mode demos. 2010-07-13 05:11:23 +00:00
Dean Camera 20943fa1aa Add AVRStudio 4 project files to the LowLevel Host mode demos. 2010-07-13 05:01:18 +00:00
Dean Camera 1167b69943 Add missing eol-style properties to new source files. 2010-07-12 10:20:38 +00:00
Dean Camera ae9dab1398 Add missing clean_doxygen phony targets to the project makefiles. 2010-07-12 10:18:18 +00:00
Dean Camera 2b0d93c129 Correct misspellings in the Bluetooth demo code. 2010-07-11 08:11:25 +00:00
Dean Camera f6e84eabce Add more doxygen function documentation to the RFCOMM layer. 2010-07-11 07:59:15 +00:00
Dean Camera 00fa6aa2db Oops - ACL layer Bluetooth_SendPacket() function should check and allow NULL channels, since that indicates a control channel request.
Fix up Doxgen documentation for the Bluetooth stack code.
2010-07-11 07:38:18 +00:00
Dean Camera 6276d5f82a Rename Bluetooth stack function parameters to clearly indicate what sort of Bluetooth channel (ACL, RFCOMM) is required for each parameter, to make the code easier to read.
Add a new RFCOMM_ChannelSignalsReceived() Bluetooth stack callback from the RFCOMM layer for when the remote device sends new terminal control signals.

Fix RFCOMM_SendData() not aborting correctly when the requested RFCOMM channel is not found.
2010-07-11 07:29:27 +00:00
Dean Camera ba711d6759 Oops - fix errors in the MassStorageKeyboard SCSI driver file due to incorrect copy/paste. 2010-07-09 07:44:08 +00:00
Dean Camera c326fe9605 Rewrote the implementation of the SwapEndian_16() and SwapEndian_32() functions so that they compile down in most instances to minimal loads and stores rather than complicated shifts.
Fixed SCSI.c implementations of all the demos/projects casting the block count to a 32-bit temporary before calling SwapEndian_16().
2010-07-09 07:24:34 +00:00
Dean Camera 2b0e86243f Add a new RFCOMM_ChannelOpened() callback event for when logical RFCOMM channels are opened in the BluetoothHost demo. Make the demo echo back sent characters to the remote device. 2010-07-08 08:48:52 +00:00
Dean Camera c37fd0ef91 Add a new RFCOMM service callback for when new data has been received on a valid RFCOMM channel. 2010-07-08 08:05:14 +00:00
Dean Camera 70983caea5 Move out Bluetooth stack callback functions to a seperate BluetoothEvents.c/.h set of files for clarity in the Incomplete BluetoothHost demo. Add a new stack callback for opened ACL channels, make the demo save the RFCOMM channel when opened so that it does not have to search for it on each iteration of the main program loop. 2010-07-08 07:44:07 +00:00
Dean Camera 8b053d6ba5 Added new Drivers/USB/LowLevel/Device.c file to house Device mode specific functions that are more complicated than simple macros. Moved USB_Device_SendRemoteWakeup() to the new Device.c source file and corrected it to unfreeze and restart the USB controller clock before issuing a Remote Wakeup request.
Removed the USB_Device_IsRemoteWakeupSent() and USB_Device_IsUSBSuspended() macros, as they are now obsolete.
2010-07-02 03:37:19 +00:00
Dean Camera 31a34154db Move out RFCOMM channel structure init code to a seperate routine, to save on compiled code space and to prevent copy-paste errors. 2010-07-02 03:06:16 +00:00
Dean Camera fbabecee66 Add RFCOMM service routine, to send pending configuration requests on RFCOMM channels. Add in RFCOMM channel config flags, to determine which configuration commands have been sent and received.
Add a new RFCOMM_SendChannelSignals() function to transmit a change in V24 terminal handshake lines to the receiving device.

Prevent SABM packets sent to the control DLCI in the RFCOMM layer from creating a new channel entry, as the control DLCI does not have connection data associated with it.

Fix up MSC control packet handling so that received responses can be acknowledged correctly, so that the RFCOMM layer can record when the receiving device has ACKed a sent change in V24 terminal handshake lines.
2010-06-29 04:40:02 +00:00
Dean Camera b656540468 Make Bluetooth ACL channel searches skip over closed (invalid) channels. RFCOMM channels are considered invalid when the channel state is closed, not when the DLCI is zero - fix incorrect code. 2010-06-26 15:07:13 +00:00
Dean Camera d29a408ffd Add default "all" makefile targets to the demo tree makefiles. 2010-06-25 13:28:34 +00:00
Dean Camera 26afe5fe9e Fix Doxygen formatting of parameters for the CALLBACK_HID_Device_CreateHIDReport() function in the ClassDriver HID device demos. 2010-06-25 09:49:46 +00:00
Dean Camera 4b952d479a Split RFCOMM channel signals into Remote and Local pairs. Use memcpy() to copy over data from the command parameters to the RFCOMM response parameters.
Ensure that only the valid parameter bytes are sent back in response to MSC commands.
2010-06-23 08:10:21 +00:00
Dean Camera 2eff731ecf Add TEST RFCOMM command handler. Remove the RFCOMM channel UseUIFrame element, as the Bluetooth adaptions to RFCOMM only allow UIH frames to be used. 2010-06-23 07:17:47 +00:00
Dean Camera 559af02204 Use a bitmask instead of an array of bools in the SDP UUID List matching algorithm to reduce the compiled code size and stack used. 2010-06-22 07:55:02 +00:00
Dean Camera e621ab33be Added new pgm_read_ptr() macro to Common.h for reading of pointers out of flash memory space.
Added new SWAPENDIAN_16() and SWAPENDIAN_32() macros to Common.h for statically initialized variables at compile time.
2010-06-22 07:06:27 +00:00
Dean Camera 69dc32c5f0 Fix compile and Doxygen errors due to the spell-check changes in the source code. 2010-06-16 11:46:42 +00:00
Dean Camera 13ea700b35 Rename RFCOMM_GetFrameDataLength() to RFCOMM_GetVariableFieldValue() as it is multi-purpose, and modify it to move the buffer pointer itself rather than relying on the caller.
Make RFCOMM_GetChannelData() return NULL if the required channel DLCI is found, but the channel is closed.

Add modem signals (BREAK, DCD, etc.) to the channel state array, and add in a handler for the Modem Status RFCOMM control command.
2010-06-15 11:28:15 +00:00
Dean Camera f5d079462d Changed the RFCOMM-specific ItemProtocolChannel_t type to a more generic ItemProtocol_8BitParam_t name, and added a new ItemProtocol_16BitParam_t to the SDP protocol type defines. 2010-06-15 10:09:42 +00:00
Dean Camera 3125fd5f4f Add RFCOMM channel configuration parsing and channel states to the incomplete BluetoothHost demo.
Add missing BT_* prefix to the Bluetooth stack's channel state enum values.
2010-06-15 09:32:35 +00:00
Dean Camera a14ece5f57 Change over Doxygen \note documentation to \pre where applicable. 2010-06-15 03:34:55 +00:00
Dean Camera 67bc625109 Split out the RFCOMM Control Channel command processing code into a seperate set of files for clarity. 2010-06-13 13:21:35 +00:00
Dean Camera b522e35965 Rename the incomplete Bluetooth Host demo's ServiceDiscoveryProtocol.c/.h files to SDP.c/.h. Fix compile errors in RFCOMM.c/.h. 2010-06-13 12:44:20 +00:00
Dean Camera 637c7b01d0 More RFCOMM layer additions - begin to add multiplexer channel state variables. 2010-06-13 12:37:16 +00:00
Dean Camera 931ca42a6e Minor fixes to demos to add in some missing comments, printf() formatting. Make incomplete Bluetooth demo indicate connections visually via the board LEDs. 2010-06-12 07:03:22 +00:00
Dean Camera e930738247 Add stub RFCOMM command handlers. Move out RFCOMM frame length and data pointer calculations to the master RFCOMM frame reception routine, instead of inside each frame type handler function. 2010-06-07 13:39:34 +00:00
Dean Camera f92229697f More RFCOMM layer implementation - fix FCS calculation, add in start of control channel command processing. 2010-06-07 12:53:47 +00:00
Dean Camera 34e0fed4ca Make the RFCOMM_SendFrame() function correctly generate frames from the input parameters, change addressing to use the raw DLCI address plus flags. 2010-06-07 09:07:18 +00:00
Dean Camera 361e1ec1d8 Refactor out RFCOMM packet send code into a seperate function. 2010-06-06 14:39:51 +00:00
Dean Camera 7aec6cba1a Fix incorrect copyright attribution on the class-driver keyboard demos due to header copy-pasting. 2010-06-06 14:03:56 +00:00
Dean Camera 2dabb4e55f Add the svn:eol-style property onto new files which where missing it to ensure uniform line endings. 2010-06-06 08:33:14 +00:00
Dean Camera efbedcfa54 Document Bluetooth files with overall file Doxygen comments. Add more initial RFCOMM layer code to receive and respond to SABM packets. 2010-06-04 06:25:12 +00:00
Dean Camera 6d53cdba83 More documentation fixes. 2010-06-03 15:55:28 +00:00
Dean Camera fc92f9969c Minor documentation cleanups. 2010-06-03 15:32:45 +00:00
Dean Camera 9293de2491 Start implementation of RFCOMM decoding layer. Add new service initialize routines for each Bluetooth service - currently unused, but will eventually reset the service state of RFCOMM when a new connection is made. 2010-06-03 12:45:15 +00:00
Dean Camera 13d812a718 Delay needed in bluetooth code due to the send function not waiting for the pipe bank to become ready before writing. Add in a call to Pipe_WaitUntilReady() to fix the issue. 2010-06-03 08:42:20 +00:00
Dean Camera a405a9bdf8 Extra protocol value in the RFCOMM protocol is the channel number, not the PSM - update typedef name and size.
Add delay to the Connection Request signal processing routine - without this, the host will not create the RFCOMM channel correctly. Need to investigate why this delay is needed.
2010-06-03 08:33:01 +00:00
Dean Camera 480da5aab6 Add PSM value to the RFCOMM service so that the host knows what PSM to use on channels when trying to access it. 2010-06-03 07:45:09 +00:00
Dean Camera 008e0e2e0a Add start of RFCOMM service layer to the incomplete BluetoothHost demo.
Reduce the size of the attribute search list from 15 ranges to 8 to save RAM.
2010-06-03 03:58:57 +00:00
Dean Camera 23a94a7181 Fix byte ordering of UUIDs in the SDP server - host can now successfully pair to the Bluetooth device and discover the exposed Serial Port Profile RFCOMM service. 2010-06-02 14:49:06 +00:00
Dean Camera c362709a1e The SDP UUID lists should be searched and ALL UUIDs matched for a record to be retrieved, not partial matches. Change the SDP code so that the entire list must be matched against a service attribute table's contents before it is returned.
Change matching algorithm so that it recursively searches through the entire attribute table, and not just pre-specified sequence attributes.

Add browse lists and proper descriptions to the Serial Port service.
2010-06-02 07:05:34 +00:00
Dean Camera da51c1f974 Add L2CAP service attribute table. Fix up ProtocolDescriptorList attributes, and add macros for used UUIDs to reduce typing and make the code easier to read. 2010-06-02 04:36:46 +00:00
Dean Camera b98158bd50 Clean up the Service tables, add incomplete ProtocolDescriptorList attribute to the SDP service. 2010-06-01 14:05:47 +00:00
Dean Camera 32ab52a298 Remove incorrect Language ID offset attribute from the SDP server - client assumes 0x0100 offset for primary language anyway, and the format of the offset was incorrect anyway. 2010-06-01 13:11:55 +00:00
Dean Camera 255d4ef858 Service Attribute SDP requests should have only one Data Element Sequence container around the single service's retrieved attributes, not two. 2010-06-01 12:34:48 +00:00
Dean Camera 0902ff9651 Document inline SDP data read/write functions. 2010-06-01 11:38:07 +00:00
Dean Camera 3f3fdb01a9 Much faster attribute range lookup - look through short list of attributes and compare to range, rather than looking up by each possible value within the range.
Cleanups to SDP code. Add missing RFCOMM language base ID offset attribute. Fix incorrect definition of the SWAPENDIAN_32() macro.
2010-06-01 11:07:29 +00:00
Dean Camera cb52e4371e Fix the encoding of UUIDs in the SDP server so that they match the Bluetooth UUID format properly. 2010-06-01 04:22:20 +00:00
Dean Camera e0ef5741d4 Move SDP service tables out into a new set of files, to make the SDP service code cleaner. 2010-06-01 03:07:05 +00:00
Dean Camera 587f320333 Add Service Attribute request processing to the SDP server code. 2010-06-01 02:54:53 +00:00
Dean Camera e15838d4e2 Fix endianness issues in the Service Discovery Protocol service of the incomplete Bluetooth Host demo. Host can now correctly retrieve specific services, however Windows does not appear to be sending the appropriate generic browse class IDs needed to report the virtual serial service. 2010-05-31 14:08:15 +00:00
Dean Camera c1daecf18b Fixed incorrect signature for the ATMEGA32U2 in the DFU bootloader (thanks to Axel Rohde).
Partial fix to the Bluetooth SDP code - data should be encoded in big endian, not little endian.
2010-05-29 07:51:01 +00:00
Dean Camera 54e69dbee1 Switch to using the correct intptr_t type use where a pointer must be cast to an integer type. 2010-05-26 12:24:44 +00:00
Dean Camera 4a13a5484a Fixed RNDISEthernet demos crashing when calculating checksums for Ethernet/TCP packets of more than ~500 bytes due to an overflow in the checksum calculation loop (thanks to Kevin Malec).
Removed string Attributes from the Service Discovery Protocol code to minimise the potential points of failure while the base code is being debugged.
2010-05-25 06:14:37 +00:00
Dean Camera 8f3d4e69c3 Add UUID Class matching to the Service Discovery Protocol code - SDP is now correctly matched against the generic Service Discovery Class UUID. 2010-05-23 13:15:19 +00:00
Dean Camera 776485a6c5 Remove obsolete entry from the Doxygen configuration files. 2010-05-23 08:39:02 +00:00
Dean Camera 8cdb141eed SDP Service improvements; fixed UUID for SDP service, added Service Discovery Server UUID, better documentation. 2010-05-23 08:36:51 +00:00
Dean Camera a20a9086f7 Add comments and partial Doxygen documentation to the incomplete Bluetooth SDP handler code. 2010-05-21 09:38:44 +00:00
Dean Camera 58a0ee67a3 Oops - when adding a sequence header to the SDP response, the size value needs to be cleared, not the buffer pointer. 2010-05-21 08:01:41 +00:00
Dean Camera 92bebc457f Add incomplete code to properly handle attribute responses to Service Discovery Protocol requests. 2010-05-21 07:10:49 +00:00
Dean Camera 83b5c916c6 Service Discovery ServiceSearchAttribute requests require the response to be grouped by UUID, so the response can't be generated as the attributes are read in. Buffer both UUIDs and Attributes instead and generate the response afterwards. 2010-05-20 14:35:52 +00:00
Dean Camera 3e515cdfa8 Short UUIDs are measured in bytes, not bits -- update Service Discovery Protocol code so that it can now correctly match against UUIDs in the service table. 2010-05-20 13:06:04 +00:00
Dean Camera 141d94fa98 More SDP code improvements - responses to ServiceSearchAttribute service discovery requests should now be valid, even if they do not currently return the device's services and service attributes.
Added more documentation to the incomplete Bluetooth stack code.
2010-05-20 08:27:04 +00:00
Dean Camera a883cf65dc Renamed CDC device class demos' ManagementEndpoint descriptor to NotificationEndpoint to more accurately indicate its purpose. 2010-05-20 06:15:21 +00:00
Dean Camera 78600e2485 Switch over the BluetoothHost demo's Service Discovery code to pass around more generic GUID arrays. 2010-05-18 12:54:01 +00:00
Dean Camera f13bc35a19 Begin processing code for Service Discovery Protocol attributes. 2010-05-17 23:36:05 +00:00
Dean Camera ee5ea4ce2b Fix nasty bug in USBInterrupt.c which would cause a lockup if the control endpoint was not selected at the point the USB endpoint interrupt fires when INTERRUPT_CONTROL_ENDPOINT is defined. 2010-05-11 13:45:23 +00:00
Dean Camera 53ebb2f21a Refactor Service Discovery Protocol code in the incomplete Bluetooth Host demo, so that the UUID list is compiled via a seperate function to allow for its re-use between different SDP request types. 2010-05-10 13:56:16 +00:00
Dean Camera 05ac59d0ee Add new ReportType parameter to the HID class driver device callback and host report sending routines.
Renamed internal Host mode Class driver descriptor comparator callback routines so that they all start with a uniform DCOMP_{Class Abbreviation}_ prefix.
2010-05-09 06:01:01 +00:00
Dean Camera 071e02c6b6 Add svn:eol-style property to source files, so that the line endings are correctly converted to the target system's native end of line style. 2010-05-08 03:12:14 +00:00
Dean Camera e331b531c6 Change over instances of "make" in the makefiles to "$(MAKE)" to allow for the make tool to be overridden. 2010-05-07 07:11:25 +00:00
Dean Camera 27eb17cb93 Change over unix line-endings to dos line endings. 2010-05-07 06:40:47 +00:00
Dean Camera 9c8bd6ed9b Remove incorrect Abstract Call Management class specific descriptor from the CDC demos, bootloaders and projects. 2010-05-06 11:32:55 +00:00
Dean Camera 9cad677ebb The Audio_Device_IsSampleReceived() and Audio_Device_IsReadyForNextSample() functions are now inline, to reduce overhead. 2010-04-29 14:54:11 +00:00
Dean Camera 9e34144c9b Use puts_P() and printf_P() instead of the normal variants where possible in the Host mode Class Driver demos. 2010-04-28 14:33:10 +00:00
Dean Camera e977774d4e Relocate USBInterrupt.c/.h from the HighLevel USB driver directory to the LowLevel directory as it is hardware-dependent. 2010-04-28 08:15:16 +00:00
Dean Camera 59c4871f80 USB_Init() no longer calls sei() to enable global interrupts - this must now be done in the user application once all init code has run. 2010-04-28 07:48:26 +00:00
Dean Camera 5993e1efe7 Added ability to search by Channel PSM to the GetChannelData() function in the BluetoothHost demo.
Added new HCI states to properly initialize the bluetooth dongle and retrieve the local BDADDR.

Factored out Bluetooth state information into a new state structure for easy reference in the user application.

Added new StackInitialized() Bluetooth stack callback function.
2010-04-22 14:08:00 +00:00
Dean Camera 8252b4febd Fixed HID Device Class Driver not allocating a temporary buffer when the host requests a report via the control endpoint and the user has set the PrevReportINBuffer driver configuration element to NULL (thanks to Lars Noschinski).
Clean up incomplete BluetoothHost debugging commands to use GCC extension to avoid NULL parameters when no formatting is required.
2010-04-20 08:52:51 +00:00
Dean Camera d03d6513d0 Add start of a SDP service table, which will be linked to the Bluetooth SDP code. 2010-04-19 12:39:58 +00:00
Dean Camera d92e9133d3 Make bluetooth SDP code correctly unpack the search UUIDs and parameters.
Minor documentation improvements.
2010-04-19 10:53:14 +00:00
Dean Camera fc8e4837a9 Add const keyword to the demo function parameters where possible. 2010-04-18 12:10:30 +00:00
Dean Camera 55db57e1ed Add bluetooth channel connection callback to the incomplete BluetoothHost demo. 2010-04-18 04:47:52 +00:00
Dean Camera 1f682ca2de Minor documentation improvements. 2010-04-15 14:22:06 +00:00
Dean Camera 3eb81df998 Rename FunctionAttributes.h to Attributes.h, as some attributes are applicable to variables also. Add new ATTR_NOINIT attribute for global variables.
Add the beginnings of a SDP implentation to the incomplete BluetoothHost demo.

Add const attribute to the Mass Storage Host driver functions where it was applicable, but missing.
2010-04-15 11:04:24 +00:00
Dean Camera 7b79325aa0 Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code.
Added spacing between multiple paragraphs in Doxygen \note sections.

Removed call to the clock prescaler reset function in the Teensy bootloader to save space - the user application is accessed via a watchdog reset anyway, so the prescale reset would only affect the speed of the bootloader itself.
2010-04-13 23:29:11 +00:00
Dean Camera e55f338663 Document the Bluetooth ACL layer. Remove unneeded parameters from the signalling command processing routines.
Change over the code so that the bluetooth packet data is read in by the stack rather than the user application, to make it more unform for sending/receiving, and so the library can handle incomming fragmentation in the future.

Start Service Discovery Protocol decoding and processing.
2010-04-13 11:19:04 +00:00
Dean Camera 882ef0c983 Add some more documentation to the half-completed Bluetooth Host demo, fix the OpenChannel() command initialising the channel information structure to the wrong initial state once the CONNECTION REQUEST command has been sent to the remote device. 2010-04-12 14:26:56 +00:00
Dean Camera 8b0ec6c5ca Fix Bluetooth stack CONNECTION RESPONSE packets - for this command and this command only, the source/destination roles are switched. Reverse the Local/Remote channel ordering so that Windows mobile and other stacks which depend on valid channel values to connect. 2010-04-12 13:42:35 +00:00
Dean Camera 6cfa3b7db8 Add HCI debugging with verbosity control to the BluetoothHost demo.
Add Link Key Request event processing so that paired devices always re-authenticate until appropriate link key store/retrieve callbacks are implemented.
2010-04-11 06:19:58 +00:00
Dean Camera 26421b38cd Fix up Bluetooth Demo's options processing on incoming channel configuration requests. 2010-04-11 02:45:42 +00:00
Dean Camera 28f1ac8117 Add LUFA-side channel open/close routines, add signalling handlers for the creation and configuration of channels from the local device to the remote device, to add to the existing remote to local channel capabilities. 2010-04-10 07:33:19 +00:00
Dean Camera 797130bddc Bluetooth demo can now create and maintain logical channels - need to determine why Windows machines refuse to connect. 2010-04-10 05:58:37 +00:00
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