contrast.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * contrast pwm driver
  3. *
  4. * Copyright (c) 2009 Openmoko Inc.
  5. *
  6. * Authors Christopher Hall <hsw@openmoko.com>
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #if !defined(_CONTRAST_H_)
  22. #define _CONTRAST_H_ 1
  23. typedef enum {
  24. Contrast_minimum = 0,
  25. Contrast_light = 1500,
  26. Contrast_default = 2048,
  27. Contrast_dark = 3000,
  28. Contrast_maximum = 4095,
  29. } ContrastType;
  30. void Contrast_initialise(void);
  31. // clip between maximum and minimum
  32. void Contrast_set_value(int value);
  33. // clip between light and dark rather than full range
  34. // as this is more useful since the display should always be visible
  35. void Contrast_set(int value);
  36. int Contrast_get(void);
  37. #endif