Skip to content

Commit

Permalink
fix compilation errors for other esp examples on esp32c3
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Nov 12, 2021
1 parent b8f2e6b commit d262902
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/ipv6only-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ void UdpReceiver(void * pvParameters)
if (select_err < 0)
continue;

n = recvfrom(sockfd, buf, kUdpBufferSize, 0, reinterpret_cast<struct sockaddr *>(&clientaddr), &clientlen);
n = recvfrom(sockfd, buf, kUdpBufferSize, 0, reinterpret_cast<struct sockaddr *>(&clientaddr),
reinterpret_cast<socklen_t*>(&clientlen));
if (n < 0)
continue;
// Echo back
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
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 d262902

Please sign in to comment.