From d1d178748b385b9951595f86e84794680a05874c Mon Sep 17 00:00:00 2001 From: Delio Brignoli Date: Tue, 19 Sep 2017 20:40:36 +0200 Subject: [PATCH] ssd1306_virt: add SSD1306_VIRT_CHARGE_PUMP command (ignored) Without this change receiving SSD1306_VIRT_CHARGE_PUMP will make the command parser get out of sync. --- examples/parts/ssd1306_virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/parts/ssd1306_virt.c b/examples/parts/ssd1306_virt.c index 1ffa0e1..84d25aa 100644 --- a/examples/parts/ssd1306_virt.c +++ b/examples/parts/ssd1306_virt.c @@ -62,6 +62,7 @@ ssd1306_update_command_register (ssd1306_t *part) part->reg_write_sz = 1; switch (part->spi_data) { + case SSD1306_VIRT_CHARGE_PUMP: case SSD1306_VIRT_SET_CONTRAST: part->command_register = part->spi_data; //printf ("SSD1306: CONTRAST SET COMMAND: 0x%02x\n", part->spi_data); @@ -231,6 +232,7 @@ ssd1306_update_setting (ssd1306_t *part) case SSD1306_VIRT_SET_CHARGE: case SSD1306_VIRT_SET_VCOM: case SSD1306_VIRT_SET_PADS: + case SSD1306_VIRT_CHARGE_PUMP: SSD1306_CLEAR_COMMAND_REG(part); return; case SSD1306_VIRT_SCROLL_RIGHT: -- 2.39.5