ivanseidel / ivanseidel/DueTimer
Reading the current counter value
- Dominant language
- C++
- Stars
- 217
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the DueTimer class implementation and its public header declaration, then inspect how the existing Timer and TC_ReadCV calls expose the current counter. Confirm that the public getCV method returns the current counter value for the configured timer channel and that the library still builds with the addition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100