Skip to content

Commit

Permalink
JTAG: Add JTAG.h header to follow best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjimenez committed May 13, 2024
1 parent d72df94 commit b67a1bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
24 changes: 12 additions & 12 deletions examples/JTAGTest/JTAGTest.ino
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@

#include <PlayXSVFJTAGArduino.h>
//#include <PlayXSVFJTAGAVR.h>
#include <JTAG.h>

//
// The maximum size of the arduino receive buffer is 63 bytes by default.
// This number can be changed if you change the compiler flags in the
// file hardware/arduino/avr/platform.local.txt (-O2 makes it faster):
//
// compiler.c.extra_flags=-DSERIAL_BUFFER_SIZE=256 -DSERIAL_RX_BUFFER_SIZE=256 -O2
// compiler.cpp.extra_flags=-DSERIAL_BUFFER_SIZE=256 -DSERIAL_RX_BUFFER_SIZE=256 -O2
// compiler.c.extra_flags=-DSERIAL_BUFFER_SIZE=256 -DSERIAL_RX_BUFFER_SIZE=256
// -O2 compiler.cpp.extra_flags=-DSERIAL_BUFFER_SIZE=256
// -DSERIAL_RX_BUFFER_SIZE=256 -O2
//

#ifndef SERIAL_RX_BUFFER_SIZE
#define SERIAL_RX_BUFFER_SIZE 64
#define SERIAL_RX_BUFFER_SIZE 64
#endif /* SERIAL_RX_BUFFER_SIZE */

void setup()
{
Serial.begin(115200);
//Serial.begin(230400);
// Serial.begin(230400);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
//printAvailableRAM(Serial);
// printAvailableRAM(Serial);
}

void loop()
{
//PlayXSVFJTAGArduino p(Serial, SERIAL_RX_BUFFER_SIZE, 2, 12, 5, 4, 0, true);
// PlayXSVFJTAGArduino p(Serial, SERIAL_RX_BUFFER_SIZE, 2, 12, 5, 4, 0,
// true);
PlayXSVFJTAGArduino p(Serial, SERIAL_RX_BUFFER_SIZE, 8, 9, 10, 11, 12);
//PlayXSVFJTAGAVR p(Serial, SERIAL_RX_BUFFER_SIZE);
//p.printAvailableRAM();
// Currently, the PlayXSVFJTAGArduino object consumes 1042 bytes of RAM
// PlayXSVFJTAGAVR p(Serial, SERIAL_RX_BUFFER_SIZE);
// p.printAvailableRAM();
// Currently, the PlayXSVFJTAGArduino object consumes 1042 bytes of RAM
p.play();
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=JTAG
version=1.0.16
version=1.0.17
author=Marcelo Jimenez <marcelo.jimenez@gmail.com>
maintainer=Marcelo Jimenez <marcelo.jimenez@gmail.com>
sentence=A library to perform JTAG operations and play XSVF.
Expand Down
7 changes: 7 additions & 0 deletions src/JTAG.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef JTAG_H
#define JTAG_H

#include <PlayXSVFJTAGArduino.h>
// #include <PlayXSVFJTAGAVR.h>

#endif /* JTAG_H */

0 comments on commit b67a1bf

Please sign in to comment.