From 2b915c11c771c8685faeec1116115db4b04c076c Mon Sep 17 00:00:00 2001 From: Tuan PM Date: Tue, 3 Jan 2017 05:40:54 +0700 Subject: [PATCH] add some missing include & fixed display output on sh1104 (#319) * add some missing include * Fixed display on SH1106 --- core/app_main.c | 2 ++ core/debug_dumps.c | 1 + extras/i2s_dma/i2s_dma.c | 1 + extras/ssd1306/ssd1306.c | 2 +- open_esplibs/libmain/user_interface.c | 2 ++ open_esplibs/libwpa/wpa_main.c | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/app_main.c b/core/app_main.c index ee27092..05ad952 100644 --- a/core/app_main.c +++ b/core/app_main.c @@ -21,6 +21,8 @@ #include "esp/spi_regs.h" #include "esp/dport_regs.h" #include "esp/wdev_regs.h" +#include "esp/wdt_regs.h" +#include "esp/rtcmem_regs.h" #include "esp/hwrand.h" #include "os_version.h" diff --git a/core/debug_dumps.c b/core/debug_dumps.c index c5af763..6300439 100644 --- a/core/debug_dumps.c +++ b/core/debug_dumps.c @@ -19,6 +19,7 @@ #include "xtensa_ops.h" #include "esp/rom.h" #include "esp/uart.h" +#include "esp/dport_regs.h" #include "espressif/esp_common.h" #include "esplibs/libmain.h" diff --git a/extras/i2s_dma/i2s_dma.c b/extras/i2s_dma/i2s_dma.c index 6cccc72..442cdf3 100644 --- a/extras/i2s_dma/i2s_dma.c +++ b/extras/i2s_dma/i2s_dma.c @@ -26,6 +26,7 @@ #include "esp/iomux.h" #include "esp/i2s_regs.h" #include "esp/interrupts.h" +#include "esp/iomux.h" #include "common_macros.h" #include diff --git a/extras/ssd1306/ssd1306.c b/extras/ssd1306/ssd1306.c index dae29fa..c4f43a9 100644 --- a/extras/ssd1306/ssd1306.c +++ b/extras/ssd1306/ssd1306.c @@ -259,7 +259,7 @@ int ssd1306_load_frame_buffer(const ssd1306_t *dev, uint8_t buf[]) #if (SSD1306_I2C_SUPPORT) case SSD1306_PROTO_I2C: for (i = 0; i < len; i++) { - if(dev->screen == SH1106_SCREEN) sh1106_go_coordinate(dev,0,i/dev->width); + if(dev->screen == SH1106_SCREEN && i%dev->width == 0) sh1106_go_coordinate(dev,0,i/dev->width); i2c_start(); if (!i2c_write(dev->addr << 1)) { debug("Error while xmitting I2C slave address\n"); diff --git a/open_esplibs/libmain/user_interface.c b/open_esplibs/libmain/user_interface.c index de38e6e..01ac331 100644 --- a/open_esplibs/libmain/user_interface.c +++ b/open_esplibs/libmain/user_interface.c @@ -21,6 +21,8 @@ #include "esp/sar_regs.h" #include "esp/wdev_regs.h" #include "esp/uart.h" +#include "esp/rtc_regs.h" +#include "esp/iomux.h" #include "etstimer.h" #include "espressif/sdk_private.h" diff --git a/open_esplibs/libwpa/wpa_main.c b/open_esplibs/libwpa/wpa_main.c index 28acb45..1c70516 100644 --- a/open_esplibs/libwpa/wpa_main.c +++ b/open_esplibs/libwpa/wpa_main.c @@ -15,6 +15,7 @@ #include "esplibs/libwpa.h" #include "esplibs/libpp.h" #include "lwip/dhcp.h" +#include "esp/rtcmem_regs.h" static void wpa_callback1(struct pbuf* pb) { struct netif *netif = sdk_g_ic.v.station_netif_info->netif;