⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system.i

📁 cs8900 c51应用
💻 I
字号:
#line 1 "..\system.c" /0     #error *** WARNING C318 IN LINE 69 OF ..\system.c: can't open file 'inet/arch/config.h' #error *** WARNING C318 IN LINE 70 OF ..\system.c: can't open file 'inet/datatypes.h' #error *** WARNING C318 IN LINE 71 OF ..\system.c: can't open file 'inet/system.h' #error *** WARNING C318 IN LINE 72 OF ..\system.c: can't open file 'inet/debug.h' #error *** WARNING C318 IN LINE 73 OF ..\system.c: can't open file 'inet/arch/at89s8252/serial-io.h' UINT32 base_timer;		   UINT8 sleep_mode = 0;	    UINT8 net_buf[NETWORK_TX_BUFFER_SIZE];	      INT16 strlen (UINT8* buf, UINT16 len) { UINT16 i;  for(i=0; i<len; i++) { if(*buf == '\0') return( i );  buf++; }    return(-1);   }     INT16 bufsearch (UINT8* startadr, UINT16 len, UINT8* str) { UINT16 i; INT16 position; UINT8 matchesneeded; UINT8 matchesnow; UINT8* target; UINT8* key;  target = startadr; position = -1; key = str; matchesnow = 0; matchesneeded = 0;    while( *key++ != '\0' ) {   matchesneeded++; if(matchesneeded > 30) return(-1); }    key = str;  for(i=0; i<len; i++) { if( *target == *key) {   matchesnow++;    key++; target++;  if(matchesnow == 1) {   position = i; }  if(matchesneeded == matchesnow) {   return(position); }  } else {  if( matchesnow != 0) {    matchesnow = 0; key = str;     target = startadr; target += position; target += 1;  i = position; } else {  target++; } }  }    return(-1);  }     UINT8 tolower (UINT8 ch) { if( (ch < 91) && (ch > 64) ) return(ch + 32);  return(ch);   }     UINT8 toupper (UINT8 ch) { if( (ch < 123) && (ch > 96) ) return(ch - 32);  return(ch);   }     UINT8 isnumeric (UINT8 ch) { if( (ch < 58) && (ch > 47) ) return(1); return(0); }      UINT16 hextoascii (UINT8 c) { UINT8 ch = c; UINT8 as1; UINT8 as2;    as1 = ch; as1 >>= 4; as1 &= 0x0F; if ( as1<10 ) as1 += 48; else as1 += 55;  as2 = ch; as2 &= 0x0F; if ( as2<10 ) as2 += 48; else as2 += 55;  return( ((UINT16)(as1)<<8) + as2 );   }      UINT8 asciitohex (UINT8 ch) { if( (ch < 58) && (ch > 47) ) return(ch - 48);  if( (ch < 71 ) && (ch > 64) ) return(ch - 55);  }   void ltoa (UINT32 nmbr, UINT8 *ch ) {    UINT16 multiple; UINT32 decade,comp; UINT8 i,found;    for( i=0; i<10;i++ ) *ch++ = '0';  ch -= 10;    if(nmbr == 0) { *ch++ = '0'; *ch = '\0'; }   decade = 1000000000;  found = FALSE;  for( i=0; i<10; i++) {  if(i != 0) decade /= 10;  for( multiple=9; multiple>0; multiple--) {	 if( (i==0) && (multiple > 2) ) continue;  comp = decade * multiple;  if(nmbr >= comp) { *ch = hextoascii(multiple); nmbr -= comp;  found = TRUE;  break;				  } }  if( found == TRUE) ch++;  }	  *ch = '\0';			   }     void itoa (UINT16 nmbr, UINT8* ch ) {    UINT16 decade, multiple; UINT32 comp; UINT8 i,found;     for( i=0; i<5;i++) *ch++ = '0';  ch -= 5;    if(nmbr == 0) { *ch++ = '0'; *ch = '\0'; }  decade = 10000;  found = FALSE;  for( i=0; i<5; i++) {   if(i != 0) decade /= 10;  for( multiple=9; multiple>0; multiple--) {	 if( (i==0) && (multiple > 6) ) continue;  comp = decade * multiple;  if(nmbr >= comp) { *ch = hextoascii(multiple); nmbr -= comp;  found = TRUE;  break;				  } }  if( found == TRUE) ch++;  }	  *ch = '\0';			   }      INT16 atoi (UINT8 *buf, UINT8 buflen) { INT16 oval = 0; UINT8 nval = 0;  while(buflen--) {  if(*buf == '\0') break;  if( isnumeric(*buf) == 0 ) return(-1);  nval = asciitohex(*buf++);  oval = oval * 10; oval += nval;	    if(oval < nval) return(-1);  }  return(oval);  }     void mputs (UINT8* msg) { #line 492 "..\system.c" /1     #line 497 "..\system.c" /0 }   void mputhex(UINT8 nbr) {  UINT16 i; #line 504 "..\system.c" /1    #line 508 "..\system.c" /0 }    void kick_WD (void) {   }    void wait (INT16 i) { for(;i;i--) kick_WD(); }     UINT32 random (void) {  return(0x345A2890); }    void dummy (void) {  }    void enter_power_save (void) {   if (sleep_mode) return;  sleep_mode = 1;          return; }    void exit_power_save (void) { UINT8 i;  if (sleep_mode) {           for( i=0; i<128; i++) sleep_mode = 0;  }  }  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -