-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
77 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# _esp-sub-master_ | ||
|
||
请先使用 esp-idf 插件创建 `.vscode` 文件夹,后设置目标为 `esp32s3 (via builtin USB-JTAG)` | ||
请先使用 esp-idf 插件创建 `.vscode` 文件夹 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
menu "SUB:Bus Interface" | ||
|
||
menu "Interface I2C" | ||
menu "I2C0 Config" | ||
config SUB_ENABLE_I2C0 | ||
bool "Enable interface" | ||
default n | ||
depends on SOC_I2C_SUPPORTED | ||
|
||
if SUB_ENABLE_I2C0 | ||
config SUB_I2C0_SCL_PIN | ||
int "Set SCL pin num" | ||
default 6 | ||
|
||
config SUB_I2C0_SDA_PIN | ||
int "Set SDA pin num" | ||
default 7 | ||
endif | ||
endmenu | ||
|
||
menu "I2C1 Config" | ||
config SUB_ENABLE_I2C1 | ||
bool "Enable interface" | ||
default n | ||
depends on SOC_I2C_SUPPORTED | ||
|
||
if SUB_ENABLE_I2C1 | ||
config SUB_I2C1_SCL_PIN | ||
int "Set SCL pin num" | ||
default 8 | ||
depends on SUB_ENABLE_I2C1 | ||
|
||
config SUB_I2C1_SDA_PIN | ||
int "Set SDA pin num" | ||
default 9 | ||
depends on SUB_ENABLE_I2C1 | ||
endif | ||
endmenu | ||
endmenu | ||
|
||
menu "Interface SPI" | ||
endmenu | ||
|
||
endmenu |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef SUB_INTF_INIT_SPI_H | ||
#define SUB_INTF_INIT_SPI_H | ||
|
||
#include "esp_err.h" | ||
|
||
esp_err_t sub_spi_intf_init(void); | ||
esp_err_t sub_spi_intf_deinit(void); | ||
|
||
#endif |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...onents/sub_interface_init/sub_intf_init.c → components/sub_bus_init/sub_intf_init.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
#include "sub_intf_init.h" | ||
#include "sub_i2c.h" | ||
#include "sub_spi.h" | ||
|
||
esp_err_t sub_all_intf_init(void) | ||
{ | ||
esp_err_t ret = ESP_OK; | ||
ret += sub_i2c_intf_init(); | ||
ret += sub_spi_intf_init(); | ||
return ret; | ||
} | ||
|
||
esp_err_t sub_all_intf_deinit(void) | ||
{ | ||
esp_err_t ret = ESP_OK; | ||
ret += sub_i2c_intf_deinit(); | ||
ret += sub_spi_intf_deinit(); | ||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "driver/spi_master.h" // esp_driver_i2c | ||
#include "sdkconfig.h" | ||
|
||
#include "sub_spi.h" | ||
|
||
esp_err_t sub_spi_intf_init(void) | ||
{ | ||
esp_err_t ret = ESP_OK; | ||
return ret; | ||
} | ||
|
||
esp_err_t sub_spi_intf_deinit(void) | ||
{ | ||
esp_err_t ret = ESP_OK; | ||
return ret; | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
idf_component_register(SRCS "main.c" | ||
INCLUDE_DIRS "." | ||
PRIV_REQUIRES sub_interface_init pca9685 aht30) | ||
PRIV_REQUIRES sub_bus_init pca9685 aht30) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) 5.3.1 Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y | ||
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_n4.csv" | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIRAM_SPEED_80M=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_sub.csv" |