xRingbufferReceive only get max size is 256

hdnguyen
Posts: 2
Joined: Tue May 14, 2019 10:15 am

xRingbufferReceive only get max size is 256

Postby hdnguyen » Tue May 14, 2019 10:28 am

I tried playing with below code snippets:

Code: Select all

static void rmt_example_nec_rx_task()
{
    int channel = RMT_RX_CHANNEL;
    nec_rx_init();
    RingbufHandle_t rb = NULL;
    //get RMT RX ringbuffer
    rmt_get_ringbuf_handle(channel, &rb);
    rmt_rx_start(channel, 1);
    while(rb) {
        size_t rx_size = 0;
        //try to receive data from ringbuffer.
        //RMT driver will push all the data it receives to its ringbuffer.
        //We just need to parse the value and return the spaces of ringbuffer.
        rmt_item32_t* item = (rmt_item32_t*) xRingbufferReceive(rb, &rx_size, 1000);
        printf("rx_size %d\n", rx_size);
        if(item) {
            ...
            //after parsing the data, return spaces to ringbuffer.
            vRingbufferReturnItem(rb, (void*) item);
        } else {
            break;
        }
    }
    vTaskDelete(NULL);
}
I'm using a Air conditioner Remote with a 12-byte data frame (96 items), but rx_size is limited to 256 (64 items). Thus, the IR received signal is insufficient.

Who is online

Users browsing this forum: No registered users and 3 guests