Guest User

Untitled

a guest
Nov 24th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. char putchar(char chc)
  2. {
  3.     const char lines[LINE_ANZ] = {LCD_ADDR_LINE1, LCD_ADDR_LINE2, LCD_ADDR_LINE3, LCD_ADDR_LINE4};
  4.  
  5.     int anz = 0;
  6.  
  7.     if(chc = '\n')
  8.     {
  9.        
  10.     }  
  11.    
  12.     if(chc == '\t')
  13.     {
  14.         if(anz == 0 && anz <= lines[2])
  15.         {
  16.             Cursor_GoToXY(1,anz);
  17.         }
  18.  
  19.         if(anz >= lines[1] && anz <= lines[3])
  20.         {
  21.             Cursor_GoToXY(2,anz);
  22.         }
  23.  
  24.         if(anz >= lines[2] && anz <= 27)
  25.         {
  26.             Cursor_GoToXY(3,anz);
  27.         }
  28.  
  29.         if(anz >= lines[3] && anz <= 67)
  30.         {
  31.             Cursor_GoToXY(4,anz);
  32.         }
  33.        
  34.     }
  35.  
  36.     if(chc == '\b')
  37.     {
  38.        
  39.     }
  40.     anz++;
  41.  
  42.     LCD_WriteDR(chc);
  43.     return (chc);
  44. }
Advertisement
Add Comment
Please, Sign In to add comment