refactor display

- part of components
- separation between LMS & driver
- move slimp message to squeezelite
This commit is contained in:
philippe44
2020-01-18 16:19:06 -08:00
parent 4dad444349
commit 5a9df7b0d5
42 changed files with 443 additions and 316 deletions

View File

@@ -0,0 +1,36 @@
#ifndef _SSD1306_DEFAULT_IF_H_
#define _SSD1306_DEFAULT_IF_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
* Initializes the i2c master
*
* Returns true on successful init of the i2c bus.
*/
bool SSD1306_I2CMasterInitDefault( int PortNumber, int SDA, int SCL );
/*
* Attaches a display to the I2C bus using default communication functions.
*
* Params:
* DisplayHandle: Pointer to your SSD1306_Device object
* Width: Width of display
* Height: Height of display
* I2CAddress: Address of your display
* RSTPin: Optional GPIO pin to use for hardware reset, if none pass -1 for this parameter.
*
* Returns true on successful init of display.
*/
bool SSD1306_I2CMasterAttachDisplayDefault( struct SSD1306_Device* DisplayHandle, int Width, int Height, int I2CAddress, int RSTPin );
bool SSD1306_SPIMasterInitDefault( void );
bool SSD1306_SPIMasterAttachDisplayDefault( struct SSD1306_Device* DeviceHandle, int Width, int Height, int CSForThisDisplay, int RSTForThisDisplay );
#ifdef __cplusplus
}
#endif
#endif