This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Proper way to define Queue

What is the proper way to use the Queue Library and define a queue that can be used across multiple C files?  I have the following code a my common header

NRF_QUEUE_DEF(uint8_t, m_msg_queue, 36, NRF_QUEUE_MODE_OVERFLOW);
NRF_QUEUE_INTERFACE_DEC(uint8_t, msg_queue);
NRF_QUEUE_INTERFACE_DEF(uint8_t, msg_queue, &m_msg_queue);

I have two source files which have their own headers where each of them include the common header.  When LINKING, i get multiple definition of for the queue.   And yes I have include guards in every *.h  

Related