Skip to content

Commit

Permalink
Removed last vestiges of CSVF_BUF_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
makestuff committed Nov 8, 2013
1 parent f7ae4f9 commit 85d6986
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions private.h
Expand Up @@ -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 <code>char*</code> 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
Expand Down
3 changes: 0 additions & 3 deletions vendorCommands.h
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions xsvf2csvf/main.c
Expand Up @@ -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 ) {
Expand All @@ -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);

Expand Down

0 comments on commit 85d6986

Please sign in to comment.