Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy Host dependencies on Esp8266 Components #2863

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Sming/Arch/Host/Components/driver/uart_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
****/

#include "uart_server.h"
#include <espinc/uart_register.h>
#include <driver/SerialBuffer.h>
#include <BitManipulations.h>
#include <hostlib/keyb.h>
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}
}
}
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 0 additions & 2 deletions Sming/Arch/Host/Components/esp_hal/component.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
COMPONENT_INCDIRS := include $(ESP8266_COMPONENTS)/esp8266/include

COMPONENT_DEPENDS := hostlib
4 changes: 0 additions & 4 deletions Sming/Arch/Host/Components/sming-arch/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 0 additions & 2 deletions Sming/Arch/Host/Components/spi_flash/component.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
COMPONENT_INCDIRS += $(ESP8266_COMPONENTS)/spi_flash/include

COMPONENT_DEPENDS := IFS
5 changes: 2 additions & 3 deletions Sming/Arch/Host/Components/spi_flash/include/esp_spi_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

#pragma once

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#include <spi_flash.h>
#include <esp_attr.h>

#define INTERNAL_FLASH_SECTOR_SIZE 4096
#define INTERNAL_FLASH_START_ADDRESS 0x40200000

Expand Down
Loading