Page 1 of 1

need help on understanding RMT example

Posted: Fri May 10, 2019 12:13 pm
by manoj15

Code: Select all



	 rmt_item32_t* item = (rmt_item32_t*) xRingbufferReceive(rb, &rx_size, 1000);
	 
	 int res = nec_parse_items(item + offset, rx_size / 4 - offset, &rmt_addr, &rmt_cmd);
 
 
understand that rx_size contains the received RMT item length, what is the reason of it to get divide by 4 ?

Re: need help on understanding RMT example

Posted: Thu May 16, 2019 4:31 am
by ESP_houwenxiang
Hi,
A `rmt_item32_t` type element is 4 byte. So the element number is `rx_size / 4`.