From: Pat Thoyts Date: Thu, 5 Nov 2009 13:52:03 +0000 (+0000) Subject: Fixed the naming and initialization of the bit bang mode api. X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=1ec03f19d2354ef66ac0a4fec861a3f2b113e1d8;p=tclftd2xx Fixed the naming and initialization of the bit bang mode api. Signed-off-by: Pat Thoyts --- diff --git a/tclftd2xx.c b/tclftd2xx.c index 2f6333c..8e244e7 100644 --- a/tclftd2xx.c +++ b/tclftd2xx.c @@ -20,7 +20,7 @@ typedef FT_STATUS (WINAPI FT_CreateDeviceInfoListProc)(LPDWORD); typedef FT_STATUS (WINAPI FT_GetDeviceInfoListProc) (FT_DEVICE_LIST_INFO_NODE*,LPDWORD); typedef FT_STATUS (WINAPI FT_GetLatencyTimerProc)(FT_HANDLE,PUCHAR); -typedef FT_STATUS (WINAPI FT_GetBitmodeProc)(FT_HANDLE,PUCHAR); +typedef FT_STATUS (WINAPI FT_GetBitModeProc)(FT_HANDLE,PUCHAR); typedef FT_STATUS (WINAPI FT_GetStatusProc)(FT_HANDLE,LPDWORD,LPDWORD,LPDWORD); typedef FT_STATUS (WINAPI FT_OpenExProc)(PVOID,DWORD,FT_HANDLE*); typedef FT_STATUS (WINAPI FT_PurgeProc)(FT_HANDLE,ULONG); @@ -28,7 +28,7 @@ typedef FT_STATUS (WINAPI FT_ReadProc)(FT_HANDLE,LPVOID,DWORD,LPDWORD); typedef FT_STATUS (WINAPI FT_ResetPortProc)(FT_HANDLE); typedef FT_STATUS (WINAPI FT_SetEventNotificationProc)(FT_HANDLE,DWORD,PVOID); typedef FT_STATUS (WINAPI FT_SetLatencyTimerProc)(FT_HANDLE,UCHAR); -typedef FT_STATUS (WINAPI FT_SetBitmodeProc)(FT_HANDLE,UCHAR,UCHAR); +typedef FT_STATUS (WINAPI FT_SetBitModeProc)(FT_HANDLE,UCHAR,UCHAR); typedef FT_STATUS (WINAPI FT_SetTimeoutsProc)(FT_HANDLE,ULONG,ULONG); typedef FT_STATUS (WINAPI FT_WriteProc)(FT_HANDLE,LPVOID,DWORD,LPDWORD); typedef FT_STATUS (WINAPI FT_GetLibraryVersionProc)(LPDWORD); @@ -39,7 +39,7 @@ typedef struct FTDIPROCS { FT_CreateDeviceInfoListProc *FT_CreateDeviceInfoList; FT_GetDeviceInfoListProc *FT_GetDeviceInfoList; FT_GetLatencyTimerProc *FT_GetLatencyTimer; - FT_GetBitmodeProc *FT_GetBitmode; + FT_GetBitModeProc *FT_GetBitMode; FT_GetStatusProc *FT_GetStatus; FT_OpenExProc *FT_OpenEx; FT_PurgeProc *FT_Purge; @@ -47,7 +47,7 @@ typedef struct FTDIPROCS { FT_ResetPortProc *FT_ResetPort; FT_SetEventNotificationProc *FT_SetEventNotification; FT_SetLatencyTimerProc *FT_SetLatencyTimer; - FT_SetBitmodeProc *FT_SetBitmode; + FT_SetBitModeProc *FT_SetBitMode; FT_SetTimeoutsProc *FT_SetTimeouts; FT_WriteProc *FT_Write; FT_GetLibraryVersionProc *FT_GetLibraryVersion; @@ -284,7 +284,7 @@ ChannelSetOption(ClientData instance, Tcl_Interp *interp, 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)); + fts = procs.FT_SetBitMode(instPtr->handle, (UCHAR)(tmp >> 8), (UCHAR)(tmp & 0xff)); } } @@ -351,7 +351,7 @@ ChannelGetOption(ClientData instance, Tcl_Interp *interp, } } else if (!strcmp("-bitmode", optionName)) { UCHAR bmode = 0; - fts = procs.FT_GetBitmode(instPtr->handle, &bmode); + fts = procs.FT_GetBitMode(instPtr->handle, &bmode); if (fts == FT_OK) { Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE); sprintf(Tcl_DStringValue(&ds), "%d", bmode); @@ -924,6 +924,7 @@ Ftd2xx_Init(Tcl_Interp *interp) || LOADPROC(FT_CreateDeviceInfoList) || LOADPROC(FT_GetDeviceInfoList) || LOADPROC(FT_GetLatencyTimer) + || LOADPROC(FT_GetBitMode) || LOADPROC(FT_GetStatus) || LOADPROC(FT_OpenEx) || LOADPROC(FT_Purge) @@ -931,6 +932,7 @@ Ftd2xx_Init(Tcl_Interp *interp) || LOADPROC(FT_ResetPort) || LOADPROC(FT_SetEventNotification) || LOADPROC(FT_SetLatencyTimer) + || LOADPROC(FT_SetBitMode) || LOADPROC(FT_SetTimeouts) || LOADPROC(FT_Write) || LOADPROC(FT_GetLibraryVersion)