From 91e85149c1ac24d9b02070a69d33cb52d2d1eca2 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Tue, 16 Jul 2024 12:58:47 +0100 Subject: [PATCH] Remove legacy Host dependencies on Esp8266 Components --- Sming/Arch/Host/Components/driver/uart_server.cpp | 11 +++++------ Sming/Arch/Host/Components/esp_hal/component.mk | 2 -- Sming/Arch/Host/Components/sming-arch/component.mk | 4 ---- Sming/Arch/Host/Components/spi_flash/component.mk | 2 -- .../Host/Components/spi_flash/include/esp_spi_flash.h | 5 ++--- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/Sming/Arch/Host/Components/driver/uart_server.cpp b/Sming/Arch/Host/Components/driver/uart_server.cpp index 86bcdb8ed3..bc99a6842f 100644 --- a/Sming/Arch/Host/Components/driver/uart_server.cpp +++ b/Sming/Arch/Host/Components/driver/uart_server.cpp @@ -18,7 +18,6 @@ ****/ #include "uart_server.h" -#include #include #include #include @@ -76,7 +75,7 @@ void* KeyboardThread::thread_routine() buf->writeChar(c); } while((c = getkey()) != KEY_NONE); - uart->status |= UART_RXFIFO_TOUT_INT_ST; + uart->status |= UART_STATUS_RXFIFO_TOUT; interrupt_begin(); @@ -254,7 +253,7 @@ int CUart::serviceRead() int space = uart->rx_buffer->getFreeSpace(); if(space < avail) { - uart->status |= UART_RXFIFO_OVF_INT_ST; + uart->status |= UART_STATUS_RXFIFO_OVF; } int read = std::min(space, avail); if(read != 0) { @@ -266,9 +265,9 @@ int CUart::serviceRead() } space -= read; if(space == 0) { - uart->status |= UART_RXFIFO_FULL_INT_ST; + uart->status |= UART_STATUS_RXFIFO_FULL; } else { - uart->status |= UART_RXFIFO_TOUT_INT_ST; + uart->status |= UART_STATUS_RXFIFO_TOUT; } } } @@ -306,7 +305,7 @@ int CUart::serviceWrite() } while((avail = txbuf->getReadData(data)) != 0); if(txbuf->isEmpty()) { - uart->status |= UART_TXFIFO_EMPTY_INT_ST; + uart->status |= UART_STATUS_TXFIFO_EMPTY; } else { txsem.post(); } diff --git a/Sming/Arch/Host/Components/esp_hal/component.mk b/Sming/Arch/Host/Components/esp_hal/component.mk index 60b7a64153..0b32dac91c 100644 --- a/Sming/Arch/Host/Components/esp_hal/component.mk +++ b/Sming/Arch/Host/Components/esp_hal/component.mk @@ -1,3 +1 @@ -COMPONENT_INCDIRS := include $(ESP8266_COMPONENTS)/esp8266/include - COMPONENT_DEPENDS := hostlib diff --git a/Sming/Arch/Host/Components/sming-arch/component.mk b/Sming/Arch/Host/Components/sming-arch/component.mk index af6aa02b8a..cb3e2503d3 100644 --- a/Sming/Arch/Host/Components/sming-arch/component.mk +++ b/Sming/Arch/Host/Components/sming-arch/component.mk @@ -10,10 +10,6 @@ # EXCLUDE_LIBRARIES := Adafruit_ILI9341 Adafruit_NeoPixel Adafruit_PCD8544 Adafruit_SSD1306 \ # ArduCAM CapacitiveSensor IR MCP23S17 RF24 SDCard TFT_ILI9163C WS2812 -# Eventually this will go, but for now we use some Esp8266 code -ESP8266_COMPONENTS := $(SMING_HOME)/Arch/Esp8266/Components -export ESP8266_COMPONENTS - COMPONENT_SRCDIRS := \ $(ARCH_CORE) $(call ListAllSubDirs,$(ARCH_CORE)) \ $(ARCH_BASE)/Platform \ diff --git a/Sming/Arch/Host/Components/spi_flash/component.mk b/Sming/Arch/Host/Components/spi_flash/component.mk index 0aa8fcafcc..8d5b1ee2f6 100644 --- a/Sming/Arch/Host/Components/spi_flash/component.mk +++ b/Sming/Arch/Host/Components/spi_flash/component.mk @@ -1,3 +1 @@ -COMPONENT_INCDIRS += $(ESP8266_COMPONENTS)/spi_flash/include - COMPONENT_DEPENDS := IFS diff --git a/Sming/Arch/Host/Components/spi_flash/include/esp_spi_flash.h b/Sming/Arch/Host/Components/spi_flash/include/esp_spi_flash.h index 28a32875e5..004630efa9 100644 --- a/Sming/Arch/Host/Components/spi_flash/include/esp_spi_flash.h +++ b/Sming/Arch/Host/Components/spi_flash/include/esp_spi_flash.h @@ -8,13 +8,12 @@ #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #define INTERNAL_FLASH_SECTOR_SIZE 4096 #define INTERNAL_FLASH_START_ADDRESS 0x40200000