cfag12864b.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Filename: cfag12864b.h
  3. * Version: 0.1.0
  4. * Description: cfag12864b LCD driver header
  5. * License: GPLv2
  6. *
  7. * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
  8. * Date: 2006-10-12
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. *
  23. */
  24. #ifndef _CFAG12864B_H_
  25. #define _CFAG12864B_H_
  26. #define CFAG12864B_WIDTH (128)
  27. #define CFAG12864B_HEIGHT (64)
  28. #define CFAG12864B_CONTROLLERS (2)
  29. #define CFAG12864B_PAGES (8)
  30. #define CFAG12864B_ADDRESSES (64)
  31. #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \
  32. (CFAG12864B_PAGES) * \
  33. (CFAG12864B_ADDRESSES))
  34. /*
  35. * The driver will blit this buffer to the LCD
  36. *
  37. * Its size is CFAG12864B_SIZE.
  38. */
  39. extern unsigned char * cfag12864b_buffer;
  40. /*
  41. * Get the refresh rate of the LCD
  42. *
  43. * Returns the refresh rate (hertzs).
  44. */
  45. extern unsigned int cfag12864b_getrate(void);
  46. /*
  47. * Enable refreshing
  48. *
  49. * Returns 0 if successful (anyone was using it),
  50. * or != 0 if failed (someone is using it).
  51. */
  52. extern unsigned char cfag12864b_enable(void);
  53. /*
  54. * Disable refreshing
  55. *
  56. * You should call this only when you finish using the LCD.
  57. */
  58. extern void cfag12864b_disable(void);
  59. /*
  60. * Is enabled refreshing? (is anyone using the module?)
  61. *
  62. * Returns 0 if refreshing is not enabled (anyone is using it),
  63. * or != 0 if refreshing is enabled (someone is using it).
  64. *
  65. * Useful for buffer read-only modules.
  66. */
  67. extern unsigned char cfag12864b_isenabled(void);
  68. /*
  69. * Is the module inited?
  70. */
  71. extern unsigned char cfag12864b_isinited(void);
  72. #endif /* _CFAG12864B_H_ */