From c5a78b4c6f6f56fac588307d7eb4541fb4abeb71 Mon Sep 17 00:00:00 2001 From: Alex Demenchuk Date: Thu, 31 May 2018 10:54:56 -0400 Subject: [PATCH] Clean up device descriptor struct --- extras/ssd1306/ssd1306.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extras/ssd1306/ssd1306.h b/extras/ssd1306/ssd1306.h index 86abaab..6e0e577 100644 --- a/extras/ssd1306/ssd1306.h +++ b/extras/ssd1306/ssd1306.h @@ -66,15 +66,12 @@ 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 + i2c_dev_t i2c_dev; //!< I2C device descriptor, used by SSD1306_PROTO_I2C #endif #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; //!< 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