Skip to content

Commit

Permalink
Merge branch 'bugfix/rmt_force_inline_LL_functions_v4.4' into 'releas…
Browse files Browse the repository at this point in the history
…e/v4.4'

rmt: force inline LL functions (v4.4)

See merge request espressif/esp-idf!22370
  • Loading branch information
suda-morris committed Feb 15, 2023
2 parents b78d576 + a43e796 commit 7b41d6c
Show file tree
Hide file tree
Showing 6 changed files with 376 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/driver/rmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,10 +1025,10 @@ esp_err_t rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, int intr
}

#if CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
if (intr_alloc_flags & ESP_INTR_FLAG_IRAM ) {
ESP_LOGE(TAG, "ringbuf ISR functions in flash, but used in IRAM interrupt");
return ESP_ERR_INVALID_ARG;
}
if (intr_alloc_flags & ESP_INTR_FLAG_IRAM ) {
ESP_LOGE(TAG, "ringbuf ISR functions in flash, but used in IRAM interrupt");
return ESP_ERR_INVALID_ARG;
}
#endif

#if !CONFIG_SPIRAM_USE_MALLOC
Expand Down Expand Up @@ -1217,9 +1217,9 @@ esp_err_t rmt_translator_init(rmt_channel_t channel, sample_to_rmt_t fn)
p_rmt_obj[channel]->tx_buf = (rmt_item32_t *)malloc(block_size);
#else
if (p_rmt_obj[channel]->intr_alloc_flags & ESP_INTR_FLAG_IRAM) {
p_rmt_obj[channel]->tx_buf = (rmt_item32_t *)malloc(block_size);
} else {
p_rmt_obj[channel]->tx_buf = (rmt_item32_t *)heap_caps_calloc(1, block_size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
} else {
p_rmt_obj[channel]->tx_buf = (rmt_item32_t *)malloc(block_size);
}
#endif
if (p_rmt_obj[channel]->tx_buf == NULL) {
Expand Down
Loading

0 comments on commit 7b41d6c

Please sign in to comment.