From 85d698684d2e440c7531b8418802b27bef683f4a Mon Sep 17 00:00:00 2001 From: makestuff Date: Fri, 8 Nov 2013 13:49:46 +0000 Subject: [PATCH] Removed last vestiges of CSVF_BUF_SIZE --- private.h | 3 +-- vendorCommands.h | 3 --- xsvf2csvf/main.c | 8 ++++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/private.h b/private.h index 8913ab3..30af125 100644 --- a/private.h +++ b/private.h @@ -78,8 +78,7 @@ extern "C" { * @param xsvfFile The XSVF filename. * @param csvfBuf A pointer to a \c Buffer to be populated with the CSVF data. * @param maxBufSize A pointer to a \c uint32 which will be set on exit to the number of bytes - * necessary for buffering in the playback logic. If this is greater than the - * \c CSVF_BUF_SIZE defined for the firmware, bad things will happen. + * necessary for buffering in the playback logic. * @param error A pointer to a char* which will be set on exit to an allocated * error message if something goes wrong. Responsibility for this allocated memory * passes to the caller and must be freed with \c flFreeError(). If \c error is diff --git a/vendorCommands.h b/vendorCommands.h index a5d2765..818ea62 100644 --- a/vendorCommands.h +++ b/vendorCommands.h @@ -17,9 +17,6 @@ #ifndef VENDORCOMMANDS_H #define VENDORCOMMANDS_H -// The buffer available on the FX2LP firmware side -#define CSVF_BUF_SIZE 128 - // Vendor commands #define CMD_MODE_STATUS 0x80 #define CMD_JTAG_CLOCK_DATA 0x81 diff --git a/xsvf2csvf/main.c b/xsvf2csvf/main.c index a793444..9929292 100644 --- a/xsvf2csvf/main.c +++ b/xsvf2csvf/main.c @@ -28,7 +28,7 @@ int main(int argc, const char *argv[]) { BufferStatus bStatus; FLStatus fStatus; const char *error = NULL; - uint32 csvfBufSize = 0; + uint32 playbackBufSize = 0; const char *srcFile, *dstFile; const char *ext; if ( argc != 3 ) { @@ -41,15 +41,15 @@ int main(int argc, const char *argv[]) { bStatus = bufInitialise(&csvfBuf, 10240, 0x00, &error); CHECK_STATUS(bStatus, 2, cleanup); if ( strcmp(".svf", ext+1) == 0 ) { - fStatus = flLoadSvfAndConvertToCsvf(srcFile, &csvfBuf, &csvfBufSize, &error); + fStatus = flLoadSvfAndConvertToCsvf(srcFile, &csvfBuf, &playbackBufSize, &error); } else if ( strcmp(".xsvf", ext) == 0 ) { - fStatus = flLoadXsvfAndConvertToCsvf(srcFile, &csvfBuf, &csvfBufSize, &error); + fStatus = flLoadXsvfAndConvertToCsvf(srcFile, &csvfBuf, &playbackBufSize, &error); } else { fprintf(stderr, "Source filename should have an .svf or an .xsvf extension\n"); FAIL(3, cleanup); } CHECK_STATUS(fStatus, 4, cleanup); - //printf("CSVF_BUF_SIZE = %d\n", csvfBufSize); + //printf("Playback buffer size = %d\n", playbackBufSize); bStatus = bufWriteBinaryFile(&csvfBuf, dstFile, 0, csvfBuf.length, &error); CHECK_STATUS(bStatus, 6, cleanup);