Page 1 of 1

PCNT - how to dynamically set counter value

Posted: Wed Jun 06, 2018 9:49 pm
by Deouss
Counter control works great however I want to set a specific value at certain event.
I see only resetting counter is possible but how do I set specific value when I want?
I basically want that counter to control more that one variable by switching between them

Re: PCNT - how to dynamically set counter value

Posted: Wed Jun 06, 2018 10:35 pm
by Deouss
I kind of get the idea of using pcnt_counter_clear()
Just clear counter and add to stored value however it would be easier from user point of view to have function
called pcnt_set_counter_value()