use queue static API for adacallback, increase CFG_CALLBACK_QUEUE_LENGTH to 80
This commit is contained in:
1 parent
d81599d619
commit
1189249640
2 files changed
+4
-2
No files matched your search
@@ -37,6 +37,8 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
static QueueHandle_t _cb_queue = NULL;
|
||||
static uint8_t _cb_qbuf[CFG_CALLBACK_QUEUE_LENGTH*sizeof(void*)];
|
||||
static StaticQueue_t _cb_static_q;
|
||||
|
||||
void adafruit_callback_task(void* arg)
|
||||
{
|
||||
@@ -122,7 +124,7 @@ void ada_callback_invoke(const void* malloc_data, uint32_t malloc_len, const voi
|
||||
void ada_callback_init(void)
|
||||
{
|
||||
// queue to hold "Pointer to callback data"
|
||||
_cb_queue = xQueueCreate(CFG_CALLBACK_QUEUE_LENGTH, sizeof(ada_callback_t*));
|
||||
_cb_queue = xQueueCreateStatic(CFG_CALLBACK_QUEUE_LENGTH, sizeof(void*), _cb_qbuf, &_cb_static_q);
|
||||
|
||||
TaskHandle_t callback_task_hdl;
|
||||
xTaskCreate( adafruit_callback_task, "Callback", CFG_CALLBACK_TASK_STACKSIZE, NULL, TASK_PRIO_NORMAL, &callback_task_hdl);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_CALLBACK_QUEUE_LENGTH
|
||||
#define CFG_CALLBACK_QUEUE_LENGTH 40
|
||||
#define CFG_CALLBACK_QUEUE_LENGTH 60
|
||||
#endif
|
||||
|
||||
#ifndef CFG_CALLBACK_TIMEOUT
|
||||
|
||||
Reference in new issue
Block a user