esp32-TIC/test_cpu/cpu_test_harness.c

31 lines
843 B
C

#include <stdlib.h>
#include <stdio.h>
#include "cpu_test_harness.h"
#include "tic.h"
QueueHandle_t xQueueCreate(int a, int b) {
return NULL;
}
void vQueueDelete(QueueHandle_t _) {}
int uxQueueSpacesAvailable(QueueHandle_t _) {
return 1;
}
void xQueueSend(QueueHandle_t _, void* elt, int _b) {
InfoFrame* frame = elt;
printf(">> SENT: Frame with %u groups.\n", frame->group_count);
for(size_t grp_id=0; grp_id < frame->group_count; ++grp_id) {
InfoGroup* grp = frame->groups + grp_id;
printf("Group %02lu: %s %s ", grp_id, grp->label,
(grp->data_type == GROUP_DATA_NUM) ? "num" : "str");
if(grp->data_type == GROUP_DATA_NUM)
printf("%u\n", grp->data.num);
else
printf("%s\n", grp->data.str);
}
tic_delete_frame(frame);
free(frame);
}