Merge ecd060c27b into eed96df5dd
This commit is contained in:
commit
5280a3d328
2 changed files with 13 additions and 12 deletions
|
|
@ -1,17 +1,19 @@
|
|||
# Component makefile for extras/ssd1306
|
||||
|
||||
# expected anyone using ssd1306 driver includes it as 'ssd1306/ssd1306.h'
|
||||
INC_DIRS += $(ssd1306_ROOT)..
|
||||
INC_DIRS += $(ROOT)extras
|
||||
|
||||
# I2C support is on by default
|
||||
SSD1306_I2C_SUPPORT ?= 1
|
||||
SSD1306_I2C_SUPPORT ?= 1
|
||||
# SPI4 support is on by default
|
||||
SSD1306_SPI4_SUPPORT ?= 1
|
||||
SSD1306_SPI4_SUPPORT ?= 1
|
||||
# SPI3 support is on by default
|
||||
SSD1306_SPI3_SUPPORT ?= 1
|
||||
|
||||
# args for passing into compile rule generation
|
||||
ssd1306_SRC_DIR = $(ssd1306_ROOT)
|
||||
|
||||
ssd1306_CFLAGS = -DSSD1306_I2C_SUPPORT=${SSD1306_I2C_SUPPORT} -DSSD1306_SPI4_SUPPORT=${SSD1306_SPI4_SUPPORT} $(CFLAGS)
|
||||
ssd1306_CFLAGS = -DSSD1306_I2C_SUPPORT=${SSD1306_I2C_SUPPORT} -DSSD1306_SPI4_SUPPORT=${SSD1306_SPI4_SUPPORT} -DSSD1306_SPI3_SUPPORT=${SSD1306_SPI3_SUPPORT} $(CFLAGS)
|
||||
|
||||
|
||||
$(eval $(call component_compile_rules,ssd1306))
|
||||
$(eval $(call component_compile_rules,ssd1306))
|
||||
|
|
@ -64,17 +64,16 @@ typedef enum
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
ssd1306_protocol_t protocol;
|
||||
ssd1306_screen_t screen;
|
||||
union
|
||||
{
|
||||
struct {
|
||||
uint8_t protocol : 4; //!< I/O protocol
|
||||
uint8_t screen : 4; //!< Screen type
|
||||
};
|
||||
#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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue