We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e885ced commit 2d78492Copy full SHA for 2d78492
test/unit-test/test/test_fifo.c
@@ -30,8 +30,10 @@
30
#include "osal/osal.h"
31
#include "tusb_fifo.h"
32
33
-#define FIFO_SIZE 64
34
-TU_FIFO_DEF(tu_ff, FIFO_SIZE, uint8_t, false);
+#define FIFO_SIZE 64
+uint8_t tu_ff_buf[FIFO_SIZE * sizeof(uint8_t)];
35
+tu_fifo_t tu_ff = TU_FIFO_INIT(tu_ff_buf, FIFO_SIZE, uint8_t, false);
36
+
37
tu_fifo_t* ff = &tu_ff;
38
tu_fifo_buffer_info_t info;
39
@@ -68,7 +70,8 @@ void test_normal(void)
68
70
69
71
void test_item_size(void)
72
{
- TU_FIFO_DEF(ff4, FIFO_SIZE, uint32_t, false);
73
+ uint8_t ff4_buf[FIFO_SIZE * sizeof(uint32_t)];
74
+ tu_fifo_t ff4 = TU_FIFO_INIT(ff4_buf, FIFO_SIZE, uint32_t, false);
75
76
uint32_t data4[2*FIFO_SIZE];
77
for(uint32_t i=0; i<sizeof(data4)/4; i++) data4[i] = i;
0 commit comments