[英]What does this MACRO function do?
This fucntion: 此功能:
FIFO_ELEM_AT(p_fifo, index) ((uint8_t*) ((uint8_t*) p_fifo->elem_array) + (p_fifo->elem_size) * (index))
and "p_fifo" was defined as: 而“ p_fifo”的定义为:
typedef struct
{
void* elem_array;
uint32_t elem_size;
uint32_t array_len;
uint32_t head;
uint32_t tail;
fifo_memcpy memcpy_fptr; /* must be a valid function or NULL */
} fifo_t;
Overall it's trying to do something to a static fifo data structure. 总体而言,它正在尝试对静态fifo数据结构进行处理。 I can't really tell what you can possibly achieve by the calculation described in the function.
我真的无法告诉您通过函数中描述的计算可以实现的目标。 Please help!
请帮忙!
You should read the documentation for the code you are looking at. 您应该阅读正在查看的代码的文档。
Otherwise you are stuck with guessing. 否则,您将无法进行猜测。 You seem to ask for help with guessing.
您似乎在寻求猜测的帮助。
Here are my guesses: 这是我的猜测:
On top of my guesses, here are my opinion-based recommendations: 在我的猜测之上,这是我基于意见的建议:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.