Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle ESP32:fix compilation errors for other esp examples on esp32c3 #11773

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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