From b67a1bff52dc5176a360988c38c9fd31e5a27407 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Mon, 13 May 2024 11:32:53 -0300 Subject: [PATCH] JTAG: Add JTAG.h header to follow best practices --- examples/JTAGTest/JTAGTest.ino | 24 ++++++++++++------------ library.properties | 2 +- src/JTAG.h | 7 +++++++ 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 src/JTAG.h diff --git a/examples/JTAGTest/JTAGTest.ino b/examples/JTAGTest/JTAGTest.ino index f28aa5e..9e2787d 100644 --- a/examples/JTAGTest/JTAGTest.ino +++ b/examples/JTAGTest/JTAGTest.ino @@ -1,36 +1,36 @@ - -#include -//#include +#include // // 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(); } diff --git a/library.properties b/library.properties index 4cd3802..d2d396a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=JTAG -version=1.0.16 +version=1.0.17 author=Marcelo Jimenez maintainer=Marcelo Jimenez sentence=A library to perform JTAG operations and play XSVF. diff --git a/src/JTAG.h b/src/JTAG.h new file mode 100644 index 0000000..a6114a6 --- /dev/null +++ b/src/JTAG.h @@ -0,0 +1,7 @@ +#ifndef JTAG_H +#define JTAG_H + +#include +// #include + +#endif /* JTAG_H */