Basic queue help please
Posted: Sat Jul 08, 2023 8:50 am
Hi all,
I'm missing something fundamental here and could do with some help please.
The aim is to get an interrupt writing the current elapsed time to a queue. To do that I'm using xQueueSendFromISR and esp_timer_get_time(). I've included the relevant lines of code below. Any help would be greatly appreciated, thanks.
I'm currently getting errors of:
src/main.c:125:2: error: unterminated argument list invoking macro "xQueueSendFromISR"
src/main.c:39:5: error: 'xQueueSendFromISR' undeclared (first use in this function); did you mean 'xQueueCRSendFromISR'? (This is the xQueueSendFromISR line)
I can't for the life of me see why the argument list is unterminated!
I'm missing something fundamental here and could do with some help please.
The aim is to get an interrupt writing the current elapsed time to a queue. To do that I'm using xQueueSendFromISR and esp_timer_get_time(). I've included the relevant lines of code below. Any help would be greatly appreciated, thanks.
Code: Select all
#include "freertos/queue.h"
#include "esp_timer.h"
QueueHandle_t red_line_queue;
void IRAM_ATTR isr_function( void *arg)
{
xQueueSendFromISR(red_line_queue,esp_timer_get_time(),(TickType_t(0));
}
src/main.c:125:2: error: unterminated argument list invoking macro "xQueueSendFromISR"
src/main.c:39:5: error: 'xQueueSendFromISR' undeclared (first use in this function); did you mean 'xQueueCRSendFromISR'? (This is the xQueueSendFromISR line)
I can't for the life of me see why the argument list is unterminated!