video.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. ** MPC823 Video Controller
  3. ** =======================
  4. ** (C) 2000 by Paolo Scaffardi (arsenio@tin.it)
  5. ** AIRVENT SAM s.p.a - RIMINI(ITALY)
  6. **
  7. */
  8. #ifndef _VIDEO_H_
  9. #define _VIDEO_H_
  10. /* Video functions */
  11. int video_init (void *videobase);
  12. void video_putc (const char c);
  13. void video_puts (const char *s);
  14. /**
  15. * Display a BMP format bitmap on the screen
  16. *
  17. * @param bmp_image Address of BMP image
  18. * @param x X position to draw image
  19. * @param y Y position to draw image
  20. */
  21. int video_display_bitmap(ulong bmp_image, int x, int y);
  22. /**
  23. * Get the width of the screen in pixels
  24. *
  25. * @return width of screen in pixels
  26. */
  27. int video_get_pixel_width(void);
  28. /**
  29. * Get the height of the screen in pixels
  30. *
  31. * @return height of screen in pixels
  32. */
  33. int video_get_pixel_height(void);
  34. /**
  35. * Get the number of text lines/rows on the screen
  36. *
  37. * @return number of rows
  38. */
  39. int video_get_screen_rows(void);
  40. /**
  41. * Get the number of text columns on the screen
  42. *
  43. * @return number of columns
  44. */
  45. int video_get_screen_columns(void);
  46. /**
  47. * Set the position of the text cursor
  48. *
  49. * @param col Column to place cursor (0 = left side)
  50. * @param row Row to place cursor (0 = top line)
  51. */
  52. void video_position_cursor(unsigned col, unsigned row);
  53. /* Clear the display */
  54. void video_clear(void);
  55. #endif