Data Fields
tUSBBuffer Struct Reference

#include <usblib.h>

Data Fields

uint32_t bTransmitBuffer
 
tUSBCallback pfnCallback
 
void * pvCBData
 
tUSBPacketTransfer pfnTransfer
 
tUSBPacketAvailable pfnAvailable
 
void * pvHandle
 
uint8_t * pcBuffer
 
uint32_t ulBufferSize
 The size, in bytes, of the buffer pointed to by pcBuffer.
 
void * pvWorkspace
 

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

uint32_t 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.

uint8_t* tUSBBuffer::pcBuffer

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

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.

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.

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.

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.

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.

void* tUSBBuffer::pvWorkspace

A pointer to USB_BUFFER_WORKSPACE_SIZE bytes of RAM that the buffer object can use for workspace.


The documentation for this struct was generated from the following file:

Copyright 2016, Texas Instruments Incorporated