Skip to content

Commit

Permalink
Merge branch 'bugfix/timeout_error' into 'feature/esp_as_mcu_host'
Browse files Browse the repository at this point in the history
bugfix/timeout_error Fix printing of RPC timeout error

See merge request app-frameworks/esp_hosted!482
  • Loading branch information
mantriyogesh committed Aug 14, 2024
2 parents 8490dfa + a34e58c commit 66d5371
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions host/drivers/rpc/core/rpc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ static ctrl_cmd_t * get_response(int *read_len, ctrl_cmd_t *app_req)
/* Wait for response */
ret = wait_for_sync_response(app_req);
if (ret) {
if (errno == ETIMEDOUT)
ESP_LOGW(TAG, "Resp timedout for req[0x%x]", app_req->msg_id);
if (ret == RET_FAIL_TIMEOUT)
ESP_LOGW(TAG, "Timeout waiting for Resp for Req[0x%x]", app_req->msg_id);
else
ESP_LOGE(TAG, "ERR [%u] ret[%d] for Req[0x%x]", errno, ret, app_req->msg_id);
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion host/port/os_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ int hosted_get_semaphore(void * semaphore_handle, int timeout)
if (sem_acquired == pdTRUE)
return 0;

return RET_FAIL;
return RET_FAIL_TIMEOUT;
}

int hosted_destroy_semaphore(void * semaphore_handle)
Expand Down
1 change: 1 addition & 0 deletions host/port/os_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ enum {
#define RET_INVALID -2
#define RET_FAIL_MEM -3
#define RET_FAIL4 -4
#define RET_FAIL_TIMEOUT -5

/* without alignment */
#define MALLOC(x) malloc(x)
Expand Down
7 changes: 7 additions & 0 deletions host/port/sdio_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,18 @@ int hosted_sdio_card_init(void *ctx)
config.max_freq_khz = H_SDIO_CLOCK_FREQ_KHZ;
ESP_LOGI(TAG, "SDIO master: Data-Lines: %d-bit Freq(KHz)[%u KHz]", H_SDIO_BUS_WIDTH==4? 4:1,
config.max_freq_khz);
#if (H_SDIO_BUS_WIDTH == 4)
ESP_LOGI(TAG, "GPIOs: CLK[%u] CMD[%u] D0[%u] D1[%u] D2[%u] D3[%u] Slave_Reset[%u]",
CONFIG_ESP_SDIO_PIN_CLK, CONFIG_ESP_SDIO_PIN_CMD,
CONFIG_ESP_SDIO_PIN_D0, CONFIG_ESP_SDIO_PIN_D1,
CONFIG_ESP_SDIO_PIN_D2, CONFIG_ESP_SDIO_PIN_D3,
CONFIG_ESP_GPIO_SLAVE_RESET_SLAVE);
#else
ESP_LOGI(TAG, "GPIOs: CLK[%u] CMD[%u] D0[%u] D1[%u] Slave_Reset[%u]",
CONFIG_ESP_SDIO_PIN_CLK, CONFIG_ESP_SDIO_PIN_CMD,
CONFIG_ESP_SDIO_PIN_D0, CONFIG_ESP_SDIO_PIN_D1,
CONFIG_ESP_GPIO_SLAVE_RESET_SLAVE);
#endif
ESP_LOGI(TAG, "Queues: Tx[%u] Rx[%u] SDIO-Rx-Mode[%u]",
CONFIG_ESP_SDIO_TX_Q_SIZE, CONFIG_ESP_SDIO_RX_Q_SIZE,
H_SDIO_HOST_RX_MODE);
Expand Down

0 comments on commit 66d5371

Please sign in to comment.