qfifo: fix wrong compiler parameter being used
@@ -25,14 +25,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <csp/csp_buffer.h>
#include <csp_autoconfig.h>
-#define QFIFO_LEN 10
-
static csp_static_queue_t qfifo_queue;
static csp_queue_handle_t qfifo_queue_handle;
-char qfifo_queue_buffer[sizeof(csp_qfifo_t) * QFIFO_LEN];
+char qfifo_queue_buffer[sizeof(csp_qfifo_t) * CSP_QFIFO_LEN];
void csp_qfifo_init(void) {
- qfifo_queue_handle = csp_queue_create_static(QFIFO_LEN, sizeof(csp_qfifo_t), qfifo_queue_buffer, &qfifo_queue);
+ qfifo_queue_handle = csp_queue_create_static(CSP_QFIFO_LEN, sizeof(csp_qfifo_t), qfifo_queue_buffer, &qfifo_queue);
}
int csp_qfifo_read(csp_qfifo_t * input) {
@@ -71,7 +69,7 @@ void csp_qfifo_write(csp_packet_t * packet, csp_iface_t * iface, void * pxTaskWo
queue_element.packet = packet;
if (pxTaskWoken == NULL)
- result = csp_queue_enqueue(qfifo_queue_handle, &queue_element, 0);
+ result = csp_queue_enqueue(qfifo_queue_handle, &queue_element, 1);
else
result = csp_queue_enqueue_isr(qfifo_queue_handle, &queue_element, pxTaskWoken);
