From bcdd470618ad0c9ff2bc152957ae2a18a357fcd0 Mon Sep 17 00:00:00 2001 From: lly Date: Fri, 25 Dec 2020 16:47:39 +0800 Subject: [PATCH] ble_mesh: example: Add gpio option for ESP32C3-DevKitC --- .../fast_prov_server/main/Kconfig.projbuild | 10 +++++++++- .../fast_prov_server/main/board.h | 4 ++++ .../ble_mesh_node/onoff_client/main/Kconfig.projbuild | 10 +++++++++- .../ble_mesh_node/onoff_client/main/board.h | 4 ++++ .../ble_mesh_node/onoff_server/main/Kconfig.projbuild | 10 +++++++++- .../ble_mesh_node/onoff_server/main/board.h | 4 ++++ .../sensor_server/main/Kconfig.projbuild | 10 +++++++++- .../ble_mesh_sensor_model/sensor_server/main/board.h | 4 ++++ .../vendor_server/main/Kconfig.projbuild | 10 +++++++++- .../ble_mesh_vendor_model/vendor_server/main/board.h | 4 ++++ .../ble_mesh_wifi_coexist/main/Kconfig.projbuild | 10 +++++++++- .../esp_ble_mesh/ble_mesh_wifi_coexist/main/board.h | 4 ++++ 12 files changed, 78 insertions(+), 6 deletions(-) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h index 09ebd40075..ec2a5ea8fe 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h @@ -27,6 +27,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif struct _led_state { diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/board.h index 8e125ad328..2c62a26bc6 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/board.h @@ -20,6 +20,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif #define LED_ON 1 diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/board.h index 612714af5c..bcc4582a35 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/board.h @@ -19,6 +19,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif #define LED_ON 1 diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/board.h index 612714af5c..bcc4582a35 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/board.h @@ -19,6 +19,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif #define LED_ON 1 diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/board.h index 612714af5c..bcc4582a35 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/board.h @@ -19,6 +19,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif #define LED_ON 1 diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/Kconfig.projbuild index e48a853e0b..662903d9d0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/Kconfig.projbuild @@ -2,15 +2,23 @@ menu "Example Configuration" choice BLE_MESH_EXAMPLE_BOARD prompt "Board selection for BLE Mesh" - default BLE_MESH_ESP_WROOM_32 + default BLE_MESH_ESP_WROOM_32 if IDF_TARGET_ESP32 + default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3 help Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32 config BLE_MESH_ESP_WROOM_32 bool "ESP32-WROOM-32" + depends on IDF_TARGET_ESP32 config BLE_MESH_ESP_WROVER bool "ESP32-WROVER" + depends on IDF_TARGET_ESP32 + + config BLE_MESH_ESP32C3_DEV + bool "ESP32C3-DevKitC" + depends on IDF_TARGET_ESP32C3 + endchoice endmenu diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/board.h index 09ebd40075..ec2a5ea8fe 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/board.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/board.h @@ -27,6 +27,10 @@ #define LED_R GPIO_NUM_0 #define LED_G GPIO_NUM_2 #define LED_B GPIO_NUM_4 +#elif defined(CONFIG_BLE_MESH_ESP32C3_DEV) +#define LED_R GPIO_NUM_8 +#define LED_G GPIO_NUM_8 +#define LED_B GPIO_NUM_8 #endif struct _led_state {