Subversion Repositories zxusbnet

Rev

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

  1.  
  2. // Standard Input/Output functions
  3. #include <stdio.h>
  4. #include <intrz80.h>
  5. #include <string.h>
  6. #include "zxevo_io.h"
  7. #include "w5300.h"
  8.  
  9.  
  10. void DelayMs(unsigned char nFactor)  
  11. {    
  12.    
  13.     while(nFactor--)  
  14.     {  
  15.         unsigned int j=0x012c;  
  16.         while(j--);  
  17.     }
  18. }  
  19.  
  20.  
  21. void mcu_soft_reset(void)
  22. {
  23.         while(1);
  24. }
  25.  
  26. unsigned char get_evo_rtc(unsigned char addr)
  27. {
  28.         output(0xdef7,addr);
  29.         return input(0xbef7);
  30. }      
  31. void wiz_reset(void)
  32. {
  33.         output(0x83ab,0);
  34.         DelayMs(100);
  35.         output(0x83ab,0x10);
  36.         DelayMs(500);
  37.        
  38.         output(0x82ab,0x4c);
  39.        
  40.         *WMR=0x80;
  41.         DelayMs(500);
  42.         *(WMR+1)=0x38;
  43. }
  44.    
  45.