FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - tklosa

Pages: [1]
1
Discussion - Drivers / D3xx - Determine Pipe direction from ID number
« on: December 04, 2020, 08:36:53 PM »
Hi all,

I observed that the ID numbering for IN pipes seen from the PC host side seem to start with 0x80.
(see attached screenshot)

Is it safe to use the highest ID bit as a direction flag?




2
Hi all,

I'd like to use the callback notification provided by the D3xx driver. According to the AN_379 programmers guide example starting at page 61, there is a definition:

Code: [Select]
USER_CONTEXT UserContext = {0};
on page 67. This seems to be a structure containing the ftHandle and other fields since later on the page there is:

Code: [Select]
UserContext.m_ftHandle = ftHandle;
ftStatus = FT_SetNotificationCallback(ftHandle, NotificationCallback, &UserContext);

Further down on page 68 a pointer type of it PUSER_CONTEXT is used to cast the void pointer from the callback function and access the fields:

Code: [Select]
PUSER_CONTEXT pUserContext = (PUSER_CONTEXT)pvCallbackContext;
ULONG ulBytesTransferred = 0;
DEBUG(_T("\n\tReading %d bytes!\n"), pInfo->ulRecvNotificationLength);
FT_STATUS ftStatus = FT_ReadPipe( pUserContext->m_ftHandle, pInfo->ucEndpointNo, &pUserContext->m_ucRecvBuffer[pUserContext->m_ulCurrentRecvData], pInfo->ulRecvNotificationLength, &ulBytesTransferred, NULL );

The field name m_ftHandle sugests that this context structure is an FTDI defined type but I can not find this definition eg. in  FTD3XX.h or so. Anybody here who has seen this type beeing defined somewhere?

Pages: [1]