Skip to content

Instantly share code, notes, and snippets.

@Komarev
Created June 2, 2016 09:38
Show Gist options
  • Save Komarev/ac7040fb7fdeec84f11a1f29e3a59aae to your computer and use it in GitHub Desktop.
Save Komarev/ac7040fb7fdeec84f11a1f29e3a59aae to your computer and use it in GitHub Desktop.
public static final String FORMAT_PAGE_STRING = "%-4s";
public static final String ASCII = "US-ASCII";
public static final byte END = (byte) 0x23;
public static final int READ_TIMEOUT_MS = 1000;
public static final byte SECTOR_0 = (byte) 0x00;
public static final byte SECTOR_1 = (byte) 0x01;
public static final byte SECTOR_3 = (byte) 0x03;
public static final byte SECTOR_0_PAGE_COUNT = 64;
public static final byte SECTOR_1_PAGE_COUNT = 56;
public static final byte SECTOR_3_SESSION_REGISTER_PAGE_1_OFFSET = (byte) 0xF8; // page
public static final int NC_REG_BYTE_NUMBER = 0; // byte in page
public static final int MASK_PTHRU_DIR = 0x01; // bit mask
public static final int MASK_PTHRU_ON_OFF = 0x40;// bit mask
public static final int MASK_CONTROLLER_READY_TO_READ = MASK_PTHRU_DIR | MASK_PTHRU_ON_OFF;
public static final byte SECTOR_3_SESSION_REGISTER_PAGE_2_OFFSET = (byte) 0xF9; // page
public static final int NS_REG_BYTE_NUMBER = 2; // byte in page
public static final int MASK_SRAM_RF_READY = 0x08; // bit mask
public static final byte SRAM_FIRST_PAGE_OFFSET = (byte) 0xF0;
public static final byte SRAM_LAST_PAGE_OFFSET = (byte) 0xFF;
public static final byte JOURNAL_FIRST_PAGE_OFFSET = 8; // time
public static final byte COMMAND_READ_RECORD = (byte) 0x30;
public static final byte COMMAND_WRITE_RECORD = (byte) 0xA2;
public static final byte COMMAND_SELECT_SECTOR = (byte) 0xC2;
public static final int BYTES_PER_READ_ITERATION = 4;
public static final int RECORD_BYTE_SIZE = 16;
public static final int HEADER_BYTE_SIZE = 32;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment