Line 33... |
Line 33... |
33 |
// Includes |
33 |
// Includes |
34 |
// -------- |
34 |
// -------- |
35 |
#undef UNICODE |
35 |
#undef UNICODE |
36 |
#define WIN32_LEAN_AND_MEAN |
36 |
#define WIN32_LEAN_AND_MEAN |
37 |
|
37 |
|
38 |
#include <windows.h> // Windows Console Application |
- |
|
39 |
#include <stdlib.h> // Standard Library (exit, atoi, ...) |
38 |
#include <stdlib.h> // Standard Library (exit, atoi, ...) |
40 |
#include <stdio.h> // Standard IO (printf, ...) |
39 |
#include <stdio.h> // Standard IO (printf, ...) |
41 |
#include "mlab_xvcd.h" // Program Config (pin defs, settings, ...) |
40 |
#include "mlab_xvcd.h" // Program Config (pin defs, settings, ...) |
42 |
|
41 |
|
- |
|
42 |
#ifdef WIN32 |
- |
|
43 |
#include <windows.h> // Windows Console Application |
- |
|
44 |
#else |
- |
|
45 |
#include <string.h> |
- |
|
46 |
#endif |
- |
|
47 |
|
43 |
// Link with library |
48 |
// Link with library |
- |
|
49 |
#ifdef WIN32 |
44 |
#include "ftd2xx.h" // FTDI Library |
50 |
#include "lib_win32\ftd2xx.h" // FTDI Library |
- |
|
51 |
#else |
45 |
#pragma comment (lib, "ftd2xx.lib") // Tell MS compiller to link with this library |
52 |
#include "lib_linux_i386/ftd2xx.h" |
- |
|
53 |
#endif |
46 |
|
54 |
|
47 |
|
55 |
|
48 |
// Public Definitions |
56 |
// Public Definitions |
49 |
// ------------------ |
57 |
// ------------------ |
50 |
|
58 |
|
Line 74... |
Line 82... |
74 |
// Close FTDI connection |
82 |
// Close FTDI connection |
75 |
int jtagClosePort(); |
83 |
int jtagClosePort(); |
76 |
|
84 |
|
77 |
// Send data to JTAG port and bring returned data |
85 |
// Send data to JTAG port and bring returned data |
78 |
// Turn LED On during processing |
86 |
// Turn LED On during processing |
79 |
int jtagScan(const unsigned char *TMS, const unsigned char *TDI, unsigned char *TDO, int bits); |
87 |
int jtagScan(const unsigned char *TMS, const unsigned char *TDI, unsigned char *TDO, unsigned int bits); |
80 |
|
88 |
|
81 |
// Check if Cable is still connected and accesible |
89 |
// Check if Cable is still connected and accesible |
82 |
// True is o.k. |
90 |
// True is o.k. |
83 |
bool CheckCable(); |
91 |
bool CheckCable(); |
84 |
|
92 |
|