feat(XCamera): 实现异步抓图功能并优化图像处理
fix(nginx): 调整企业微信回调代理路径 feat(gateway): 添加企业微信消息处理功能 docs: 更新项目规划文档和企业微信配置详情 refactor(XCamera): 重构LED检测和图像处理逻辑 test: 添加ONVIF抓图测试功能
This commit is contained in:
9
ESP32/my_usb_project/rust_app/CMakeLists.txt
Normal file
9
ESP32/my_usb_project/rust_app/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
|
||||
idf_component_register(
|
||||
SRCS "rust_app_wrapper.c"
|
||||
INCLUDE_DIRS "."
|
||||
)
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-L${CMAKE_CURRENT_LIST_DIR} -lrust_app")
|
||||
1079
ESP32/my_usb_project/rust_app/Cargo.lock
generated
Normal file
1079
ESP32/my_usb_project/rust_app/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
ESP32/my_usb_project/rust_app/Cargo.toml
Normal file
20
ESP32/my_usb_project/rust_app/Cargo.toml
Normal file
@@ -0,0 +1,20 @@
|
||||
[package]
|
||||
name = "my_usb_rust_app"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "rust_app"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
esp-hal = { version = "1.0.0-rc.1", features = ["esp32s3"] }
|
||||
esp-backtrace = { version = "0.18", features = ["esp32s3", "println"] }
|
||||
esp-println = { version = "0.16", features = ["esp32s3"] }
|
||||
panic-halt = "0.2"
|
||||
|
||||
[profile.release]
|
||||
opt-level = "s"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
debug = true
|
||||
11
ESP32/my_usb_project/rust_app/rust_app_wrapper.c
Normal file
11
ESP32/my_usb_project/rust_app/rust_app_wrapper.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_log.h"
|
||||
|
||||
static const char* TAG = "RustApp";
|
||||
|
||||
extern void rust_app_main();
|
||||
|
||||
void rust_app_wrapper_init() {
|
||||
ESP_LOGI(TAG, "Initializing Rust application...");
|
||||
rust_app_main();
|
||||
}
|
||||
14
ESP32/my_usb_project/rust_app/rust_app_wrapper.h
Normal file
14
ESP32/my_usb_project/rust_app/rust_app_wrapper.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef RUST_APP_WRAPPER_H
|
||||
#define RUST_APP_WRAPPER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rust_app_wrapper_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RUST_APP_WRAPPER_H */
|
||||
32
ESP32/my_usb_project/rust_app/src/lib.rs
Normal file
32
ESP32/my_usb_project/rust_app/src/lib.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
//! Rust application for ESP32-S3
|
||||
//!
|
||||
//! This module provides the main Rust application logic
|
||||
//! that interacts with the USB HID interface implemented in C/TinyUSB.
|
||||
|
||||
#![no_std]
|
||||
|
||||
use esp_backtrace as _;
|
||||
use esp_println as _;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {
|
||||
unsafe {
|
||||
core::hint::spin_loop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn rust_app_main() {
|
||||
esp_println::println!("Rust application starting...");
|
||||
|
||||
loop {
|
||||
esp_println::println!("Rust application running...");
|
||||
}
|
||||
}
|
||||
|
||||
#[export_name = "rust_usb_callback"]
|
||||
pub unsafe extern "C" fn usb_callback(event: u32) {
|
||||
esp_println::println!("USB Event: {}", event);
|
||||
}
|
||||
1
ESP32/my_usb_project/rust_app/target/.rustc_info.json
Normal file
1
ESP32/my_usb_project/rust_app/target/.rustc_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":4758407179817083456,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.93.0-nightly (2b43689c5 2026-01-27) (1.93.0.0)\nbinary: rustc\ncommit-hash: 2b43689c53a55786249fe1d7263826eef2d74725\ncommit-date: 2026-01-27\nhost: x86_64-pc-windows-msvc\nrelease: 1.93.0-nightly\nLLVM version: 20.1.1\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\xyzqm\\.rustup\\toolchains\\esp\npacked\n___\ndebug_assertions\nemscripten_wasm_eh\nfmt_debug=\"full\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"lahfsahf\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"x87\"\ntarget_has_atomic\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_has_reliable_f128\ntarget_has_reliable_f16\ntarget_has_reliable_f16_math\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nub_checks\nwindows\n","stderr":""},"9448618995002919627":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.a\nC:\\Users\\xyzqm\\.rustup\\toolchains\\esp\noff\n___\ndebug_assertions\nemscripten_wasm_eh\nfmt_debug=\"full\"\noverflow_checks\npanic=\"abort\"\nproc_macro\nrelocation_model=\"static\"\ntarget_abi=\"\"\ntarget_arch=\"xtensa\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"bool\"\ntarget_feature=\"clamps\"\ntarget_feature=\"coprocessor\"\ntarget_feature=\"debug\"\ntarget_feature=\"density\"\ntarget_feature=\"div32\"\ntarget_feature=\"exception\"\ntarget_feature=\"fp\"\ntarget_feature=\"highpriinterrupts\"\ntarget_feature=\"interrupt\"\ntarget_feature=\"loop\"\ntarget_feature=\"mac16\"\ntarget_feature=\"minmax\"\ntarget_feature=\"miscsr\"\ntarget_feature=\"mul16\"\ntarget_feature=\"mul32\"\ntarget_feature=\"mul32high\"\ntarget_feature=\"nsa\"\ntarget_feature=\"prid\"\ntarget_feature=\"regprotect\"\ntarget_feature=\"rvector\"\ntarget_feature=\"s32c1i\"\ntarget_feature=\"sext\"\ntarget_feature=\"threadptr\"\ntarget_feature=\"windowed\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_has_reliable_f128\ntarget_has_reliable_f16\ntarget_has_reliable_f16_math\ntarget_os=\"none\"\ntarget_pointer_width=\"32\"\ntarget_vendor=\"espressif\"\nub_checks\n","stderr":"warning: dropping unsupported crate type `dylib` for target `xtensa-esp32s3-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `xtensa-esp32s3-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `xtensa-esp32s3-none-elf`\n\nwarning: 3 warnings emitted\n\n"}},"successes":{}}
|
||||
3
ESP32/my_usb_project/rust_app/target/CACHEDIR.TAG
Normal file
3
ESP32/my_usb_project/rust_app/target/CACHEDIR.TAG
Normal file
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
Reference in New Issue
Block a user