Quellcode durchsuchen

Merge branch 'main' of https://repo.tochtech.com/smarttalk/2_way_Tochie

Joey vor 3 Stunden
Ursprung
Commit
67e52cda42
5 geänderte Dateien mit 3475 neuen und 0 gelöschten Zeilen
  1. 18 0
      .vscode/c_cpp_properties.json
  2. 10 0
      .vscode/settings.json
  3. 30 0
      main/LED_control/LED.c
  4. 31 0
      main/LED_control/LED.h
  5. 3386 0
      sdkconfig

+ 18 - 0
.vscode/c_cpp_properties.json

@@ -0,0 +1,18 @@
+{
+    "configurations": [
+        {
+            "name": "Win32",
+            "includePath": [
+                "${workspaceFolder}/**",
+                "${workspaceFolder}"
+            ],
+            "defines": [
+                "_DEBUG",
+                "UNICODE",
+                "_UNICODE"
+            ],
+            "intelliSenseMode": "windows-gcc-x86"
+        }
+    ],
+    "version": 4
+}

+ 10 - 0
.vscode/settings.json

@@ -0,0 +1,10 @@
+{
+  "idf.currentSetup": "C:\\.espressif\\v6.0.1\\esp-idf",
+  "idf.customExtraVars": {},
+  "clangd.path": "C:\\Espressif\\tools\\esp-clang\\esp-20.1.1_20250829\\esp-clang\\bin\\clangd.exe",
+  "clangd.arguments": [
+    "--background-index",
+    "--query-driver=**",
+    "--compile-commands-dir=c:\\Users\\kathy\\Downloads\\2_way_Tochie-main\\2_way_tochie\\build"
+  ]
+}

+ 30 - 0
main/LED_control/LED.c

@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h" 
+#include "driver/gpio.h" 
+#include "esp_log.h" 
+#include "led_strip.h"
+#include "sdkconfig.h"
+#include "LED.h"
+
+static const char *TAG = "LED_Control";
+led_strip_handle_t led_strip = NULL;
+
+led_strip_handle_t configure_led(void)
+{
+    led_strip_config_t strip_config = {
+        .strip_gpio_num = 38, 
+        .max_leds = 1,      
+    };
+
+    // LED strip backend configuration: RMT
+    led_strip_rmt_config_t rmt_config = {
+        .clk_src = RMT_CLK_SRC_DEFAULT,        
+        .resolution_hz = (10 * 1000 * 1000), 
+    };
+
+    led_strip_handle_t handle = NULL;
+    ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &handle));
+    ESP_LOGI(TAG, "Created LED strip object with RMT backend");
+    return handle;
+}

+ 31 - 0
main/LED_control/LED.h

@@ -0,0 +1,31 @@
+#pragma once
+
+#include "driver/gpio.h"
+#include "driver/i2s_std.h"
+#include "driver/i2s_tdm.h"
+#include "driver/i2c_master.h"
+
+#include "soc/soc_caps.h"
+#include "esp_idf_version.h"
+
+#include "esp_codec_dev.h"
+#include "esp_codec_dev_defaults.h"
+#include "esp_codec_dev_os.h"
+#include "sdkconfig.h"
+
+#include <stdio.h>
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h" 
+
+#include "esp_log.h" 
+
+#include "led_strip.h"
+
+extern led_strip_handle_t led_strip;
+
+led_strip_handle_t configure_led(void);
+
+void LED_blink(void);
+void LED_mic(int mic_level);
+int get_mic_level (void);
+

Datei-Diff unterdrückt, da er zu groß ist
+ 3386 - 0
sdkconfig