-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JTAG: Add JTAG.h header to follow best practices
- Loading branch information
Showing
3 changed files
with
20 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |