Pipe Data Reading and Writing
[Pipe Management]

Modules

 Read/Write of Primitive Data Types
 Read/Write of Multi-Byte Streams

Enumerations

enum  Pipe_WaitUntilReady_ErrorCodes_t {
  PIPE_READYWAIT_NoError = 0,
  PIPE_READYWAIT_PipeStalled = 1,
  PIPE_READYWAIT_DeviceDisconnected = 2,
  PIPE_READYWAIT_Timeout = 3
}
enum  Pipe_Stream_RW_ErrorCodes_t {
  PIPE_RWSTREAM_NoError = 0,
  PIPE_RWSTREAM_PipeStalled = 1,
  PIPE_RWSTREAM_DeviceDisconnected = 2,
  PIPE_RWSTREAM_Timeout = 3,
  PIPE_RWSTREAM_CallbackAborted = 4
}

Functions

static uint16_t Pipe_BytesInPipe (void)
uint8_t Pipe_WaitUntilReady (void)

Detailed Description

Functions, macros, variables, enums and types related to data reading and writing from and to pipes.


Enumeration Type Documentation

Enum for the possible error return codes of the Pipe_*_Stream_* functions.

Enumerator:
PIPE_RWSTREAM_NoError 

Command completed successfully, no error.

PIPE_RWSTREAM_PipeStalled 

The device stalled the pipe during the transfer.

PIPE_RWSTREAM_DeviceDisconnected 

Device was disconnected from the host during the transfer.

PIPE_RWSTREAM_Timeout 

The device failed to accept or send the next packet within the software timeout period set by the USB_STREAM_TIMEOUT_MS macro.

PIPE_RWSTREAM_CallbackAborted 

Indicates that the stream's callback function aborted the transfer early.

Enum for the possible error return codes of the Pipe_WaitUntilReady function

Enumerator:
PIPE_READYWAIT_NoError 

Pipe ready for next packet, no error

PIPE_READYWAIT_PipeStalled 

The device stalled the pipe while waiting.

PIPE_READYWAIT_DeviceDisconnected 

Device was disconnected from the host while waiting.

PIPE_READYWAIT_Timeout 

The device failed to accept or send the next packet within the software timeout period set by the USB_STREAM_TIMEOUT_MS macro.


Function Documentation

static uint16_t Pipe_BytesInPipe ( void   )  [inline, static]

Indicates the number of bytes currently stored in the current pipes's selected bank.

Note:
The return width of this function may differ, depending on the maximum pipe bank size of the selected AVR model.
Returns:
Total number of bytes in the currently selected Pipe's FIFO buffer
uint8_t Pipe_WaitUntilReady ( void   ) 

Spinloops until the currently selected non-control pipe is ready for the next packed of data to be read or written to it, aborting in the case of an error condition (such as a timeout or device disconnect).

Returns:
A value from the Pipe_WaitUntilReady_ErrorCodes_t enum.

Generated on Thu Sep 24 22:58:14 2009 for LUFA (Formerly MyUSB) Library by  doxygen 1.6.1