USBLibAPIGuide  1.00.00.01
Data Fields
tUSBBuffer Struct Reference

#include <usblib.h>

Collaboration diagram for tUSBBuffer:
Collaboration graph
[legend]

Data Fields

bool bTransmitBuffer
 
tUSBCallback pfnCallback
 
void * pvCBData
 
tUSBPacketTransfer pfnTransfer
 
tUSBPacketAvailable pfnAvailable
 
void * pvHandle
 
uint8_t * pui8Buffer
 
uint32_t ui32BufferSize
 The size, in bytes, of the buffer pointed to by pi8Buffer. More...
 
tUSBBufferVars sPrivateData
 

Detailed Description

The structure used by the application to initialize a buffer object that will provide buffered access to either a transmit or receive channel.

Field Documentation

§ bTransmitBuffer

bool tUSBBuffer::bTransmitBuffer

This field sets the mode of the buffer. If true, the buffer operates as a transmit buffer and supports calls to USBBufferWrite by the client. If false, the buffer operates as a receive buffer and supports calls to USBBufferRead.

Referenced by USBBufferEventCallback(), and USBBufferWrite().

§ pfnCallback

tUSBCallback tUSBBuffer::pfnCallback

A pointer to the callback function which will be called to notify the application of all asynchronous events related to the operation of the buffer.

Referenced by USBBufferInit().

§ pvCBData

void* tUSBBuffer::pvCBData

A pointer that the buffer will pass back to the client in the first parameter of all callbacks related to this instance.

Referenced by USBBufferCallbackDataSet().

§ pfnTransfer

tUSBPacketTransfer tUSBBuffer::pfnTransfer

The function which should be called to transmit a packet of data in transmit mode or receive a packet in receive mode.

Referenced by USBBufferInit().

§ pfnAvailable

tUSBPacketAvailable tUSBBuffer::pfnAvailable

The function which should be called to determine if the endpoint is ready to accept a new packet for transmission in transmit mode or to determine the size of the buffer required to read a packet in receive mode.

Referenced by USBBufferInit().

§ pvHandle

void* tUSBBuffer::pvHandle

The handle to pass to the low level function pointers provided in the pfnTransfer and pfnAvailable members. For USB device use, this is the psDevice parameter required by the relevant device class driver APIs. For USB host use, this is the pipe identifier returned by USBHCDPipeAlloc.

§ pui8Buffer

uint8_t* tUSBBuffer::pui8Buffer

A pointer to memory to be used as the ring buffer for this instance.

Referenced by USBBufferInit().

§ ui32BufferSize

uint32_t tUSBBuffer::ui32BufferSize

The size, in bytes, of the buffer pointed to by pi8Buffer.

Referenced by USBBufferInit().

§ sPrivateData

tUSBBufferVars tUSBBuffer::sPrivateData

The private data for the USB buffer that is allocated by the application.

Referenced by USBBufferInfoGet(), and USBBufferInit().


The documentation for this struct was generated from the following file:
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale