mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
ble_mesh: example: Add gpio option for ESP32C3-DevKitC
This commit is contained in:
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -27,6 +27,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
struct _led_state {
|
struct _led_state {
|
||||||
|
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -20,6 +20,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
#define LED_ON 1
|
#define LED_ON 1
|
||||||
|
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -19,6 +19,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
#define LED_ON 1
|
#define LED_ON 1
|
||||||
|
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -19,6 +19,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
#define LED_ON 1
|
#define LED_ON 1
|
||||||
|
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -19,6 +19,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
#define LED_ON 1
|
#define LED_ON 1
|
||||||
|
@@ -2,15 +2,23 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLE_MESH_EXAMPLE_BOARD
|
choice BLE_MESH_EXAMPLE_BOARD
|
||||||
prompt "Board selection for BLE Mesh"
|
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
|
help
|
||||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROOM_32
|
config BLE_MESH_ESP_WROOM_32
|
||||||
bool "ESP32-WROOM-32"
|
bool "ESP32-WROOM-32"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
config BLE_MESH_ESP_WROVER
|
config BLE_MESH_ESP_WROVER
|
||||||
bool "ESP32-WROVER"
|
bool "ESP32-WROVER"
|
||||||
|
depends on IDF_TARGET_ESP32
|
||||||
|
|
||||||
|
config BLE_MESH_ESP32C3_DEV
|
||||||
|
bool "ESP32C3-DevKitC"
|
||||||
|
depends on IDF_TARGET_ESP32C3
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -27,6 +27,10 @@
|
|||||||
#define LED_R GPIO_NUM_0
|
#define LED_R GPIO_NUM_0
|
||||||
#define LED_G GPIO_NUM_2
|
#define LED_G GPIO_NUM_2
|
||||||
#define LED_B GPIO_NUM_4
|
#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
|
#endif
|
||||||
|
|
||||||
struct _led_state {
|
struct _led_state {
|
||||||
|
Reference in New Issue
Block a user