ssd1306_default_if.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _SSD1306_DEFAULT_IF_H_
  2. #define _SSD1306_DEFAULT_IF_H_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. * Initializes the i2c master
  8. *
  9. * Returns true on successful init of the i2c bus.
  10. */
  11. bool SSD1306_I2CMasterInitDefault( int PortNumber, int SDA, int SCL );
  12. /*
  13. * Attaches a display to the I2C bus using default communication functions.
  14. *
  15. * Params:
  16. * DisplayHandle: Pointer to your SSD1306_Device object
  17. * Width: Width of display
  18. * Height: Height of display
  19. * I2CAddress: Address of your display
  20. * RSTPin: Optional GPIO pin to use for hardware reset, if none pass -1 for this parameter.
  21. *
  22. * Returns true on successful init of display.
  23. */
  24. bool SSD1306_I2CMasterAttachDisplayDefault( struct SSD1306_Device* DisplayHandle, int Width, int Height, int I2CAddress, int RSTPin );
  25. bool SSD1306_SPIMasterInitDefault( void );
  26. bool SSD1306_SPIMasterAttachDisplayDefault( struct SSD1306_Device* DeviceHandle, int Width, int Height, int CSForThisDisplay, int RSTForThisDisplay );
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif