Merge pull request #635 from quietboil/improved
ssd1306: Allow SPI3 support to be disabled
This commit is contained in:
commit
d9c5f2eaa2
2 changed files with 5 additions and 1 deletions
|
@ -7,11 +7,13 @@ INC_DIRS += $(ssd1306_ROOT)..
|
|||
SSD1306_I2C_SUPPORT ?= 1
|
||||
# SPI4 support is on by default
|
||||
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))
|
||||
|
|
|
@ -236,7 +236,9 @@ static int sh1106_go_coordinate(const ssd1306_t *dev, uint8_t x, uint8_t y)
|
|||
int ssd1306_load_frame_buffer(const ssd1306_t *dev, uint8_t buf[])
|
||||
{
|
||||
uint16_t i;
|
||||
#if (SSD1306_SPI3_SUPPORT)
|
||||
uint8_t j;
|
||||
#endif
|
||||
#if (SSD1306_I2C_SUPPORT)
|
||||
uint8_t tab[16] = { 0 };
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue