I had an application where I needed to read the current counter value. I added this function to the class.
uint32_t DueTimer::getCV(void) const{
uint32_t result;
// Get current timer configuration
Timer t = Timers[timer];
result=TC_ReadCV(t.tc,t.channel);
return result;
}
The addition to the Header file in the public area is
uint32_t getCV(void) const;
I had an application where I needed to read the current counter value. I added this function to the class. uint32_t DueTimer::getCV(void) const{ uint32_t result; // Get current timer configuration Timer t = Timers[timer]; result=TC_ReadCV(t.tc,t.channel); return result; }
The addition to the Header file in the public area is uint32_t getCV(void) const;
It seems to work ok.