feat(ble_mesh): Support BLE Mesh Example for esp32c5

This commit is contained in:
luoxu 2024-07-31 17:56:28 +08:00
parent a16d90ac02
commit 5100917b5a
38 changed files with 200 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
#
# light driver config
#
CONFIG_LIGHT_GPIO_RED=4
CONFIG_LIGHT_GPIO_GREEN=5
CONFIG_LIGHT_GPIO_BLUE=6
CONFIG_LIGHT_GPIO_COLD=7
CONFIG_LIGHT_GPIO_WARM=10
# end of light driver config

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -39,6 +39,8 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -38,6 +38,8 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -40,6 +40,10 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
struct _led_state {

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -41,6 +41,10 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -40,6 +40,10 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -32,6 +32,8 @@ extern "C" {
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#endif
#define BUTTON_IO_NUM GPIO_NUM_9

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -32,6 +32,8 @@ extern "C" {
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#endif
#define BUTTON_IO_NUM GPIO_NUM_9

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -32,6 +32,8 @@ extern "C" {
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define BLE_MESH_LED_STRIP_IO GPIO_NUM_8
#endif
#define BUTTON_IO_NUM GPIO_NUM_9

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -40,6 +40,10 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -34,6 +34,10 @@ menu "Example Configuration"
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -40,6 +40,10 @@ extern "C" {
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32C5_DEV
bool "ESP32C5-DevKitC"
depends on IDF_TARGET_ESP32C5
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32C5_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
struct _led_state {

View File

@ -0,0 +1,7 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32c5"
CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n