Function Prototypes:ttDevScatRecvFunc

Jump to: navigation, search

Table of Contents >> Integrating Treck >> Adding a Device Driver


int ttDevScatRecvFunc (
ttUserInterface interfaceHandle,
ttDruBlockPtrPtr uDevBlockPtrPtr,
int * uDevBlockCountPtr,
int * flagPtr
);



Function Description

Upon return from the device driver scattered recv function *uDevBlockPtrPtr points to an array of user block data of type ttDruBlock. *uDevBlockPtrPtr points to an array of ttDruBlock structures. There is one ttDruBlock per scattered buffer in the received frame. Each ttDruBlock element contains a pointer to a user buffer, a pointer to the beginning of the user data in the user buffer, and the user data length in the user buffer. *uDevBlockCountPtr contains the number of such elements. *flagPtr indicates whether the stack owns the buffers (TM_DEV_SCAT_RECV_STACK_BUFFER), or whether the device driver owns the buffers TM_DEV_SCAT_RECV_USER_BUFFER).


Parameters

  • interfaceHandle
    The interface handle of the device to recv data from as returned by tfAddInterface
  • uDevBlockPtr
    Address of an area where to store an array of user blocks describing the scattered data (one block per scattered buffer).
  • uDevBlockCountPtr
    Address of an area where to store the number of scattered buffers within a frame.
  • flagPtr
    Address of an area where to store ownership of the scattered buffers that compose the received frame.


Returns

  • int
    Valid values are TM_DEV_OKAY to indicate success and TM_DEV_ERROR to indicate failure.



Table of Contents >> Integrating Treck >> Adding a Device Driver