mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/sdio_slave_gcc11_crash_v5.0' into 'release/v5.0'
sdio_slave: workaround the sdio_slave crash issue with release config + GCC11 (v5.0) See merge request espressif/esp-idf!19790
This commit is contained in:
@ -40,7 +40,7 @@ typedef enum {
|
|||||||
} sdio_ringbuf_pointer_t;
|
} sdio_ringbuf_pointer_t;
|
||||||
|
|
||||||
static esp_err_t sdio_ringbuf_send(sdio_ringbuf_t *buf, esp_err_t (*copy_callback)(uint8_t *, void *), void *arg);
|
static esp_err_t sdio_ringbuf_send(sdio_ringbuf_t *buf, esp_err_t (*copy_callback)(uint8_t *, void *), void *arg);
|
||||||
static inline esp_err_t sdio_ringbuf_recv(sdio_ringbuf_t *buf, uint8_t **start, uint8_t **end, ringbuf_get_all_t get_all);
|
esp_err_t sdio_ringbuf_recv(sdio_ringbuf_t *buf, uint8_t **start, uint8_t **end, ringbuf_get_all_t get_all);
|
||||||
static inline int sdio_ringbuf_return(sdio_ringbuf_t* buf, uint8_t *ptr);
|
static inline int sdio_ringbuf_return(sdio_ringbuf_t* buf, uint8_t *ptr);
|
||||||
|
|
||||||
#define _SEND_DESC_NEXT(x) STAILQ_NEXT(&((sdio_slave_hal_send_desc_t*)x)->dma_desc, qe)
|
#define _SEND_DESC_NEXT(x) STAILQ_NEXT(&((sdio_slave_hal_send_desc_t*)x)->dma_desc, qe)
|
||||||
@ -95,7 +95,12 @@ static esp_err_t sdio_ringbuf_send(sdio_ringbuf_t *buf, esp_err_t (*copy_callbac
|
|||||||
|
|
||||||
// this ringbuf is a return-before-recv-again strategy
|
// this ringbuf is a return-before-recv-again strategy
|
||||||
// since this is designed to be called in the ISR, no parallel logic
|
// since this is designed to be called in the ISR, no parallel logic
|
||||||
static inline esp_err_t sdio_ringbuf_recv(sdio_ringbuf_t *buf, uint8_t **start, uint8_t **end, ringbuf_get_all_t get_all)
|
/*
|
||||||
|
* Workaround for gcc 11. GCC-277. Break the inferring of callers.
|
||||||
|
* This function used to be static inline.
|
||||||
|
*/
|
||||||
|
__attribute__((weak))
|
||||||
|
esp_err_t sdio_ringbuf_recv(sdio_ringbuf_t *buf, uint8_t **start, uint8_t **end, ringbuf_get_all_t get_all)
|
||||||
{
|
{
|
||||||
HAL_ASSERT(buf->free_ptr == buf->read_ptr); //must return before recv again
|
HAL_ASSERT(buf->free_ptr == buf->read_ptr); //must return before recv again
|
||||||
if (start == NULL && end == NULL) return ESP_ERR_INVALID_ARG; // must have a output
|
if (start == NULL && end == NULL) return ESP_ERR_INVALID_ARG; // must have a output
|
||||||
|
Reference in New Issue
Block a user