From ecd060c27b940c1eba22be22a560b12c5e2136bd Mon Sep 17 00:00:00 2001 From: Alex Demenchuk Date: Thu, 31 May 2018 11:00:16 -0400 Subject: [PATCH] Pack device descriptor enums to shrink the struct --- extras/ssd1306/ssd1306.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extras/ssd1306/ssd1306.h b/extras/ssd1306/ssd1306.h index 6e0e577..0f0fe1a 100644 --- a/extras/ssd1306/ssd1306.h +++ b/extras/ssd1306/ssd1306.h @@ -64,8 +64,10 @@ typedef enum */ typedef struct { - ssd1306_protocol_t protocol; - ssd1306_screen_t screen; + struct { + uint8_t protocol : 4; //!< I/O protocol + uint8_t screen : 4; //!< Screen type + }; #if (SSD1306_I2C_SUPPORT) i2c_dev_t i2c_dev; //!< I2C device descriptor, used by SSD1306_PROTO_I2C #endif