Commit d1d178748b385b9951595f86e84794680a05874c
authorDelio Brignoli <brignoli.delio@gmail.com>
Tue, 19 Sep 2017 18:40:36 +0000 (20:40 +0200)
committerMichel Pollet <github.com@pollet.net>
Wed, 20 Sep 2017 07:12:11 +0000 (08:12 +0100)
Without this change receiving SSD1306_VIRT_CHARGE_PUMP will
make the command parser get out of sync.

examples/parts/ssd1306_virt.c

index 1ffa0e1045ccc09ba6fce449b8ed17c83d77e348..84d25aa62b39b0c25c450ea228c0edb494799d1e 100644 (file)
@@ -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: