Subversion Repositories pentevo

Rev

Rev 601 | 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. #define p_wind_t_dram_1 ((const P_WIND_DESC)&wind_t_dram_1)
  15. #define p_wind_t_dram_2 ((const P_WIND_DESC)&wind_t_dram_2)
  16.  
  17. //-----------------------------------------------------------------------------
  18.  
  19. void mtst_decword(u16 data)
  20. {
  21.  if ((data+1)==0)  scr_putchar('>');  else  scr_putchar(' ');
  22.  print_dec16(data);
  23. }
  24.  
  25. //-----------------------------------------------------------------------------
  26.  
  27. void Test_DRAM(u8 callflag)
  28. {
  29.  //u8 stored_flags1=flags1;
  30.  u16 mtst_pass, mtst_fail;
  31.  mtst_pass=fpga_reg(MTST_PASS_CNT0,0xff);
  32.  mtst_pass|=(fpga_reg(MTST_PASS_CNT1,0xff)<<8);
  33.  mtst_fail=fpga_reg(MTST_FAIL_CNT0,0xff);
  34.  mtst_fail|=(fpga_reg(MTST_FAIL_CNT1,0xff)<<8);
  35.  
  36.  if (mtst_fail)
  37.  {
  38.   scr_window(p_wind_t_dram_2);
  39.   scr_print_mlmsg(mlmsg_mtst);
  40.  }
  41.  else
  42.  {
  43.   if (callflag)
  44.    scr_set_attr(0x77);
  45.   else
  46.   {
  47.    scr_window(p_wind_t_dram_1);
  48.    scr_print_mlmsg(mlmsg_mtst);
  49.   }
  50.  }
  51.  
  52.  scr_set_cursor(43,20);
  53.  mtst_decword(mtst_pass);
  54.  scr_set_cursor(43,21);
  55.  mtst_decword(mtst_fail);
  56. }
  57.  
  58. //-----------------------------------------------------------------------------
  59.