- //d.buffered(false);
-
- d.doReset();
- d.config(0,3);
- d.con();
- d.config(0,7);
- d.flush();
- //d.flush();
- d.config(Integer.parseInt("10110111", 2), 8);
- d.config(0,1);
- d.flush();
- try { Thread.sleep(100); } catch (Exception e) { }
- pin = d.initErr();
- System.out.println("good preamble => " + pin + " " + (pin ? green("good") : red("BAD")));
-
- d.doReset();
- try { Thread.sleep(100); } catch (Exception e) { }
- d.config(0,3);
- d.con();
- d.config(0,6);
- d.flush();
- //d.flush();
- d.config(Integer.parseInt("10110111", 2), 8);
- d.config(0, 2);
- d.flush();
- try { Thread.sleep(100); } catch (Exception e) { }
- pin = d.initErr();
- System.out.println("bad preamble #2 => " + pin + " " + (pin ? red("BAD") : green("good")));
-
- d.doReset();
- try { Thread.sleep(100); } catch (Exception e) { }
- d.config(0,3);
- d.con();
- d.config(0,7);
- d.flush();
- //d.flush();
- d.config(Integer.parseInt("11110111", 2), 8);
- d.config(0, 1);
- d.flush();
- try { Thread.sleep(100); } catch (Exception e) { }
- pin = d.initErr();
- System.out.println("bad preamble #1 => " + pin + " " + (pin ? red("BAD") : green("good")));
-
- d.doReset();
-
- d.config(0,10);
- d.con();
- //d.config(Integer.parseInt("10110111", 2));
- //d.config(0);