Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add usb mtp #1

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ managed_components
dependencies.lock

# VS Code Settings
.vscode/
.vscode/
31 changes: 31 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,37 @@ menu "ESP CherryUSB"
bool
default y if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3

choice USB_DBG_LEVEL
bool "Default log verbosity"
default USB_DBG_LEVEL_INFO
help
Specify how much output to see in logs by default.
You can set lower verbosity level at runtime using
esp_log_level_set function.

By default, this setting limits which log statements
are compiled into the program. For example, selecting
"Warning" would mean that changing log level to "Debug"
at runtime will not be possible. To allow increasing log
level above the default at runtime, see the next option.

config USB_DBG_LEVEL_ERROR
bool "Error"
config USB_DBG_LEVEL_WARN
bool "Warning"
config USB_DBG_LEVEL_INFO
bool "Info"
config USB_DBG_LEVEL_DEBUG
bool "Debug"
endchoice

config USB_DBG_LEVEL
int
default 0 if USB_DBG_LEVEL_ERROR
default 1 if USB_DBG_LEVEL_WARN
default 2 if USB_DBG_LEVEL_INFO
default 3 if USB_DBG_LEVEL_DEBUG

menuconfig CHERRYUSBD_ENABLED
bool "Enable CherryUSB Device"
depends on CHERRYUSB_SUPPORTED
Expand Down
6 changes: 2 additions & 4 deletions examples/device/cherryusb_device_cdc/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
idf_component_register(SRCS
"device_cdc_main.c"
INCLUDE_DIRS
"."
idf_component_register(SRCS "device_cdc_main.c"
INCLUDE_DIRS "."
)
6 changes: 6 additions & 0 deletions examples/device/cherryusb_device_mtp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(cherryusb_device_mtp)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
idf_component_register(SRCS "esp_mtp.c" "esp_mtp_helper.c"
INCLUDE_DIRS "include"
PRIV_REQUIRES fatfs
)
Loading
Loading