I2C address added to device descriptor
This commit is contained in:
parent
14c79a9ab8
commit
06086b0994
3 changed files with 14 additions and 5 deletions
|
|
@ -16,7 +16,10 @@
|
|||
#include "config.h"
|
||||
|
||||
// shifted
|
||||
#define SSD1306_I2C_ADDR (0x3C)
|
||||
#if (SSD1306_I2C_SUPPORT)
|
||||
#define SSD1306_I2C_ADDR_0 (0x3C)
|
||||
#define SSD1306_I2C_ADDR_1 (0x3D)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
|
@ -39,9 +42,12 @@ typedef enum
|
|||
typedef struct
|
||||
{
|
||||
ssd1306_protocol_t protocol;
|
||||
#if (SSD1306_I2C_SUPPORT)
|
||||
uint8_t addr; //!< I2C address
|
||||
#endif
|
||||
uint8_t cs_pin; //!< Chip Select GPIO pin, used by SSD1306_PROTO_SPI3, SSD1306_PROTO_SPI4
|
||||
uint8_t dc_pin; //!< Data/Command GPIO pin, used by SSD1306_PROTO_SPI4
|
||||
uint8_t width; //!< Screen width, currently only 128px supported
|
||||
uint8_t width; //!< Screen width, currently supported 128px, 96px
|
||||
uint8_t height; //!< Screen height, currently supported 16px, 32px, 64px
|
||||
} ssd1306_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue