This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF_QUEUE_INTERFACE_DEF

I am following the example at infocenter.nordicsemi.com/index.jsp

The following line is giving me the error "Error[Pe065]: expected a ";":

NRF_QUEUE_INTERFACE_DEF(uint8_t, byte_queue, &m_byte_queue);

I just copied the code from the example in the link above. My code looks like this:

#include "nrf_queue.h"

void test_queue()
{
    NRF_QUEUE_DEF(uint8_t, m_byte_queue, 10, NRF_QUEUE_MODE_NO_OVERFLOW);
    NRF_QUEUE_INTERFACE_DEC(uint8_t, byte_queue);
    NRF_QUEUE_INTERFACE_DEF(uint8_t, byte_queue, &m_byte_queue);
}
  • Aha. I think I misunderstood the whole concept. It should look like this:

    #include "nrf_queue.h"
    
    NRF_QUEUE_DEF(uint8_t, m_byte_queue, 10, NRF_QUEUE_MODE_NO_OVERFLOW);
    
    NRF_QUEUE_INTERFACE_DEC(uint8_t, byte_queue);
    NRF_QUEUE_INTERFACE_DEF(uint8_t, byte_queue, &m_byte_queue)
        
    void test_queue()
    {
     /* .... */
    }
    
Related