Pack device descriptor enums to shrink the struct
This commit is contained in:
parent
c5a78b4c6f
commit
ecd060c27b
1 changed files with 4 additions and 2 deletions
|
@ -64,8 +64,10 @@ typedef enum
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
ssd1306_protocol_t protocol;
|
struct {
|
||||||
ssd1306_screen_t screen;
|
uint8_t protocol : 4; //!< I/O protocol
|
||||||
|
uint8_t screen : 4; //!< Screen type
|
||||||
|
};
|
||||||
#if (SSD1306_I2C_SUPPORT)
|
#if (SSD1306_I2C_SUPPORT)
|
||||||
i2c_dev_t i2c_dev; //!< I2C device descriptor, used by SSD1306_PROTO_I2C
|
i2c_dev_t i2c_dev; //!< I2C device descriptor, used by SSD1306_PROTO_I2C
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue