ssd1306xled.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * SSD1306xLED - Library for the SSD1306 based OLED/PLED 128x64 displays
  3. *
  4. * @author Neven Boyanov
  5. *
  6. * This is part of the Tinusaur/SSD1306xLED project.
  7. *
  8. * Copyright (c) 2018 Neven Boyanov, The Tinusaur Team. All Rights Reserved.
  9. * Distributed as open source software under MIT License, see LICENSE.txt file.
  10. * Retain in your source code the link http://tinusaur.org to the Tinusaur project.
  11. *
  12. * Source code available at: https://bitbucket.org/tinusaur/ssd1306xled
  13. *
  14. */
  15. #ifndef SSD1306XLED_H
  16. #define SSD1306XLED_H
  17. // ============================================================================
  18. // -----(+)-------------------->-----> [Vcc] Pin 1 on the SSD1306 display board
  19. // -----(-)-------------------->-----> [GND] Pin 2 on the SSD1306 display board
  20. #define SSD1306_SCL PB2 // ----> [SCL] Pin 3 on the SSD1306 display board
  21. #define SSD1306_SDA PB0 // ----> [SDA] Pin 4 on the SSD1306 display board
  22. #define SSD1306_SADDR 0x78 // Display IC2 slave address, default 0x78
  23. // ----------------------------------------------------------------------------
  24. #define ssd1306_clear() ssd1306_fill(0)
  25. #define ssd1306_fill2(p1, p2) ssd1306_fill4(p1, p2, p1, p2)
  26. // ----------------------------------------------------------------------------
  27. void ssd1306_init(void);
  28. void ssd1306_setpos(uint8_t, uint8_t);
  29. void ssd1306_fill(uint8_t);
  30. void ssd1306_fill4(uint8_t, uint8_t, uint8_t, uint8_t);
  31. // ============================================================================
  32. #endif