cfag12864b.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Filename: cfag12864b.h
  4. * Version: 0.1.0
  5. * Description: cfag12864b LCD driver header
  6. *
  7. * Author: Copyright (C) Miguel Ojeda Sandonis
  8. * Date: 2006-10-12
  9. */
  10. #ifndef _CFAG12864B_H_
  11. #define _CFAG12864B_H_
  12. #define CFAG12864B_WIDTH (128)
  13. #define CFAG12864B_HEIGHT (64)
  14. #define CFAG12864B_CONTROLLERS (2)
  15. #define CFAG12864B_PAGES (8)
  16. #define CFAG12864B_ADDRESSES (64)
  17. #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \
  18. (CFAG12864B_PAGES) * \
  19. (CFAG12864B_ADDRESSES))
  20. /*
  21. * The driver will blit this buffer to the LCD
  22. *
  23. * Its size is CFAG12864B_SIZE.
  24. */
  25. extern unsigned char * cfag12864b_buffer;
  26. /*
  27. * Get the refresh rate of the LCD
  28. *
  29. * Returns the refresh rate (hertz).
  30. */
  31. extern unsigned int cfag12864b_getrate(void);
  32. /*
  33. * Enable refreshing
  34. *
  35. * Returns 0 if successful (anyone was using it),
  36. * or != 0 if failed (someone is using it).
  37. */
  38. extern unsigned char cfag12864b_enable(void);
  39. /*
  40. * Disable refreshing
  41. *
  42. * You should call this only when you finish using the LCD.
  43. */
  44. extern void cfag12864b_disable(void);
  45. /*
  46. * Is enabled refreshing? (is anyone using the module?)
  47. *
  48. * Returns 0 if refreshing is not enabled (anyone is using it),
  49. * or != 0 if refreshing is enabled (someone is using it).
  50. *
  51. * Useful for buffer read-only modules.
  52. */
  53. extern unsigned char cfag12864b_isenabled(void);
  54. /*
  55. * Is the module inited?
  56. */
  57. extern unsigned char cfag12864b_isinited(void);
  58. #endif /* _CFAG12864B_H_ */