Skip to content

Commit

Permalink
rmt: force inline LL functions
Browse files Browse the repository at this point in the history
Closes #9487
  • Loading branch information
suda-morris committed Feb 14, 2023
1 parent a75a624 commit a43e796
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 a43e796

Please sign in to comment.