库编写
This commit is contained in:
parent
e91188dbec
commit
a032edc502
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
|
@ -84,7 +84,12 @@
|
|||
"charconv": "cpp",
|
||||
"format": "cpp",
|
||||
"bq4050.h": "c",
|
||||
"esp_log.h": "c"
|
||||
"esp_log.h": "c",
|
||||
"i2c_master.h": "c",
|
||||
"sw7203.h": "c",
|
||||
"i2c.h": "c",
|
||||
"ios": "c",
|
||||
"xiosbase": "c"
|
||||
},
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
|
@ -1 +1 @@
|
|||
f68715fe3ba5219c84da6e64fc887c67 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/CLSH1001.bin
|
||||
13a4cdffb202bac2dfd065f30024defd C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/CLSH1001.bin
|
||||
|
|
Binary file not shown.
1000
build/.ninja_log
1000
build/.ninja_log
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
1463
build/CLSH1001.map
1463
build/CLSH1001.map
File diff suppressed because it is too large
Load Diff
|
@ -519,7 +519,7 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
|||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=89
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=90
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
|
|
|
@ -639,6 +639,13 @@ C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provis
|
|||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provisioning/CMakeFiles/install.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provisioning/CMakeFiles/install/local.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provisioning/CMakeFiles/install/strip.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/__idf_sw7203.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/edit_cache.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/rebuild_cache.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/list_install_components.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/install.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/install/local.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/CMakeFiles/install/strip.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/main/CMakeFiles/__idf_main.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/main/CMakeFiles/edit_cache.dir
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/main/CMakeFiles/rebuild_cache.dir
|
||||
|
|
|
@ -1 +1 @@
|
|||
5cf371067a85ed6b617d36b66c99987d768fd8c6
|
||||
e91188dbec77bbc08647b9e4431ca83673c42d63
|
||||
|
|
|
@ -1434,6 +1434,25 @@ rule C_STATIC_LIBRARY_LINKER____idf_wifi_provisioning_
|
|||
restat = $RESTAT
|
||||
|
||||
|
||||
#############################################
|
||||
# Rule for compiling C files.
|
||||
|
||||
rule C_COMPILER____idf_sw7203_
|
||||
depfile = $DEP_FILE
|
||||
deps = gcc
|
||||
command = C:\Users\13684\.espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp32s3-elf-gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
|
||||
description = Building C object $out
|
||||
|
||||
|
||||
#############################################
|
||||
# Rule for linking C static library.
|
||||
|
||||
rule C_STATIC_LIBRARY_LINKER____idf_sw7203_
|
||||
command = cmd.exe /C "$PRE_LINK && C:\Users\13684\.espressif\tools\cmake\3.24.0\bin\cmake.exe -E rm -f $TARGET_FILE && C:\Users\13684\.espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp32s3-elf-ar.exe qc $TARGET_FILE $LINK_FLAGS $in && C:\Users\13684\.espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp32s3-elf-ranlib.exe $TARGET_FILE && $POST_BUILD"
|
||||
description = Linking C static library $TARGET_FILE
|
||||
restat = $RESTAT
|
||||
|
||||
|
||||
#############################################
|
||||
# Rule for compiling C files.
|
||||
|
||||
|
|
|
@ -116,3 +116,19 @@
|
|||
16935 17717 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
48 286 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
48 286 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
31 154 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
31 154 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
23 134 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
23 134 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
26 211 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
26 211 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
23 135 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
23 135 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
47 288 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
47 288 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
60 322 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
60 322 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
46 275 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
46 275 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
45 274 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
45 274 0 C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 32b2bd572066f28
|
||||
|
|
2113
build/build.ninja
2113
build/build.ninja
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -417,6 +417,11 @@ if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
|||
include("C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provisioning/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/main/cmake_install.cmake")
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/esp-idf/sw7203/CMakeFiles/__idf_sw7203.dir/sw7203.c.obj
Normal file
BIN
build/esp-idf/sw7203/CMakeFiles/__idf_sw7203.dir/sw7203.c.obj
Normal file
Binary file not shown.
39
build/esp-idf/sw7203/cmake_install.cmake
Normal file
39
build/esp-idf/sw7203/cmake_install.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Install script for directory: C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/include/sw7203
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/CLSH1001")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "TRUE")
|
||||
endif()
|
||||
|
||||
# Set default install directory permissions.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "C:/Users/13684/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-objdump.exe")
|
||||
endif()
|
||||
|
BIN
build/esp-idf/sw7203/libsw7203.a
Normal file
BIN
build/esp-idf/sw7203/libsw7203.a
Normal file
Binary file not shown.
|
@ -63,4 +63,5 @@ C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/spiffs/libs
|
|||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/touch_element/libtouch_element.a
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/usb/libusb.a
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/wifi_provisioning/libwifi_provisioning.a
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/libsw7203.a
|
||||
C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/main/libmain.a
|
||||
|
|
|
@ -63,4 +63,5 @@ $<TARGET_FILE:__idf_spiffs>
|
|||
$<TARGET_FILE:__idf_touch_element>
|
||||
$<TARGET_FILE:__idf_usb>
|
||||
$<TARGET_FILE:__idf_wifi_provisioning>
|
||||
$<TARGET_FILE:__idf_sw7203>
|
||||
$<TARGET_FILE:__idf_main>
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "1.1",
|
||||
"project_name": "CLSH1001",
|
||||
"project_version": "5cf3710-dirty",
|
||||
"project_version": "e91188d-dirty",
|
||||
"project_path": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software",
|
||||
"idf_path": "C:/Users/13684/esp/esp-idf",
|
||||
"build_dir": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build",
|
||||
|
@ -25,8 +25,8 @@
|
|||
"COMPONENT_KCONFIGS_PROJBUILD" : "C:/Users/13684/esp/esp-idf/components/bootloader/Kconfig.projbuild;C:/Users/13684/esp/esp-idf/components/esp_app_format/Kconfig.projbuild;C:/Users/13684/esp/esp-idf/components/esp_rom/Kconfig.projbuild;C:/Users/13684/esp/esp-idf/components/esptool_py/Kconfig.projbuild;C:/Users/13684/esp/esp-idf/components/partition_table/Kconfig.projbuild"
|
||||
},
|
||||
"common_component_reqs": [ "cxx", "newlib", "freertos", "esp_hw_support", "heap", "log", "soc", "hal", "esp_rom", "esp_common", "esp_system", "xtensa" ],
|
||||
"build_components" : [ "app_trace", "app_update", "bootloader", "bootloader_support", "bt", "cmock", "console", "cxx", "driver", "efuse", "esp-tls", "esp_adc", "esp_app_format", "esp_bootloader_format", "esp_coex", "esp_common", "esp_eth", "esp_event", "esp_gdbstub", "esp_hid", "esp_http_client", "esp_http_server", "esp_https_ota", "esp_https_server", "esp_hw_support", "esp_lcd", "esp_local_ctrl", "esp_mm", "esp_netif", "esp_netif_stack", "esp_partition", "esp_phy", "esp_pm", "esp_psram", "esp_ringbuf", "esp_rom", "esp_system", "esp_timer", "esp_wifi", "espcoredump", "esptool_py", "fatfs", "freertos", "hal", "heap", "http_parser", "idf_test", "ieee802154", "json", "log", "lwip", "main", "mbedtls", "mqtt", "newlib", "nvs_flash", "nvs_sec_provider", "openthread", "partition_table", "perfmon", "protobuf-c", "protocomm", "pthread", "sdmmc", "soc", "spi_flash", "spiffs", "tcp_transport", "touch_element", "ulp", "unity", "usb", "vfs", "wear_levelling", "wifi_provisioning", "wpa_supplicant", "xtensa", "" ],
|
||||
"build_component_paths" : [ "C:/Users/13684/esp/esp-idf/components/app_trace", "C:/Users/13684/esp/esp-idf/components/app_update", "C:/Users/13684/esp/esp-idf/components/bootloader", "C:/Users/13684/esp/esp-idf/components/bootloader_support", "C:/Users/13684/esp/esp-idf/components/bt", "C:/Users/13684/esp/esp-idf/components/cmock", "C:/Users/13684/esp/esp-idf/components/console", "C:/Users/13684/esp/esp-idf/components/cxx", "C:/Users/13684/esp/esp-idf/components/driver", "C:/Users/13684/esp/esp-idf/components/efuse", "C:/Users/13684/esp/esp-idf/components/esp-tls", "C:/Users/13684/esp/esp-idf/components/esp_adc", "C:/Users/13684/esp/esp-idf/components/esp_app_format", "C:/Users/13684/esp/esp-idf/components/esp_bootloader_format", "C:/Users/13684/esp/esp-idf/components/esp_coex", "C:/Users/13684/esp/esp-idf/components/esp_common", "C:/Users/13684/esp/esp-idf/components/esp_eth", "C:/Users/13684/esp/esp-idf/components/esp_event", "C:/Users/13684/esp/esp-idf/components/esp_gdbstub", "C:/Users/13684/esp/esp-idf/components/esp_hid", "C:/Users/13684/esp/esp-idf/components/esp_http_client", "C:/Users/13684/esp/esp-idf/components/esp_http_server", "C:/Users/13684/esp/esp-idf/components/esp_https_ota", "C:/Users/13684/esp/esp-idf/components/esp_https_server", "C:/Users/13684/esp/esp-idf/components/esp_hw_support", "C:/Users/13684/esp/esp-idf/components/esp_lcd", "C:/Users/13684/esp/esp-idf/components/esp_local_ctrl", "C:/Users/13684/esp/esp-idf/components/esp_mm", "C:/Users/13684/esp/esp-idf/components/esp_netif", "C:/Users/13684/esp/esp-idf/components/esp_netif_stack", "C:/Users/13684/esp/esp-idf/components/esp_partition", "C:/Users/13684/esp/esp-idf/components/esp_phy", "C:/Users/13684/esp/esp-idf/components/esp_pm", "C:/Users/13684/esp/esp-idf/components/esp_psram", "C:/Users/13684/esp/esp-idf/components/esp_ringbuf", "C:/Users/13684/esp/esp-idf/components/esp_rom", "C:/Users/13684/esp/esp-idf/components/esp_system", "C:/Users/13684/esp/esp-idf/components/esp_timer", "C:/Users/13684/esp/esp-idf/components/esp_wifi", "C:/Users/13684/esp/esp-idf/components/espcoredump", "C:/Users/13684/esp/esp-idf/components/esptool_py", "C:/Users/13684/esp/esp-idf/components/fatfs", "C:/Users/13684/esp/esp-idf/components/freertos", "C:/Users/13684/esp/esp-idf/components/hal", "C:/Users/13684/esp/esp-idf/components/heap", "C:/Users/13684/esp/esp-idf/components/http_parser", "C:/Users/13684/esp/esp-idf/components/idf_test", "C:/Users/13684/esp/esp-idf/components/ieee802154", "C:/Users/13684/esp/esp-idf/components/json", "C:/Users/13684/esp/esp-idf/components/log", "C:/Users/13684/esp/esp-idf/components/lwip", "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/main", "C:/Users/13684/esp/esp-idf/components/mbedtls", "C:/Users/13684/esp/esp-idf/components/mqtt", "C:/Users/13684/esp/esp-idf/components/newlib", "C:/Users/13684/esp/esp-idf/components/nvs_flash", "C:/Users/13684/esp/esp-idf/components/nvs_sec_provider", "C:/Users/13684/esp/esp-idf/components/openthread", "C:/Users/13684/esp/esp-idf/components/partition_table", "C:/Users/13684/esp/esp-idf/components/perfmon", "C:/Users/13684/esp/esp-idf/components/protobuf-c", "C:/Users/13684/esp/esp-idf/components/protocomm", "C:/Users/13684/esp/esp-idf/components/pthread", "C:/Users/13684/esp/esp-idf/components/sdmmc", "C:/Users/13684/esp/esp-idf/components/soc", "C:/Users/13684/esp/esp-idf/components/spi_flash", "C:/Users/13684/esp/esp-idf/components/spiffs", "C:/Users/13684/esp/esp-idf/components/tcp_transport", "C:/Users/13684/esp/esp-idf/components/touch_element", "C:/Users/13684/esp/esp-idf/components/ulp", "C:/Users/13684/esp/esp-idf/components/unity", "C:/Users/13684/esp/esp-idf/components/usb", "C:/Users/13684/esp/esp-idf/components/vfs", "C:/Users/13684/esp/esp-idf/components/wear_levelling", "C:/Users/13684/esp/esp-idf/components/wifi_provisioning", "C:/Users/13684/esp/esp-idf/components/wpa_supplicant", "C:/Users/13684/esp/esp-idf/components/xtensa", "" ],
|
||||
"build_components" : [ "app_trace", "app_update", "bootloader", "bootloader_support", "bt", "cmock", "console", "cxx", "driver", "efuse", "esp-tls", "esp_adc", "esp_app_format", "esp_bootloader_format", "esp_coex", "esp_common", "esp_eth", "esp_event", "esp_gdbstub", "esp_hid", "esp_http_client", "esp_http_server", "esp_https_ota", "esp_https_server", "esp_hw_support", "esp_lcd", "esp_local_ctrl", "esp_mm", "esp_netif", "esp_netif_stack", "esp_partition", "esp_phy", "esp_pm", "esp_psram", "esp_ringbuf", "esp_rom", "esp_system", "esp_timer", "esp_wifi", "espcoredump", "esptool_py", "fatfs", "freertos", "hal", "heap", "http_parser", "idf_test", "ieee802154", "json", "log", "lwip", "main", "mbedtls", "mqtt", "newlib", "nvs_flash", "nvs_sec_provider", "openthread", "partition_table", "perfmon", "protobuf-c", "protocomm", "pthread", "sdmmc", "soc", "spi_flash", "spiffs", "sw7203", "tcp_transport", "touch_element", "ulp", "unity", "usb", "vfs", "wear_levelling", "wifi_provisioning", "wpa_supplicant", "xtensa", "" ],
|
||||
"build_component_paths" : [ "C:/Users/13684/esp/esp-idf/components/app_trace", "C:/Users/13684/esp/esp-idf/components/app_update", "C:/Users/13684/esp/esp-idf/components/bootloader", "C:/Users/13684/esp/esp-idf/components/bootloader_support", "C:/Users/13684/esp/esp-idf/components/bt", "C:/Users/13684/esp/esp-idf/components/cmock", "C:/Users/13684/esp/esp-idf/components/console", "C:/Users/13684/esp/esp-idf/components/cxx", "C:/Users/13684/esp/esp-idf/components/driver", "C:/Users/13684/esp/esp-idf/components/efuse", "C:/Users/13684/esp/esp-idf/components/esp-tls", "C:/Users/13684/esp/esp-idf/components/esp_adc", "C:/Users/13684/esp/esp-idf/components/esp_app_format", "C:/Users/13684/esp/esp-idf/components/esp_bootloader_format", "C:/Users/13684/esp/esp-idf/components/esp_coex", "C:/Users/13684/esp/esp-idf/components/esp_common", "C:/Users/13684/esp/esp-idf/components/esp_eth", "C:/Users/13684/esp/esp-idf/components/esp_event", "C:/Users/13684/esp/esp-idf/components/esp_gdbstub", "C:/Users/13684/esp/esp-idf/components/esp_hid", "C:/Users/13684/esp/esp-idf/components/esp_http_client", "C:/Users/13684/esp/esp-idf/components/esp_http_server", "C:/Users/13684/esp/esp-idf/components/esp_https_ota", "C:/Users/13684/esp/esp-idf/components/esp_https_server", "C:/Users/13684/esp/esp-idf/components/esp_hw_support", "C:/Users/13684/esp/esp-idf/components/esp_lcd", "C:/Users/13684/esp/esp-idf/components/esp_local_ctrl", "C:/Users/13684/esp/esp-idf/components/esp_mm", "C:/Users/13684/esp/esp-idf/components/esp_netif", "C:/Users/13684/esp/esp-idf/components/esp_netif_stack", "C:/Users/13684/esp/esp-idf/components/esp_partition", "C:/Users/13684/esp/esp-idf/components/esp_phy", "C:/Users/13684/esp/esp-idf/components/esp_pm", "C:/Users/13684/esp/esp-idf/components/esp_psram", "C:/Users/13684/esp/esp-idf/components/esp_ringbuf", "C:/Users/13684/esp/esp-idf/components/esp_rom", "C:/Users/13684/esp/esp-idf/components/esp_system", "C:/Users/13684/esp/esp-idf/components/esp_timer", "C:/Users/13684/esp/esp-idf/components/esp_wifi", "C:/Users/13684/esp/esp-idf/components/espcoredump", "C:/Users/13684/esp/esp-idf/components/esptool_py", "C:/Users/13684/esp/esp-idf/components/fatfs", "C:/Users/13684/esp/esp-idf/components/freertos", "C:/Users/13684/esp/esp-idf/components/hal", "C:/Users/13684/esp/esp-idf/components/heap", "C:/Users/13684/esp/esp-idf/components/http_parser", "C:/Users/13684/esp/esp-idf/components/idf_test", "C:/Users/13684/esp/esp-idf/components/ieee802154", "C:/Users/13684/esp/esp-idf/components/json", "C:/Users/13684/esp/esp-idf/components/log", "C:/Users/13684/esp/esp-idf/components/lwip", "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/main", "C:/Users/13684/esp/esp-idf/components/mbedtls", "C:/Users/13684/esp/esp-idf/components/mqtt", "C:/Users/13684/esp/esp-idf/components/newlib", "C:/Users/13684/esp/esp-idf/components/nvs_flash", "C:/Users/13684/esp/esp-idf/components/nvs_sec_provider", "C:/Users/13684/esp/esp-idf/components/openthread", "C:/Users/13684/esp/esp-idf/components/partition_table", "C:/Users/13684/esp/esp-idf/components/perfmon", "C:/Users/13684/esp/esp-idf/components/protobuf-c", "C:/Users/13684/esp/esp-idf/components/protocomm", "C:/Users/13684/esp/esp-idf/components/pthread", "C:/Users/13684/esp/esp-idf/components/sdmmc", "C:/Users/13684/esp/esp-idf/components/soc", "C:/Users/13684/esp/esp-idf/components/spi_flash", "C:/Users/13684/esp/esp-idf/components/spiffs", "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/include/sw7203", "C:/Users/13684/esp/esp-idf/components/tcp_transport", "C:/Users/13684/esp/esp-idf/components/touch_element", "C:/Users/13684/esp/esp-idf/components/ulp", "C:/Users/13684/esp/esp-idf/components/unity", "C:/Users/13684/esp/esp-idf/components/usb", "C:/Users/13684/esp/esp-idf/components/vfs", "C:/Users/13684/esp/esp-idf/components/wear_levelling", "C:/Users/13684/esp/esp-idf/components/wifi_provisioning", "C:/Users/13684/esp/esp-idf/components/wpa_supplicant", "C:/Users/13684/esp/esp-idf/components/xtensa", "" ],
|
||||
"build_component_info" : {
|
||||
"app_trace": {
|
||||
"alias": "idf::app_trace",
|
||||
|
@ -800,7 +800,7 @@
|
|||
"dir": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/main",
|
||||
"type": "LIBRARY",
|
||||
"lib": "__idf_main",
|
||||
"reqs": [ "driver" ],
|
||||
"reqs": [ "driver", "sw7203" ],
|
||||
"priv_reqs": [],
|
||||
"managed_reqs": [],
|
||||
"managed_priv_reqs": [],
|
||||
|
@ -1033,6 +1033,21 @@
|
|||
"sources": [ "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs_api.c", "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs/src/spiffs_cache.c", "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs/src/spiffs_check.c", "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs/src/spiffs_gc.c", "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs/src/spiffs_hydrogen.c", "C:/Users/13684/esp/esp-idf/components/spiffs/spiffs/src/spiffs_nucleus.c", "C:/Users/13684/esp/esp-idf/components/spiffs/esp_spiffs.c" ],
|
||||
"include_dirs": [ "include" ]
|
||||
},
|
||||
"sw7203": {
|
||||
"alias": "idf::sw7203",
|
||||
"target": "___idf_sw7203",
|
||||
"prefix": "idf",
|
||||
"dir": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/include/sw7203",
|
||||
"type": "LIBRARY",
|
||||
"lib": "__idf_sw7203",
|
||||
"reqs": [ "driver" ],
|
||||
"priv_reqs": [],
|
||||
"managed_reqs": [],
|
||||
"managed_priv_reqs": [],
|
||||
"file": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/build/esp-idf/sw7203/libsw7203.a",
|
||||
"sources": [ "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/include/sw7203/sw7203.c" ],
|
||||
"include_dirs": [ "." ]
|
||||
},
|
||||
"tcp_transport": {
|
||||
"alias": "idf::tcp_transport",
|
||||
"target": "___idf_tcp_transport",
|
||||
|
@ -2127,7 +2142,7 @@
|
|||
"prefix": "idf",
|
||||
"dir": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/main",
|
||||
"lib": "__idf_main",
|
||||
"reqs": [ "driver" ],
|
||||
"reqs": [ "driver", "sw7203" ],
|
||||
"priv_reqs": [],
|
||||
"managed_reqs": [],
|
||||
"managed_priv_reqs": [],
|
||||
|
@ -2151,7 +2166,7 @@
|
|||
"prefix": "idf",
|
||||
"dir": "C:/Users/13684/Desktop/esp32/esp32s3/CLSH1001/software/include/sw7203",
|
||||
"lib": "__idf_sw7203",
|
||||
"reqs": [],
|
||||
"reqs": [ "driver" ],
|
||||
"priv_reqs": [],
|
||||
"managed_reqs": [],
|
||||
"managed_priv_reqs": [],
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# idf_component_register(SRCS "sw7203.c"
|
||||
# INCLUDE_DIRS "."
|
||||
# REQUIRES driver)
|
||||
idf_component_register(SRCS "sw7203.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES driver)
|
|
@ -1,20 +1,85 @@
|
|||
|
||||
#include <sw7203.h>
|
||||
#include "driver/i2c.h"
|
||||
#include "driver/i2c_master.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
esp_err_t sw7203_register_read(i2c_port_t i2c_num, uint8_t i2c_addr, uint8_t reg_addr, uint8_t *data, size_t len)
|
||||
{
|
||||
return i2c_master_write_read_device(i2c_num, i2c_addr, ®_addr, 1, data, len, 14000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
esp_err_t sw7203_register_write(i2c_port_t i2c_num, uint8_t i2c_addr, uint8_t reg_addr, uint8_t *data, size_t len)
|
||||
{
|
||||
return i2c_master_write_to_device(i2c_num, i2c_addr, data, len, 14000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
uint8_t sw7203_I2C_address_find(i2c_port_t i2c_num)
|
||||
uint8_t sw7203_I2C_address_find(i2c_master_bus_handle_t I2C_bus_handle)
|
||||
{
|
||||
esp_err_t errcode;
|
||||
errcode = i2c_master_probe(i2c_num, 0x22, -1);
|
||||
}
|
||||
errcode = i2c_master_probe(I2C_bus_handle, sw7203_I2c_0x3C, -1);
|
||||
if (errcode == ESP_OK)
|
||||
{
|
||||
return 0x3C;
|
||||
}
|
||||
errcode = i2c_master_probe(I2C_bus_handle, sw7203_I2c_0x1C, -1);
|
||||
if (errcode == ESP_OK)
|
||||
{
|
||||
return 0x1C;
|
||||
}
|
||||
errcode = i2c_master_probe(I2C_bus_handle, sw7203_I2c_0x18, -1);
|
||||
if (errcode == ESP_OK)
|
||||
{
|
||||
return 0x18;
|
||||
}
|
||||
errcode = i2c_master_probe(I2C_bus_handle, sw7203_I2c_0x38, -1);
|
||||
if (errcode == ESP_OK)
|
||||
{
|
||||
return 0x38;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void sw7203_register_change_bitmask(uint8_t reg_addr, uint8_t data, uint8_t bitmask)
|
||||
{
|
||||
uint8_t original_reg;
|
||||
ESP_ERROR_CHECK(i2c_master_transmit_receive(SW7203_I2C_handle, ®_addr, 1, &original_reg, 1, -1));
|
||||
uint8_t diff = (original_reg ^ data) & bitmask;
|
||||
if (diff)
|
||||
{
|
||||
uint16_t write_data = reg_addr << 8 | (diff ^ original_reg);
|
||||
ESP_ERROR_CHECK(i2c_master_transmit(SW7203_I2C_handle, &write_data, 2, -1));
|
||||
}
|
||||
}
|
||||
|
||||
/* {0x18, 0b00010011},
|
||||
{0x1A, 0b00000011},
|
||||
{0x20, 0b11100111},
|
||||
{0x21, 0b11111111},
|
||||
{0x22, 0b11110000},
|
||||
{0x30, 0b11001111},
|
||||
{0x31, 0b00001111},
|
||||
{0x32, 0b11011111},
|
||||
{0x33, 0b11111111},
|
||||
{0x34, 0b11111111},
|
||||
{0x35, 0b00000111},
|
||||
{0x36, 0b01111111},
|
||||
{0x37, 0b00001111},
|
||||
{0x38, 0b11111111},
|
||||
{0x39, 0b01111111},
|
||||
{0x3A, 0b01111111},
|
||||
{0x40, 0b01000011},
|
||||
{0x41, 0b00011111},
|
||||
{0x42, 0b01111111},
|
||||
{0x42, 0b11111111},
|
||||
{0x44, 0b00000011},*/
|
||||
|
||||
esp_err_t sw7203init(sw7203_config_t *sw7203_config, i2c_master_bus_handle_t I2C_bus_handle, uint8_t I2C_address)
|
||||
{
|
||||
if (I2C_address == -1)
|
||||
{
|
||||
return ESP_ERR_NOT_ALLOWED;
|
||||
}
|
||||
esp_err_t errcode;
|
||||
i2c_device_config_t sw7203_i2c_dev_config = {
|
||||
.dev_addr_length = I2C_ADDR_BIT_LEN_7,
|
||||
.device_address = I2C_address,
|
||||
.scl_speed_hz = 100000};
|
||||
ESP_ERROR_CHECK(errcode = i2c_master_bus_add_device(I2C_bus_handle, &sw7203_i2c_dev_config, &SW7203_I2C_handle));
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[0][0], sw7203_config->connectDetect.hex, SW7203RegAddress_bitmask[0][1]);
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[1][0], sw7203_config->i2cAddress, SW7203RegAddress_bitmask[1][1]);
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[2][0], sw7203_config->funcConfig1.hex, SW7203RegAddress_bitmask[2][1]);
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[3][0], sw7203_config->funcConfig2.hex, SW7203RegAddress_bitmask[3][1]);
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[4][0], sw7203_config->funcConfig3.hex, SW7203RegAddress_bitmask[4][1]);
|
||||
sw7203_register_change_bitmask(SW7203RegAddress_bitmask[5][0], sw7203_config->funcConfig4.hex, SW7203RegAddress_bitmask[5][1]);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
#ifndef __SW7203_H__
|
||||
#define __SW7203_H__
|
||||
|
||||
#include "driver/i2c.h"
|
||||
#include "driver/i2c_master.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
i2c_port_t i2c_num;
|
||||
uint8_t i2c_address;
|
||||
} sw7203_i2c_config;
|
||||
static i2c_master_dev_handle_t SW7203_I2C_handle;
|
||||
int8_t *SW7203_Mutex = NULL;
|
||||
|
||||
typedef union
|
||||
{
|
||||
|
@ -23,10 +20,10 @@ typedef union
|
|||
|
||||
typedef enum
|
||||
{
|
||||
sw7203_I2c_0x3C = 0x3C,
|
||||
sw7203_I2c_0x38 = 0x38,
|
||||
sw7203_I2c_0x1C = 0x1C,
|
||||
sw7203_I2c_0x18 = 0x18
|
||||
sw7203_I2c_0x3C = 0,
|
||||
sw7203_I2c_0x38 = 1,
|
||||
sw7203_I2c_0x1C = 2,
|
||||
sw7203_I2c_0x18 = 3
|
||||
} sw7203_I2C_address_t;
|
||||
|
||||
typedef struct
|
||||
|
@ -40,14 +37,15 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
sw7203_i2c_config i2cHost;
|
||||
sw7203_I2C_address_t i2cAddress;
|
||||
void *Mutex;
|
||||
|
||||
uint16_t chargeVoltage_cV; // 充电目标电压设置 [300,1920] 单位:厘伏(cV)
|
||||
uint8_t trickleVoltage_dV; // 涓流电压设置 [25,132] 单位:分伏(dV)
|
||||
uint8_t chargeVBUSVoltageLimit_dV; // 防拉挂电压设置 [40,200] 单位:分伏(dV)
|
||||
uint8_t chargeVBUSCurrentLimit_5cA; // 充电 VBUS 输入限流设置 [10,137] 单位:五十毫安/五厘安(50mA/5cA)
|
||||
uint8_t chargeVBATCurrentLimit_dA; // 充电 VBAT 输入限流设置 [1,120] 单位:分安(dA)
|
||||
uint8_t chargeLDOCurrentLimit_dA; // LDO 充电电流设置 [1,20] 单位:分安(dA)
|
||||
uint8_t VSYSMinVoltage_2dV; // VSYMIN 电压设置 [15,83] 单位:2分伏(2dV/0.2V)
|
||||
|
||||
union
|
||||
|
@ -325,10 +323,31 @@ typedef struct
|
|||
} trickleConfig; // 涓流电流设置
|
||||
} sw7203_config_t;
|
||||
|
||||
esp_err_t sw7203_register_read(i2c_port_t i2c_num, uint8_t i2c_addr, uint8_t reg_addr, uint8_t *data, size_t len);
|
||||
esp_err_t sw7203_register_write(i2c_port_t i2c_num, uint8_t i2c_addr, uint8_t reg_addr, uint8_t *data, size_t len);
|
||||
uint8_t sw7203_I2C_address_find(i2c_master_bus_handle_t I2C_bus_handle);
|
||||
esp_err_t sw7203init(sw7203_config_t *sw7023_config, i2c_master_bus_handle_t I2C_bus_handle, uint8_t I2C_address);
|
||||
|
||||
uint8_t sw7203_I2C_address_find(i2c_port_t i2c_num);
|
||||
esp_err_t sw7203init(sw7203_config_t *config);
|
||||
const uint8_t SW7203RegAddress_bitmask[][2] = {
|
||||
{0x18, 0b00010011},
|
||||
{0x1A, 0b00000011},
|
||||
{0x20, 0b11100111},
|
||||
{0x21, 0b11111111},
|
||||
{0x22, 0b11110000},
|
||||
{0x30, 0b11001111},
|
||||
{0x31, 0b00001111},
|
||||
{0x32, 0b11011111},
|
||||
{0x33, 0b11111111},
|
||||
{0x34, 0b11111111},
|
||||
{0x35, 0b00000111},
|
||||
{0x36, 0b01111111},
|
||||
{0x37, 0b00001111},
|
||||
{0x38, 0b11111111},
|
||||
{0x39, 0b01111111},
|
||||
{0x3A, 0b01111111},
|
||||
{0x40, 0b01000011},
|
||||
{0x41, 0b00011111},
|
||||
{0x42, 0b01111111},
|
||||
{0x42, 0b11111111},
|
||||
{0x44, 0b00000011},
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,6 +1,6 @@
|
|||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES driver)
|
||||
REQUIRES driver sw7203)
|
||||
|
||||
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "driver/i2c_master.h"
|
||||
#include "esp_log.h"
|
||||
#include <sw7203.h>
|
||||
|
||||
i2c_master_bus_config_t i2c0_mst_config_1 = {
|
||||
.clk_source = I2C_CLK_SRC_DEFAULT,
|
||||
|
|
Loading…
Reference in New Issue
Block a user