Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. void Display_Print(uint8_t Display_Row, uint8_t Display_Column, unsigned char * String_Pointer) // Print a null terminated string of chars, up to 22 max ('x0' excluded).
  2. {
  3. uint16_t String_Pointer_Offset;
  4.  
  5. String_Pointer_Offset = 0;
  6.  
  7. while( '' != *(String_Pointer + String_Pointer_Offset) )
  8. {
  9. #if (defined(DISPLAY_WRAP_TEXT_STRINGS) && (DISPLAY_WRAP_TEXT_STRINGS == YEP ))
  10. if(Display_Column > SHADOW_LAST_COLUMN) /* Check if it's the appropriate to wrap the row printing the exceeding character on the next line. */
  11. {
  12. Display_Column = 0;
  13. Display_Row ++;
  14. };
  15. if (Display_Row > SHADOW_LAST_LINE)
  16. {
  17. return; /* Ran out of space :( */
  18. };
  19. #else /* if (not defined(DISPLAY_WRAP_TEXT_STRINGS) || (DISPLAY_WRAP_TEXT_STRINGS == NOPE )) */
  20. if( (Display_Column > SHADOW_LAST_COLUMN)
  21. || (Display_Row > SHADOW_LAST_LINE ) )
  22. {
  23. return; /* Ran out of space :( */
  24. };
  25. #endif
  26. Display.Row[Display_Row].Column [Display_Column] = *(String_Pointer + String_Pointer_Offset);
  27. Display.Row[Display_Row].Touched[Display_Column] = TRUE;
  28.  
  29. Display_Column ++;
  30. String_Pointer_Offset++;
  31. };
  32.  
  33. return;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement