ssd1306.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Private register map for SSD1306
  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_SSD1306_H__)
  26. #define __LWS_SSD1306_H__
  27. enum {
  28. SSD1306_SETLOWCOLUMN = 0x00,
  29. SSD1306_SETHIGHCOLUMN = 0x10,
  30. SSD1306_MEMORYMODE = 0x20,
  31. SSD1306_COLUMNADDR = 0x21,
  32. SSD1306_PAGEADDR = 0x22,
  33. SSD1306_DEACTIVATE_SCROLL = 0x2e,
  34. SSD1306_SETSTARTLINE = 0x40,
  35. SSD1306_SETCONTRAST = 0x81,
  36. SSD1306_CHARGEPUMP = 0x8d,
  37. SSD1306_SEGREMAP = 0xa0,
  38. SSD1306_SETSEGMENTREMAP = 0xa1,
  39. SSD1306_DISPLAYALLON_RESUME = 0xa4,
  40. SSD1306_DISPLAYALLON = 0xa5,
  41. SSD1306_NORMALDISPLAY = 0xa6,
  42. SSD1306_INVERTDISPLAY = 0xa7,
  43. SSD1306_SETMULTIPLEX = 0xa8,
  44. SSD1306_DISPLAYOFF = 0xae,
  45. SSD1306_DISPLAYON = 0xaf,
  46. SSD1306_COMSCANINC = 0xc0,
  47. SSD1306_COMSCANDEC = 0xc8,
  48. SSD1306_SETDISPLAYOFFSET = 0xd3,
  49. SSD1306_SETDISPLAYCLOCKDIV = 0xd5,
  50. SSD1306_SETPRECHARGE = 0xd9,
  51. SSD1306_SETCOMPINS = 0xda,
  52. SSD1306_SETVCOMDESELECT = 0xdb,
  53. SSD1306_NOP = 0xe3,
  54. };
  55. #endif