Initial Modifikations

This commit is contained in:
jomjol
2025-03-01 20:08:25 +01:00
parent cf96d49bd0
commit 9a82e0ac92
7 changed files with 4778 additions and 2 deletions

View File

@@ -644,11 +644,19 @@ string toLower(string in)
}
// CPU Temp
#if defined(BOARD_ESP32_S3_ALEKSEI) // ESP32s3 hat die Funktion nicht
float temperatureRead()
{
return 0.0;
}
#elif
extern "C" uint8_t temprature_sens_read();
float temperatureRead()
{
return (temprature_sens_read() - 32) / 1.8;
}
#endif
time_t addDays(time_t startTime, int days)
{

View File

@@ -11,5 +11,5 @@ dependencies:
type: idf
version: 5.3.1
manifest_hash: f88c9e5c2d75a9d5d6968fc67a90ef0cd7146dd6a3905a79c4dfcfc3b4fe6731
target: esp32
target: esp32s3
version: 1.0.0

View File

@@ -308,6 +308,56 @@
#define FLASH_GPIO GPIO_NUM_4 // PIN for flashlight LED
#define USE_PWM_LEDFLASH // if __LEDGLOBAL is defined, a global variable is used for LED control, otherwise locally and each time a new
#elif defined(BOARD_ESP32_S3_ALEKSEI) // Sonderversion für Aleksei mit ESP32s3 und Ethernet (PoE)
// HIGH=ENABLE
// ETH_EN activates power for the Ethernet
// PER_EN activates power for camera,leds,and SDcard, Battery measurement voltage divider
#define ETH_EN GPIO_NUM_45
#define PER_EN GPIO_NUM_46
// SD card (operated with SDMMC peripheral)
//-------------------------------------------------
#define GPIO_SDCARD_CLK GPIO_NUM_40
#define GPIO_SDCARD_CMD GPIO_NUM_42
#define GPIO_SDCARD_D0 GPIO_NUM_41
#ifndef __SD_USE_ONE_LINE_MODE__
#define GPIO_SDCARD_D1 GPIO_NUM_4
#define GPIO_SDCARD_D2 GPIO_NUM_12
#define GPIO_SDCARD_D3 GPIO_NUM_13
#else
#define GPIO_SDCARD_D1 GPIO_NUM_NC
#define GPIO_SDCARD_D2 GPIO_NUM_NC
#define GPIO_SDCARD_D3 GPIO_NUM_13
#endif
#define CAM_PIN_PWDN GPIO_NUM_NC
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
#define CAM_PIN_XCLK GPIO_NUM_15
#define CAM_PIN_SIOD GPIO_NUM_4
#define CAM_PIN_SIOC GPIO_NUM_5
#define CAM_PIN_D7 GPIO_NUM_16
#define CAM_PIN_D6 GPIO_NUM_17
#define CAM_PIN_D5 GPIO_NUM_18
#define CAM_PIN_D4 GPIO_NUM_12
#define CAM_PIN_D3 GPIO_NUM_10
#define CAM_PIN_D2 GPIO_NUM_8
#define CAM_PIN_D1 GPIO_NUM_9
#define CAM_PIN_D0 GPIO_NUM_11
#define CAM_PIN_VSYNC GPIO_NUM_6
#define CAM_PIN_HREF GPIO_NUM_37
#define CAM_PIN_PCLK GPIO_NUM_13
//Statusled + ClassControllCamera
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
//ClassControllCamera
#define FLASH_GPIO GPIO_NUM_4 // PIN for flashlight LED
#define USE_PWM_LEDFLASH // if __LEDGLOBAL is defined, a global variable is used for LED control, otherwise locally and each time a new
#else
#error "Board not selected"
#endif //Board PIN Map

View File

@@ -213,13 +213,28 @@ bool Init_NVS_SDCard()
extern "C" void app_main(void)
{
TickType_t xDelay;
#if defined (BOARD_ESP32_S3_ALEKSEI)
// gpio_pad_select_gpio(ETH_EN);
// gpio_set_direction(ETH_EN, GPIO_MODE_OUTPUT);
// gpio_set_level(ETH_EN, 0);
// PER_EN activates power for camera,leds,and SDcard, Battery measurement voltage divider
gpio_pad_select_gpio(PER_EN);
gpio_set_direction(PER_EN, GPIO_MODE_OUTPUT);
gpio_set_level(PER_EN, 1);
xDelay = 1000 / portTICK_PERIOD_MS;
ESP_LOGD(TAG, "BOARD_ESP32_S3_ALEKSEI - Switch on Power for camera, ... : sleep for: %ldms", (long) xDelay * CONFIG_FREERTOS_HZ/portTICK_PERIOD_MS);
vTaskDelay( xDelay );
#endif //ETH_EN &&
//#ifdef CONFIG_HEAP_TRACING_STANDALONE
#if defined HEAP_TRACING_MAIN_WIFI || defined HEAP_TRACING_MAIN_START
//register a buffer to record the memory trace
ESP_ERROR_CHECK( heap_trace_init_standalone(trace_record, NUM_RECORDS) );
#endif
TickType_t xDelay;
#ifdef DISABLE_BROWNOUT_DETECTOR
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector

View File

@@ -72,6 +72,31 @@ build_flags =
board_build.partitions = partitions.csv
monitor_speed = 115200
; The main env - default
[env:esp32s3-aleksei]
extends = common:esp32-idf
board = esp32-s3-devkitc-1
framework = espidf
build_flags =
; ### common imported :
${common:esp32-idf.build_flags}
${flags:runtime.build_flags}
; ### Sofware options : (can be set in defines.h)
-D BOARD_ESP32_S3_ALEKSEI
-D ENABLE_MQTT
;-D MQTT_PROTOCOL_311
-D MQTT_ENABLE_SSL
;-D MQTT_ENABLE_WS
;-D MQTT_ENABLE_WSS
-D MQTT_SUPPORTED_FEATURE_SKIP_CRT_CMN_NAME_CHECK
;-D MQTT_SUPPORTED_FEATURE_CRT_CMN_NAME
;-D MQTT_SUPPORTED_FEATURE_CLIENT_KEY_PASSWORD
-D ENABLE_INFLUXDB
-D ENABLE_WEBHOOK
-D ENABLE_SOFTAP
board_build.partitions = partitions.csv
monitor_speed = 115200
; full standalone dev mode
; As sample, the board is nod32s instead of esp32cam (do not change nothing in fact :)

2339
code/sdkconfig.esp32s3 Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff