This commit is contained in:
quietboil 2018-07-01 07:54:39 +00:00 committed by GitHub
commit de51ef2fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,19 +64,16 @@ typedef enum
*/
typedef struct
{
ssd1306_protocol_t protocol;
ssd1306_screen_t screen;
union
{
#if (SSD1306_I2C_SUPPORT)
i2c_dev_t i2c_dev; //!< I2C devuce descriptor, used by SSD1306_PROTO_I2C
#endif
ssd1306_protocol_t protocol : 2;
ssd1306_screen_t screen : 1;
#if (SSD1306_SPI4_SUPPORT) || (SSD1306_SPI3_SUPPORT)
uint8_t cs_pin; //!< Chip Select GPIO pin, used by SSD1306_PROTO_SPI3, SSD1306_PROTO_SPI4
uint8_t cs_pin : 5; //!< Chip Select GPIO pin, used by SSD1306_PROTO_SPI3, SSD1306_PROTO_SPI4
#endif
};
#if (SSD1306_SPI4_SUPPORT)
uint8_t dc_pin; //!< Data/Command GPIO pin, used by SSD1306_PROTO_SPI4
#endif
#if (SSD1306_I2C_SUPPORT)
i2c_dev_t i2c_dev; //!< I2C device descriptor, used by SSD1306_PROTO_I2C
#endif
uint8_t width; //!< Screen width, currently supported 128px, 96px
uint8_t height; //!< Screen height, currently supported 16px, 32px, 64px