ili9341.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Private register map for ILI9341
  3. *
  4. * Copyright (C) 2019 - 2020 Andy Green <[email protected]>
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to
  8. * deal in the Software without restriction, including without limitation the
  9. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  10. * sell copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  22. * IN THE SOFTWARE.
  23. *
  24. */
  25. #if !defined(__LWS_ILI9341_H__)
  26. #define __LWS_ILI9341_H__
  27. enum {
  28. ILI9341_NOP = 0x00,
  29. ILI9341_SWRESET = 0x01,
  30. ILI9341_RDDID = 0x04,
  31. ILI9341_RDDST = 0x09,
  32. ILI9341_SLPIN = 0x10,
  33. ILI9341_SLPOUT = 0x11,
  34. ILI9341_PTLON = 0x12,
  35. ILI9341_NORON = 0x13,
  36. ILI9341_RDMODE = 0x0a,
  37. ILI9341_RDMADCTL = 0x0b,
  38. ILI9341_RDPIXFMT = 0x0c,
  39. ILI9341_RDIMGFMT = 0x0d,
  40. ILI9341_RDSELFDIAG = 0x0f,
  41. ILI9341_INVOFF = 0x20,
  42. ILI9341_INVON = 0x21,
  43. ILI9341_GAMMASET = 0x26,
  44. ILI9341_DISPOFF = 0x28,
  45. ILI9341_DISPON = 0x29,
  46. ILI9341_CASET = 0x2a,
  47. ILI9341_PASET = 0x2b,
  48. ILI9341_RAMWR = 0x2c,
  49. ILI9341_RAMRD = 0x2e,
  50. ILI9341_PTLAR = 0x30,
  51. ILI9341_VSCRDEF = 0x33,
  52. ILI9341_MADCTL = 0x36,
  53. ILI9341_VSCRSADD = 0x37,
  54. ILI9341_PIXFMT = 0x3a,
  55. ILI9341_FRMCTR1 = 0xb1,
  56. ILI9341_FRMCTR2 = 0xb2,
  57. ILI9341_FRMCTR3 = 0xb3,
  58. ILI9341_INVCTR = 0xb4,
  59. ILI9341_DFUNCTR = 0xb6,
  60. ILI9341_PWCTR1 = 0xc0,
  61. ILI9341_PWCTR2 = 0xc1,
  62. ILI9341_PWCTR3 = 0xc2,
  63. ILI9341_PWCTR4 = 0xc3,
  64. ILI9341_PWCTR5 = 0xc4,
  65. ILI9341_VMCTR1 = 0xc5,
  66. ILI9341_VMCTR2 = 0xc7,
  67. ILI9341_FACPUMPRAT = 0xcb,
  68. ILI9341_FACPWCTRB = 0xcf,
  69. ILI9341_RDID1 = 0xda,
  70. ILI9341_RDID2 = 0xdb,
  71. ILI9341_RDID3 = 0xdc,
  72. ILI9341_RDID4 = 0xdd,
  73. ILI9341_GMCTRP1 = 0xe0,
  74. ILI9341_GMCTRN1 = 0xe1,
  75. ILI9341_FACPWCTRA = 0xe8,
  76. ILI9341_FACPWCTR1 = 0xea,
  77. ILI9341_FACDRTIMCTRA = 0xed,
  78. ILI9341_FACSETGAMMACRV = 0xf2,
  79. ILI9341_FACDRTIMCTR = 0xf7,
  80. };
  81. #endif