ili9341.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * ILI9341 LCD controller
  3. *
  4. * Copyright 2016 Noralf Trønnes
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef __LINUX_ILI9341_H
  12. #define __LINUX_ILI9341_H
  13. #define ILI9341_FRMCTR1 0xb1
  14. #define ILI9341_FRMCTR2 0xb2
  15. #define ILI9341_FRMCTR3 0xb3
  16. #define ILI9341_INVTR 0xb4
  17. #define ILI9341_PRCTR 0xb5
  18. #define ILI9341_DISCTRL 0xb6
  19. #define ILI9341_ETMOD 0xb7
  20. #define ILI9341_PWCTRL1 0xc0
  21. #define ILI9341_PWCTRL2 0xc1
  22. #define ILI9341_VMCTRL1 0xc5
  23. #define ILI9341_VMCTRL2 0xc7
  24. #define ILI9341_PWCTRLA 0xcb
  25. #define ILI9341_PWCTRLB 0xcf
  26. #define ILI9341_RDID1 0xda
  27. #define ILI9341_RDID2 0xdb
  28. #define ILI9341_RDID3 0xdc
  29. #define ILI9341_RDID4 0xd3
  30. #define ILI9341_PGAMCTRL 0xe0
  31. #define ILI9341_NGAMCTRL 0xe1
  32. #define ILI9341_DGAMCTRL1 0xe2
  33. #define ILI9341_DGAMCTRL2 0xe3
  34. #define ILI9341_DTCTRLA 0xe8
  35. #define ILI9341_DTCTRLB 0xea
  36. #define ILI9341_PWRSEQ 0xed
  37. #define ILI9341_EN3GAM 0xf2
  38. #define ILI9341_IFCTRL 0xf6
  39. #define ILI9341_PUMPCTRL 0xf7
  40. #define ILI9341_MADCTL_MH BIT(2)
  41. #define ILI9341_MADCTL_BGR BIT(3)
  42. #define ILI9341_MADCTL_ML BIT(4)
  43. #define ILI9341_MADCTL_MV BIT(5)
  44. #define ILI9341_MADCTL_MX BIT(6)
  45. #define ILI9341_MADCTL_MY BIT(7)
  46. #endif /* __LINUX_ILI9341_H */