import java.lang.*;
import java.io.*;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.LinkedList;
-import java.util.Iterator;
-import altosui.AltosSerial;
-import altosui.AltosRomconfig;
+import java.util.concurrent.*;
+import java.util.*;
+
+import libaltosJNI.*;
public class AltosDebug extends AltosSerial {
void ensure_debug_mode() {
if (!debug_mode) {
- printf("m 0\nD\n");
- flush_reply();
+ printf("D\n");
+ flush_input();
debug_mode = true;
}
}
throws IOException, InterruptedException {
byte[] data = new byte[length];
- flush_reply();
+ flush_input();
ensure_debug_mode();
printf("I %x %x\n", length, address);
int i = 0;
public byte[] read_bytes(int length)
throws IOException, InterruptedException {
- flush_reply();
+ flush_input();
ensure_debug_mode();
printf("G %x\n", length);
int i = 0;
public void reset() {
printf ("R\n");
}
+
+ public AltosDebug (AltosDevice in_device) throws FileNotFoundException, AltosSerialInUseException {
+ super(in_device);
+ }
}
\ No newline at end of file