The RMT driver provides a nice function called rmt_write_items() that seems to take care of a lot of housekeeping on our behalf. It takes as a parameter an array of rmt_item32_t and the number of items. The question that occurred to me is:
Do the users of this function have to add the terminator item into the list of explicit items? A terminator item is one with a duration of 0. For example, if I want to send 10 items, I would allocate an array of 5 rmt_item32_t instances and populate them (2 items per rmt_item_32_t). This would then say that I could pass in the array and a size of 10. But wait ... what of the terminator? Am I required to creeate 11 items (to perform 10 items of output) and set the 11th as the terminator or is that done for me by the implementation of rmt_write_items().
And of course ... as I was writing this, yet another new question occurred to me .. for the "item_num" parameter which is the number of items ... I am assuming this is indeed the "number of items" and not the "number of rmt_item32_t" instances?
rmt_write_items - do we need to set the terminator?
rmt_write_items - do we need to set the terminator?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 135 guests