9,6 → 9,7 |
// History: |
// |
// 1.00 2014_01 Start |
// 1.01 2014_03 Wait at the end of the program |
// |
// |
// Purpose: |
32,7 → 33,7 |
// |
|
#define YEAR "2014" |
#define VERSION "1.00" |
#define VERSION "1.01" |
|
|
// Library Definitions |
39,6 → 40,7 |
// ------------------- |
|
#include <stdio.h> // Standard IO (printf, ...) |
#include <conio.h> // Windows _getch |
#include <windows.h> // Windows Console Application |
#include "lib_win32\ftd2xx.h" // FTDI Library |
|
46,6 → 48,14 |
#pragma comment (lib, "lib_win32/ftd2xx.lib") // Add this file to Resources |
|
|
void waitforkey() |
{ |
printf("\nPress any Key ...\n"); |
_getch(); |
printf("\n"); |
} |
|
|
// Main |
// ---- |
|
75,13 → 85,16 |
// Create Device Information List |
DWORD numDevs = 0; |
ftStatus = FT_CreateDeviceInfoList(&numDevs); |
if (ftStatus == FT_OK) |
if (ftStatus == FT_OK && numDevs>0) |
printf(" Devices Found %d\n", numDevs); |
else |
printf(" No FTDI Device Found\n"); |
|
if (numDevs==0) |
{ |
waitforkey(); |
return -1; |
} |
|
// List All FTDI Devices |
FT_HANDLE ftHandleTemp; |
124,8 → 137,9 |
FT_Close(ftHandle); |
} |
} |
printf("\n\n"); |
printf("\n"); |
} |
} |
waitforkey(); |
return 0; |
} |