An Old Timer's Tears [FWT-243]#125
Conversation
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
… and after a CAN interrupt. This is mainly so that we can make sure CAN interrupts can be made threadsafe for the rtos by calling some threadx methods before the interrupt.
…e name of the struct.
As far as I know (from looking through the files), CAN, Timer, and RTC all look like they are now supported by F4. Please correct me if I am wrong! Also, is CANopen automatically supported if CAN is now supported?
aclowmclaughlin
left a comment
There was a problem hiding this comment.
This is super impressive and it is really well detailed. Everything is really minor and mostly commenting changes.
I really do agree that passing in an extre void* argument in the interrupts is not a significant code burden to implement but will be an incredible boon for the code.
HOWEVER, if there's more overhead to doing that then I'm really predicting, then by all means we should probably have it be a separate request, I'm just thinking that it won't be that big a burden.
| #define F302_TIMER_COUNT 5 | ||
|
|
||
| TIM_HandleTypeDef halTimers[F302_TIMER_COUNT]; | ||
| void (*timerInterruptHandlers[F302_TIMER_COUNT])(void* htim) = {nullptr}; |
There was a problem hiding this comment.
I do kind of agree- I think it is within the scope of the PR and it's pretty significant utility- I can attest firsthand that when you don't have the option to just pass in a void* you have to do weird stuff to work around that.
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Updated the supported timers for each board in the comments on the respective concrete implementations. Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Before this they were being copy and pasted, this should properly inherit. Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
RTCTimer was complaining since setPeriod was pure virtual. Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
it was removed while people were testing Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
TimerClockDivision, and TimerCounterMode have been commented. Renamed TimerAutoReloadPreload enum values to better represent that they are BUFFER and NO_BUFFER Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
The docs for these are not complete, many of these options have limited information on the internet, and could 100% benefit from physical trial and error with an EE. Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
aclowmclaughlin
left a comment
There was a problem hiding this comment.
This looks really good to me. Stellar work.
I had a couple of questions but I don't think any of them were important enough to stop me from approving the PR.
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
Refactors timers to use a common core that can be subclassed by other timer like objects (PWM atm).
Additions:
Timer: A.hpponly class that defines what a timer looks like. Also contains the definition forTimerConfiguration.Changes:
TimerF4xxis acpp & hppfile that defines aTimerimplementation for for the F3 boards.TimerF3xxis acpp & hppfile that defines aTimerimplementation for for the F4 boards.ADCF3 & F4: Both now use the new timer implementations.Tested