Add SPI3 SUPPORT preprocessor macro to CFLAGS

This commit is contained in:
Alex Demenchuk 2018-06-05 16:17:26 -04:00
parent eed96df5dd
commit c3b7a01891
2 changed files with 5 additions and 1 deletions

View file

@ -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))

View file

@ -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