Subversion Repositories pentevo

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #include "_global.h"
  2. #include "_screen.h"
  3.  
  4. //3         4         5
  5. //01234567890123456789012
  6. //┌──── Тест DRAM ────┐  18
  7. //│ Проведено циклов  │  19
  8. //│ без ошибок   1234 │  20
  9. //│ с ошибками      0 │  21
  10. //└───────────────────┘  22
  11.  
  12. const WIND_DESC wind_t_dram_1 PROGMEM = { 30,18,21,5,0x77,0x00 };
  13. const WIND_DESC wind_t_dram_2 PROGMEM = { 30,18,21,5,0xae,0x00 };
  14.  
  15. //-----------------------------------------------------------------------------
  16.  
  17. void mtst_decword(u16 data)
  18. {
  19.  if ((data+1)==0)  scr_putchar('>');  else  scr_putchar(' ');
  20.  print_dec16(data);
  21. }
  22.  
  23. //-----------------------------------------------------------------------------
  24.  
  25. void Test_DRAM(u8 callflag)
  26. {
  27.  u8 stored_flags1;
  28.  stored_flags1=flags1;
  29.  u16 mtst_pass, mtst_fail;
  30.  mtst_pass=fpga_reg(MTST_PASS_CNT0,0xff);
  31.  mtst_pass|=(fpga_reg(MTST_PASS_CNT1,0xff)<<8);
  32.  mtst_fail=fpga_reg(MTST_FAIL_CNT0,0xff);
  33.  mtst_fail|=(fpga_reg(MTST_FAIL_CNT1,0xff)<<8);
  34.  
  35.  if (mtst_fail)
  36.  {
  37.   scr_window(&wind_t_dram_2);
  38.   scr_print_mlmsg(mlmsg_mtst);
  39.  }
  40.  else
  41.  {
  42.   if (callflag)
  43.    scr_set_attr(0x77);
  44.   else
  45.   {
  46.    scr_window(&wind_t_dram_1);
  47.    scr_print_mlmsg(mlmsg_mtst);
  48.   }
  49.  }
  50.  
  51.  scr_set_cursor(43,20);
  52.  mtst_decword(mtst_pass);
  53.  scr_set_cursor(43,21);
  54.  mtst_decword(mtst_fail);
  55. }
  56.  
  57. //-----------------------------------------------------------------------------
  58.