实现自动按键功能
This commit is contained in:
@@ -2,7 +2,7 @@ idf_component_register(SRCS "my_usb_project.c" "../rust_app/rust_app_wrapper.c"
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../rust_app")
|
||||
|
||||
set(RUST_LIB_PATH "${CMAKE_CURRENT_LIST_DIR}/../rust_app/target/xtensa-esp32s3-none-elf/debug/librust_app.a")
|
||||
set(RUST_LIB_PATH "${CMAKE_CURRENT_LIST_DIR}/../rust_app/target/xtensa-esp32s3-none-elf/release-debug/librust_app.a")
|
||||
message(STATUS "Rust library path: ${RUST_LIB_PATH}")
|
||||
|
||||
# 直接将 Rust 库添加到链接器命令中
|
||||
|
||||
@@ -104,6 +104,11 @@ void rust_vTaskDelay(uint32_t xTicksToDelay) {
|
||||
vTaskDelay(xTicksToDelay);
|
||||
}
|
||||
|
||||
// 暴露日志函数给 Rust
|
||||
void rust_esp_log_i(const char* tag, const char* message) {
|
||||
ESP_LOGI(tag, "%s", message);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "USB 初始化");
|
||||
|
||||
Reference in New Issue
Block a user