Skip to content

Commit

Permalink
fix compilation errors for other esp examples on esp32c3 (#11716)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and pull[bot] committed Feb 3, 2022
1 parent dad78c8 commit 3455992
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
4 changes: 4 additions & 0 deletions examples/ipv6only-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ make sure the IDF_PATH has been exported(See the manual setup steps above).

$ source ./scripts/activate.sh

- Select IDF Target

$ idf.py set-target esp32(or esp32c3)

- Configuration Options

To choose from the different configuration options, run menuconfig
Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6only-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void UdpReceiver(void * pvParameters)
int optval; // flag value for setsockopt
int n; // message byte size
int sockfd = 0;
unsigned int clientlen; // byte size of client's address
socklen_t clientlen; // byte size of client's address
struct sockaddr_in6 clientaddr; // client addr

while (1)
Expand Down
4 changes: 4 additions & 0 deletions examples/lock-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ make sure the IDF_PATH has been exported(See the manual setup steps above).

$ source ./scripts/activate.sh

- Target Set

$ idf.py set-target esp32(or esp32c3)

- Configuration Options

This application uses `ESP32-DevKitC` as a default device type. To use other
Expand Down
8 changes: 7 additions & 1 deletion examples/lock-app/esp32/main/include/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@
// ---- Lock Example App Config ----

#define APP_TASK_NAME "LOCK-APP"

#if CONFIG_IDF_TARGET_ESP32
#define SYSTEM_STATE_LED GPIO_NUM_25
#define LOCK_STATE_LED GPIO_NUM_26

#define APP_LOCK_BUTTON GPIO_NUM_34
#define APP_FUNCTION_BUTTON GPIO_NUM_35
#elif CONFIG_IDF_TARGET_ESP32C3
#define SYSTEM_STATE_LED GPIO_NUM_8
#define LOCK_STATE_LED GPIO_NUM_9

#define APP_LOCK_BUTTON GPIO_NUM_18
#define APP_FUNCTION_BUTTON GPIO_NUM_19
#endif
#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50

#define APP_BUTTON_PRESSED 0
Expand Down
4 changes: 4 additions & 0 deletions examples/pigweed-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ To download and install packages.

$ source ./scripts/activate.sh

- Target Select

$ idf.py set-target esp32(or esp32c3)

- Configuration Options

To choose from the different configuration options, run menuconfig.
Expand Down
4 changes: 4 additions & 0 deletions examples/temperature-measurement-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ make sure the IDF_PATH has been exported(See the manual setup steps above).

$ source ./scripts/activate.sh

- Target Select

$ idf.py set-target esp32(or esp32c3)

- Configuration Options

This application uses `ESP32-DevKitC` as a default device type. To use other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_WriteThreadNetw

case ThreadNetworkDiagnostics::Attributes::RoutingRole::Id: {
otDeviceRole role = otThreadGetDeviceRole(mOTInst);
err = encoder.Encode(role);
err = encoder.Encode(static_cast<uint8_t>(role));
}
break;

Expand Down

0 comments on commit 3455992

Please sign in to comment.