You've already forked TEF6686_ESP32
Go back to plain arduino, this had fucking broke my mind and i have no clue why
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(TEF6686_ESP32)
|
||||
@@ -191,7 +191,7 @@ bool TFT_eSPI::initDMA(bool ctrl_cs)
|
||||
.command_bits = 0,
|
||||
.address_bits = 0,
|
||||
.dummy_bits = 0,
|
||||
.mode = TFT_SPI_MODE,
|
||||
.mode = SPI_MODE0,
|
||||
.duty_cycle_pos = 0,
|
||||
.cs_ena_pretrans = 0,
|
||||
.cs_ena_posttrans = 0,
|
||||
@@ -238,7 +238,7 @@ bool TFT_eSPI::initDMA(bool ctrl_cs)
|
||||
inline void TFT_eSPI::begin_tft_write() {
|
||||
if (locked) {
|
||||
locked = false; // Flag to show SPI access now unlocked
|
||||
spi.beginTransaction(SPISettings(spi_write_speed * 1000000, MSBFIRST, TFT_SPI_MODE));
|
||||
spi.beginTransaction(SPISettings(spi_write_speed * 1000000, MSBFIRST, SPI_MODE0));
|
||||
CS_L;
|
||||
SET_BUS_WRITE_MODE;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ inline void TFT_eSPI::begin_tft_write() {
|
||||
void TFT_eSPI::begin_nin_write() {
|
||||
if (locked) {
|
||||
locked = false; // Flag to show SPI access now unlocked
|
||||
spi.beginTransaction(SPISettings(spi_write_speed * 1000000, MSBFIRST, TFT_SPI_MODE));
|
||||
spi.beginTransaction(SPISettings(spi_write_speed * 1000000, MSBFIRST, SPI_MODE0));
|
||||
CS_L;
|
||||
SET_BUS_WRITE_MODE;
|
||||
}
|
||||
@@ -281,7 +281,7 @@ inline void TFT_eSPI::begin_tft_read() {
|
||||
dmaWait();
|
||||
if (locked) {
|
||||
locked = false;
|
||||
spi.beginTransaction(SPISettings(SPI_READ_FREQUENCY, MSBFIRST, TFT_SPI_MODE));
|
||||
spi.beginTransaction(SPISettings(SPI_READ_FREQUENCY, MSBFIRST, SPI_MODE0));
|
||||
CS_L;
|
||||
}
|
||||
SET_BUS_READ_MODE;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define TFT_ESPI_VERSION "2.5.43"
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
|
||||
@@ -9,7 +7,6 @@
|
||||
|
||||
#include <pgmspace.h>
|
||||
|
||||
#define PROCESSOR_ID 0x32
|
||||
#define SPI_PORT VSPI
|
||||
#include "soc/spi_reg.h"
|
||||
#include "driver/spi_master.h"
|
||||
@@ -22,7 +19,7 @@
|
||||
|
||||
#define FS_NO_GLOBALS
|
||||
#include <FS.h>
|
||||
#include "SPIFFS.h" // ESP32 only
|
||||
#include "SPIFFS.h"
|
||||
|
||||
#define DC_C GPIO.out_w1tc = (1 << TFT_DC)//;GPIO.out_w1tc = (1 << TFT_DC)
|
||||
#define DC_D GPIO.out_w1ts = (1 << TFT_DC)//;GPIO.out_w1ts = (1 << TFT_DC)
|
||||
@@ -33,17 +30,13 @@
|
||||
#define WR_L
|
||||
#define WR_H
|
||||
|
||||
#ifndef TFT_MISO
|
||||
#define TFT_MISO -1
|
||||
#endif
|
||||
|
||||
#ifndef TFT_MOSI
|
||||
#define TFT_MOSI 23
|
||||
#endif
|
||||
|
||||
#ifndef TFT_SCLK
|
||||
#define TFT_SCLK 18
|
||||
#endif
|
||||
#define TFT_MISO -1
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 17
|
||||
#define TFT_RST 16
|
||||
#define TOUCH_CS 32
|
||||
|
||||
#define TFT_WRITE_BITS(D, B) *_spi_mosi_dlen = B-1; \
|
||||
*_spi_w = D; \
|
||||
@@ -73,19 +66,10 @@
|
||||
// Write same value twice
|
||||
#define tft_Write_32D(C) TFT_WRITE_BITS((uint16_t)((C)<<8 | (C)>>8)<<16 | (uint16_t)((C)<<8 | (C)>>8), 32)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Macros to read from display using SPI or software SPI
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined (TFT_PARALLEL_8_BIT)
|
||||
#define tft_Read_8() spi.transfer(0)
|
||||
#endif
|
||||
#define tft_Read_8() spi.transfer(0)
|
||||
|
||||
#define DAT8TO32(P) ( (uint32_t)P[0]<<8 | P[1] | P[2]<<24 | P[3]<<16 )
|
||||
|
||||
#ifndef TFT_SPI_MODE
|
||||
#define TFT_SPI_MODE SPI_MODE0
|
||||
#endif
|
||||
|
||||
//These enumerate the text plotting alignment (reference datum point)
|
||||
#define TL_DATUM 0 // Top left (default)
|
||||
#define TC_DATUM 1 // Top centre
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 17
|
||||
#define TFT_RST 16
|
||||
#define TOUCH_CS 32
|
||||
|
||||
#define SPI_FREQUENCY 7500000
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
@@ -6,9 +6,7 @@ platform = espressif32
|
||||
upload_speed = 921600
|
||||
monitor_speed = 115200
|
||||
board = esp32dev
|
||||
framework = arduino, espidf
|
||||
board_build.f_flash = 80000000L
|
||||
board_build.f_cpu = 160000000L
|
||||
framework = arduino
|
||||
board_build.partitions = maxapp.csv
|
||||
build_flags =
|
||||
-Wall
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=y
|
||||
CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
|
||||
CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE=y
|
||||
CONFIG_BOOTLOADER_WDT_TIME_MS=1000
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_NORESET=y
|
||||
CONFIG_ESPTOOLPY_AFTER_NORESET=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="maxapp.csv"
|
||||
CONFIG_ARDUINO_RUN_CORE0=y
|
||||
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
|
||||
# CONFIG_ARDUINO_SELECTIVE_AsyncUDP is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_AzureIoT is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_BLE is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_BluetoothSerial is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_EEPROM is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_FFat is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_HTTPClient is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_LITTLEFS is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_NetBIOS is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_Preferences is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_SD is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_SD_MMC is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_SimpleBLE is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_Ticker is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_Update is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_WiFiClientSecure is not set
|
||||
# CONFIG_ARDUINO_SELECTIVE_WiFiProv is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
|
||||
CONFIG_ESP32_REV_MIN_2=y
|
||||
# CONFIG_ESP32_DEBUG_OCDAWARE is not set
|
||||
# CONFIG_ETH_USE_ESP32_EMAC is not set
|
||||
# CONFIG_ETH_USE_SPI_ETHERNET is not set
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH is not set
|
||||
# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE is not set
|
||||
CONFIG_PM_ENABLE=y
|
||||
CONFIG_PM_DFS_INIT_AUTO=y
|
||||
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
|
||||
CONFIG_HAL_ASSERTION_DISABLE=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
|
||||
# CONFIG_LOG_COLORS is not set
|
||||
CONFIG_MBEDTLS_CMAC_C=y
|
||||
CONFIG_MBEDTLS_PSK_MODES=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
|
||||
# CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK is not set
|
||||
# CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK is not set
|
||||
# CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK is not set
|
||||
# CONFIG_MQTT_PROTOCOL_311 is not set
|
||||
# CONFIG_MQTT_TRANSPORT_SSL is not set
|
||||
CONFIG_SPIFFS_MAX_PARTITIONS=1
|
||||
# CONFIG_SPIFFS_USE_MTIME is not set
|
||||
# CONFIG_WS_TRANSPORT is not set
|
||||
# CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER is not set
|
||||
@@ -1,6 +0,0 @@
|
||||
# This file was automatically generated for projects
|
||||
# without default 'CMakeLists.txt' file.
|
||||
|
||||
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
||||
|
||||
idf_component_register(SRCS ${app_sources})
|
||||
31
src/main.cpp
31
src/main.cpp
@@ -1079,7 +1079,10 @@ void setAutoSpeedSPI() {
|
||||
}
|
||||
|
||||
void endMenu() {
|
||||
if(rds_settings_changed) radio.clearRDS(fullsearchrds);
|
||||
if(rds_settings_changed) {
|
||||
radio.clearRDS(fullsearchrds);
|
||||
RDSstatus = false;
|
||||
}
|
||||
rds_settings_changed = menu = false;
|
||||
menuopen = false;
|
||||
LowLevelInit = true;
|
||||
@@ -1175,7 +1178,7 @@ void setup() {
|
||||
bool tef_found = false;
|
||||
|
||||
Wire.begin();
|
||||
Wire.setClock(400000);
|
||||
Wire.setClock(100000);
|
||||
delay(1);
|
||||
|
||||
Serial.begin(115200);
|
||||
@@ -2833,9 +2836,9 @@ void DoMemoryPosTune() {
|
||||
if (RDSSPYTCP) RemoteClient.print("G:\r\nRESET-------\r\n\r\n");
|
||||
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
|
||||
|
||||
String stationText = "";
|
||||
String stationName = "";
|
||||
if (presets[memorypos].RDSPS[0] != '\0') {
|
||||
for (byte i = 0; i < 9; i++) stationText += presets[memorypos].RDSPS[i];
|
||||
for (byte i = 0; i < 9; i++) stationName += presets[memorypos].RDSPS[i];
|
||||
}
|
||||
|
||||
if (presets[memorypos].RDSPI[0] != '\0') {
|
||||
@@ -2848,7 +2851,7 @@ void DoMemoryPosTune() {
|
||||
for (byte i = 0; i < 6; i++) radio.rds.picode[i] = '\0';
|
||||
}
|
||||
|
||||
radio.rds.stationName = stationText;
|
||||
radio.rds.stationName = stationName;
|
||||
|
||||
BWset = presets[memorypos].bw;
|
||||
doBW();
|
||||
@@ -3981,21 +3984,3 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
void app_main() {
|
||||
rtc_wdt_disable();
|
||||
rtc_wdt_protect_off();
|
||||
|
||||
initArduino();
|
||||
|
||||
setup();
|
||||
|
||||
rtc_wdt_enable();
|
||||
rtc_wdt_protect_on();
|
||||
while(true) {
|
||||
loop();
|
||||
rtc_wdt_feed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
String HexStringold;
|
||||
float smoothBER = 0;
|
||||
|
||||
int PSLongWidth, AIDWidth, lengths[7];
|
||||
String stationNameLongOld, AIDStringold;
|
||||
int AIDWidth, lengths[7];
|
||||
String AIDStringold;
|
||||
bool rtABold, ps12errorold, ps34errorold, ps56errorold, ps78errorold;
|
||||
|
||||
void ShowAdvancedRDS() {
|
||||
@@ -431,11 +431,6 @@ void showPS() {
|
||||
if (!screenmute) tftReplace(ACENTER, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
|
||||
} else if (!rdsstatscreen) {
|
||||
if (radio.rds.hasLongPS && showlongps) {
|
||||
if (radio.rds.stationNameLong != stationNameLongOld) {
|
||||
PSLongWidth = PSSprite.textWidth(radio.rds.stationNameLong); // Measure new width
|
||||
stationNameLongOld = radio.rds.stationNameLong;
|
||||
}
|
||||
|
||||
lpsDisplay.update(radio.rds.stationNameLong, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
|
||||
} else {
|
||||
lpsDisplay.reset();
|
||||
|
||||
Reference in New Issue
Block a user