aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/LowLevel/Pipe.c
AgeCommit message (Collapse)Author
2011-02-19Initial restructuring of the core USB driver module to support multiple ↵Dean
architectures in the future. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1672 d5102386-fcda-11dd-9fdb-3debd5008f28
2011-01-10Call USB_USBTask() in the Endpoint stream functions between packets if ↵Dean
INTERRUPT_CONTROL_ENDPOINT is not set. Remove calls to USB_USBTask in the Mass Storage class driver stream read/write continuation checks, since this is now done inside the stream function. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1629 d5102386-fcda-11dd-9fdb-3debd5008f28
2011-01-10Altered all endpoint/pipe stream transfers so that the new BytesProcessed ↵Dean
parameter now points to a location where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction should be performed in one chunk). Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions. Removed the NO_STREAM_CALLBACKS compile time option due to the new partial stream transfer feature replacing it. Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1628 d5102386-fcda-11dd-9fdb-3debd5008f28
2011-01-01Update copyright year on all source files.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1622 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-12-24Much more efficient algorithm for the Endpoint/Pipe configuration routine of ↵Dean
unordered endpoints/pipes - only reconfigure the endpoints and pipes above the newly configured endpoint/pipe, and don't cache existing endpoint/pipe configuration before use to save SRAM. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1611 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-12-24Re-add in old Endpoint/Pipe workaround for unordered pipes - add new ↵Dean
ORDERED_EP_CONFIG compile time option to override the workaround and use the previous behaviour that imposes correct Endpoint/Pipe ordering but produces smaller compiled code. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1608 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-10-28Changed over www.fourwalledcubicle.com links to the new www.lufa-lib.org ↵Dean
redirect domain, including the new aliased links for LUFA-related pages such as the various download/source control mirrors and support lists. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1541 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-10-13Clean up excessive whitespace at the end of each line using the wspurify ↵Dean
tool made by Laszlo Monda git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1524 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-09-30Reverted Endpoint/Pipe non-sequential configuration hack, placed restriction ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1502 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-09-07Must save and restore the endpoint/pipe interrupt enable flags during ↵Dean
reconfiguration of all endpoints/pipes in the Endpoint_ConfigureEndpoint() and Pipe_ConfigurePipe() routines. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1465 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-09-05Fix bug in Pipe_ConfigurePipe() breaking already configured pipes that was ↵Dean
accidentally clearing the pipe's IN mode. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1464 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-09-05Added new USB_Device_GetFrameNumber() and USB_Host_GetFrameNumber() ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1463 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-08-22Split out endpoint and pipe stream functions into new EndpointStream.c/.h ↵Dean
and PipeStream.c/.h files. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1449 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-08-20Fixed critical pipe/endpoint memory allocation issue where the bank memory ↵Dean
address space could be silently overlapped in the USB controller if the endpoints or pipes were allocated in anything other than ascending order (thanks to Martin Degelsegger). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1443 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-07-21Add missing const qualifiers to class drivers.Dean
Indent core library function parameters so that there is only one parameter per line, to increase readability. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1398 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-07-15Removed the automated checking of event names in the demo, project and ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1391 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-06-12Speed up calls to Pipe_IsPipeBound() by immediately skipping unconfigured ↵Dean
pipes, rather than performing token check first. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1328 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-05-26The EEPROM stream read/write functions now use eeprom_update_byte() instead ↵Dean
of eeprom_write_byte(), so that only changed bytes are written to EEPROM to preserve its lifespan. Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile parameters to EEPROM to preserve its lifespan. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1283 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-05-08Add svn:eol-style property to source files, so that the line endings are ↵Dean
correctly converted to the target system's native end of line style. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1248 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-03-17Software PDI mode breaks unless the software USART has 100 cycles between bits.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1168 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-02-24Revert changes made for the partial port to the AVR32 architecture.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1155 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-02-23Start porting the USB core to the AVR32 UC3B.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1152 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-02-11Add more include protection macros to give the user warnings when they try ↵Dean
to manually include private driver header files, instead of the public driver headers. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1123 d5102386-fcda-11dd-9fdb-3debd5008f28
2010-02-01Fixed Pipe_IsEndpointBound() function not taking the endpoint's direction ↵Dean
into account. Re-added Pipe_IsEndpointBound() calls to the CDC and RNDIS host class drivers, not that the function has the correct behaviour for devices with bidirectional endpoints. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1089 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-12-30Update copyright year to 2010.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1032 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-12-28Fix MIT license language to make its intent clearer.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1019 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-12-21Ensure that unsupported SetFeature/ClearFeature request targets cause a ↵Dean
STALL back to the host. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@997 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-12-17Un-inline the SendAddress function in NVMTarget.c/.h of the AVRISP project.Dean
Add new HotmailNotifier project, which changes a LED's colour based on the user's unread email count as sent from Windows Live Messenger. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@984 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-11-25Added new RNDISHost Host LowLevel demo. Fixed misnamed Pipe_SetPipeToken() ↵Dean
macro for setting a pipe's direction. Fixed CDCHost failing on devices with bidirectional endpoints. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@917 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-11-24Fixed broken USB_GetNextDescriptor() function causing the descriptor to jump ↵Dean
ahead double the expected amount. Fixed Pipe_IsEndpointBound() not masking the given Endpoint Address against PIPE_EPNUM_MASK. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@913 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-11-10Update CDC Class Driver character stream functions to use the correct ↵Dean
avr-libc return codes for errors and EOF. Fix pointer arithmetic on void byte buffers by explicitly typecasting the buffer pointers to uint8_t* before altering them. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@891 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-10-18Moved USBtoSerial demo the Projects directory, as it is simply an expanded ↵Dean
CDC demo. Added const qualifier to Endpoint/Pipe stream write routines. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@868 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-09-21Add const qualifiers to Host mode Class drivers.Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@833 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-09-20Added new Pipe_IsFrozen() macro to determine if the currently selected pipe ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@828 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-07-26Corrected new Pipe_IsEndpointBound() function.Dean
Completed host CDC class driver enumeration code. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@685 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-07-26Added new Pipe_BoundEndpointNumber() and Pipe_IsEndpointBound() functions.Dean
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@684 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-07-21Added new USB_DeviceState variable to keep track of the current Device mode ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@676 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-07-20Fixed PrinterHost demo Printer_GetDeviceID() routine not removing the Device ↵Dean
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). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@663 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-07-13Added new EEPROM and FLASH buffer versions of the Endpoint and Pipe stream ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@644 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-28Added const modifiers to device mode class drivers.Dean
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). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@636 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-23Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset ↵Dean
is issued while not processing a command. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@629 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-23Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting ↵Dean
infinite IN requests, this can still be changed by calling the existing \ref Pipe_SetFiniteINRequests() function. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@628 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-23Fixed CDCHost demo unfreezing IN pipes during configuration, rather than ↵Dean
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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@627 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-18Added new USB_Host_ClearPipeStall() convenience function to clear a stall ↵Dean
condition on an attached device's endpoint. Added new USB_Host_GetDeviceDescriptor() convenience function to retrieve the attached device's Device descriptor. Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is cleared to prevent endpoint type corruption. Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken(). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@608 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-08Converted Host mode demos to schedulerless. Fixed host mode broken due to ↵Dean
earlier Start-of-frame event experiments. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@580 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-06-01Commit of new class abstraction APIs for all device demos other than the ↵Dean
MIDI demo - not documented yet. Removed scheduler and memory allocation libraries. Added new EVENT_USB_StartOfFrame event in the library to indicate the start of each USB frame (when generated). Removed Tx interrupt from the USBtoSerial demo; now sends characters via polling to ensure more time for the Rx interrupt. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@562 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-05-15Create a new function pointer type in StreamCallbacks.h for endpoint/pipe ↵Dean
stream callbacks, to make stream function prototypes clearer. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@552 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-05-03More minor renaming of library enums and events to try to create a ↵Dean
consistent API. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@530 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-04-26Move the length decrements in the pipe and endpoint stream functions to the ↵Dean
point at which the buffers are operated on, to prevent decrements during iterations where no data is exchanged (thanks to Francisco Moraes). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@525 d5102386-fcda-11dd-9fdb-3debd5008f28
2009-04-22USB_HostRequest renamed to USB_ControlRequest, entire control request header ↵Dean
is now read into USB_ControlRequest in Device mode rather than having the library pass only partially read header data to the application. The USB_UnhandledControlPacket event has had its parameters removed, in favour of accessing the new USB_ControlRequest structure. The Endpoint control stream functions now correctly send a ZLP to the host when less data than requested is sent. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@520 d5102386-fcda-11dd-9fdb-3debd5008f28