Exemplo n.º 1
0
static void
eep_reset (void)
{
  ttt_rom_enable ();
  ttt_write_mem (0x000000, 0xff);               // reset EEP
  ttt_write_mem (0x200000, 0xff);               // reset EEP
  ttt_rom_disable ();
}
Exemplo n.º 2
0
void
eep_reset (void)
{
  ttt_rom_enable ();
  ttt_write_mem (0x400000, 0xff);               // reset EEP chip 2
  ttt_write_mem (0, 0xff);                      // reset EEP chip 1
  ttt_write_mem (0x600000, 0xff);               // reset EEP chip 2
  ttt_write_mem (0x200000, 0xff);               // reset EEP chip 1
  ttt_rom_disable ();
}
Exemplo n.º 3
0
void
ttt_write_byte_ram (int addr, unsigned char b)  // original name: writeRAMDataB
{
  ttt_ram_enable ();
  ttt_write_mem (addr, b);
  ttt_ram_disable ();
}
Exemplo n.º 4
0
void
ttt_write_page_rom (int addr, unsigned char *buf) // original name: writeEEPDataPAGE
{
  int i;

  // send command 0xe8
  ttt_rom_enable ();
  ttt_write_mem (addr, 0xe8);

  // read status
  set_ai (3);
  set_data_read ();
  while (inportb (port_c) < 0x80)
    ;

  set_ai (3);
  outportb (port_c, 0x1f);
  ttt_set_ai_data (6, 0x94);
  set_addr_write (addr);
  for (i = 0; i <= 0x1f; i++)
    outportb (port_c, buf[(addr + i) & 0x3fff]);
  ttt_set_ai_data (6, 0x84);
  set_ai (3);
  outportb (port_c, 0xd0);

  // read status
  set_ai (3);
  set_data_read ();
  while (inportb (port_c) < 0x80)
    ;
  ttt_rom_disable ();
}
Exemplo n.º 5
0
void
ttt_write_byte_sharp (int addr, unsigned char b) // original name: writeEEPDataB
{
  ttt_rom_enable ();
  ttt_write_mem (addr, 0x40);
  outportb (port_c, b);
  ttt_rom_disable ();
}
Exemplo n.º 6
0
// Sharp function
void
ttt_erase_block (int addr)                      // original name: EraseBLOCK
{
  ttt_rom_enable ();
  ttt_write_mem (addr, 0x50);
  ttt_rom_disable ();

  ttt_rom_enable ();
  ttt_write_mem (addr, 0x20);
  outportb (port_c, 0xd0);
  ttt_rom_disable ();

  ttt_rom_enable ();
  set_ai (3);
  set_data_read ();                             // set read mode
  while (inportb (port_c) < 0x80)
    ;
  ttt_rom_disable ();
}
Exemplo n.º 7
0
void
ttt_write_byte_intel (int addr, unsigned char b) // original name: writeIntelEEPDataB
{                                               // MD-PRO function
  ttt_rom_enable ();
  ttt_write_mem (addr, 0x40);
  outportb (port_c, b);

  set_data_read ();
  while (inportb (port_c) < 0x80)
    ;
  ttt_rom_disable ();
}