ssd1306_conf.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Private configuration file for the SSD1306 library.
  3. * This example is configured for STM32F0, I2C and including all fonts.
  4. */
  5. #ifndef __SSD1306_CONF_H__
  6. #define __SSD1306_CONF_H__
  7. // Choose a microcontroller family
  8. //#define STM32F0
  9. //#define STM32F1
  10. //#define STM32F4
  11. //#define STM32L0
  12. #define STM32L1
  13. //#define STM32L4
  14. //#define STM32F3
  15. //#define STM32H7
  16. //#define STM32F7
  17. //#define STM32G0
  18. // Choose a bus
  19. #define SSD1306_USE_I2C
  20. //#define SSD1306_USE_SPI
  21. // I2C Configuration
  22. #define SSD1306_I2C_PORT hi2c2
  23. #define SSD1306_I2C_ADDR (0x3C << 1)
  24. // SPI Configuration
  25. //#define SSD1306_SPI_PORT hspi1
  26. //#define SSD1306_CS_Port OLED_CS_GPIO_Port
  27. //#define SSD1306_CS_Pin OLED_CS_Pin
  28. //#define SSD1306_DC_Port OLED_DC_GPIO_Port
  29. //#define SSD1306_DC_Pin OLED_DC_Pin
  30. //#define SSD1306_Reset_Port OLED_Res_GPIO_Port
  31. //#define SSD1306_Reset_Pin OLED_Res_Pin
  32. // Mirror the screen if needed
  33. // #define SSD1306_MIRROR_VERT
  34. // #define SSD1306_MIRROR_HORIZ
  35. // Set inverse color if needed
  36. // # define SSD1306_INVERSE_COLOR
  37. // Include only needed fonts
  38. #define SSD1306_INCLUDE_FONT_6x8
  39. #define SSD1306_INCLUDE_FONT_7x10
  40. #define SSD1306_INCLUDE_FONT_11x18
  41. //#define SSD1306_INCLUDE_FONT_16x26
  42. // Some OLEDs don't display anything in first two columns.
  43. // In this case change the following macro to 130.
  44. // The default value is 128.
  45. // #define SSD1306_WIDTH 130
  46. // The height can be changed as well if necessary.
  47. // It can be 32, 64 or 128. The default value is 64.
  48. // #define SSD1306_HEIGHT 64
  49. #endif /* __SSD1306_CONF_H__ */