#PROJECT_REQUIRES_TK=1
!include "rules.vc"
-DOTVERSION = 1.0.1
+DOTVERSION = 1.0.2
VERSION = $(DOTVERSION:.=)
STUBPREFIX = $(PROJECT)stub
!endif
# We need the location of the FTDI header and library files.
-FTDI_INCLUDES =-ID2XX\WHQL
+!ifndef FTDI_DIR
+FTDI_DIR =D2XX\WHQL
+!endif
+
+FTDI_INCLUDES =-I$(FTDI_DIR)
!if "$(MACHINE)" == "AMD64"
-FTDI_LIBS =-libpath:D2XX\WHQL\amd64
+FTDI_LIBS =-libpath:$(FTDI_DIR)\amd64
!else
-FTDI_LIBS =-libpath:D2XX\WHQL\i386
+FTDI_LIBS =-libpath:$(FTDI_DIR)\i386
!endif
#-------------------------------------------------------------------------
if (r == TCL_OK) {
fts = procs.FT_SetLatencyTimer(instPtr->handle, (UCHAR)tmp);
}
- } else if (!strcmp("-mode", optionName)) {
+ } else if (!strcmp("-bitmode", optionName)) {
+ int tmp = 1;
r = Tcl_GetInt(interp, newValue, &tmp);
if (r == TCL_OK) {
fts = procs.FT_SetBitmode(instPtr->handle, (UCHAR)(tmp >> 8), (UCHAR)(tmp & 0xff));
}
- }
+ }
if (fts != FT_OK) {
Tcl_AppendResult(interp, "error setting ", optionName,
const char *optionName, Tcl_DString *optionValue)
{
Channel *instPtr = instance;
- const char *options[] = {"readtimeout", "writetimeout", "latency", NULL};
+ const char *options[] = {"readtimeout", "writetimeout", "latency", "bitmode", NULL};
int r = TCL_OK;
if (optionName == NULL) {
ConvertError(fts), NULL);
r = TCL_ERROR;
}
- } else if (!strcmp("-mode", optionName)) {
+ } else if (!strcmp("-bitmode", optionName)) {
UCHAR bmode = 0;
- Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE);
fts = procs.FT_GetBitmode(instPtr->handle, &bmode);
if (fts == FT_OK) {
+ Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE);
sprintf(Tcl_DStringValue(&ds), "%d", bmode);
} else {
Tcl_AppendResult(interp, "failed to read ", optionName, ": ",