picvue.h 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Picvue PVC160206 display driver
  3. *
  4. * Brian Murphy <brian.murphy@eicon.com>
  5. *
  6. */
  7. #include <asm/semaphore.h>
  8. struct pvc_defs {
  9. volatile u32 *reg;
  10. u32 data_shift;
  11. u32 data_mask;
  12. u32 e;
  13. u32 rw;
  14. u32 rs;
  15. };
  16. extern struct pvc_defs *picvue;
  17. #define PVC_NLINES 2
  18. #define PVC_DISPMEM 80
  19. #define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
  20. #define PVC_VISIBLE_CHARS 16
  21. void pvc_write_string(const unsigned char *str, u8 addr, int line);
  22. void pvc_write_string_centered(const unsigned char *str, int line);
  23. void pvc_dump_string(const unsigned char *str);
  24. #define BM_SIZE 8
  25. #define MAX_PROGRAMMABLE_CHARS 8
  26. int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]);
  27. void pvc_dispcnt(u8 cmd);
  28. #define DISP_OFF 0
  29. #define DISP_ON (1 << 2)
  30. #define CUR_ON (1 << 1)
  31. #define CUR_BLINK (1 << 0)
  32. void pvc_move(u8 cmd);
  33. #define DISPLAY (1 << 3)
  34. #define CURSOR 0
  35. #define RIGHT (1 << 2)
  36. #define LEFT 0
  37. void pvc_clear(void);
  38. void pvc_home(void);
  39. extern struct semaphore pvc_sem;