-
Notifications
You must be signed in to change notification settings - Fork 24
/
ssd1306_default_if.h
executable file
·44 lines (37 loc) · 1.26 KB
/
ssd1306_default_if.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _SSD1306_DEFAULT_IF_H_
#define _SSD1306_DEFAULT_IF_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
* Initializes the i2c master with the parameters specified
* in the component configuration in sdkconfig.h.
*
* Returns true on successful init of the i2c bus.
*/
bool SSD1306_I2CMasterInitDefault( void );
/*
* Checks to see if the device at the given address is connected.
*
* Returns true if device is connected.
*/
bool SSD1306_IsDisplayAttached( int I2CAddress );
/*
* 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