1 package edu.berkeley.cs.obits.device.atmel;
3 import edu.berkeley.cs.obits.*;
5 public abstract class AtmelDevice extends Device {
7 /** issue a command to the device in Mode4 format; see Gosset's documentation for further details */
8 public void mode4(int z, int y, int x, int d) throws DeviceException;
10 public Sector sector(int col, int row) { return new Sector(col, row); }
11 public final class Sector {
14 public Sector(int col, int row) {
15 if (row % 4 != 0) throw new Error("Sector must be created with a multiple-of-4 row");
16 if (col % 4 != 0) throw new Error("Sector must be created with a multiple-of-4 col");
22 public Cell cell(int col, int row) { return new Cell(col, row); }
23 public final class Cell {
26 public Sector getSector() { return sector(col - (col % 4), row - (row % 4)); }
27 public Cell(int col, int row) {