     print_bytes(p, n);                                                \
     Serial.println();                                                 \
   }
+#else
+#define DEBUG(fmt, ...)  { }
+#define DEBUG_BYTES(s, p, n)  { }
 #endif
 
 void print_bytes(uint8_t* pb, uint8_t count) {
-  pb += count;
   while (count--) {
-    p("%02x", *--pb);
+    p("%02x", *pb++);
   }
 }
 

        bool tdo = twiddler_.pulse_clock_and_read_tdo();
        tdo_byte |= tdo << j;
      }
      tdo_[i] = tdo_byte;
    }
  }



  void set_state(int state) {
    if (current_state_ != state) {
      DEBUG_STATE(state);
    }
    current_state_ = state;
  }
