bool FtdiDevices::setChars() { FT_STATUS ftStatus; ftStatus = FT_SetChars(m_ftHandleA, 0, false ? (UCHAR)1 : (UCHAR)0, 0, false ? (UCHAR)1 : (UCHAR)0); if (!FT_SUCCESS(ftStatus)) { return false; } return true; }
int CKMotionIO::SetLatency(UCHAR LatencyTimer) { FT_STATUS ftStatus; unsigned char c; Mutex->Lock(); ftStatus = FT_GetLatencyTimer (ftHandle, &c); ftStatus = FT_SetLatencyTimer(ftHandle,LatencyTimer); if (ftStatus == FT_OK) { ftStatus = FT_GetLatencyTimer (ftHandle, &c); // LatencyTimer set ftStatus = FT_SetChars (ftHandle, '\n', 1, 0,0); if (ftStatus == FT_OK) { // Event set Mutex->Unlock(); return 0; } else { // FT_SetLatencyTimer FAILED! ErrorMessageBox("Unable to set USB Event Character"); Mutex->Unlock(); return 1; } } else { // FT_SetLatencyTimer FAILED! ErrorMessageBox("Unable to set USB Latency timer"); Mutex->Unlock(); return 1; } }