Maybe I'm misunderstanding something about the overall design of this HAL, but this is what I'm struggling with:
I would like to write some code that accepts a generic timer peripheral and then uses it to generate some PWM outputs. The trouble is that methods like FTimer::pwm have private traits in their bounds. I can't use these in my own bounds, so how can I write generic code that calls FTimer::pwm on any timer that supports it?
More generally, there are a number of methods that have private traits as bounds on their types. What is the intended approach if I want to write generic code that calls these methods. Is it just impossible?
Maybe I'm misunderstanding something about the overall design of this HAL, but this is what I'm struggling with:
I would like to write some code that accepts a generic timer peripheral and then uses it to generate some PWM outputs. The trouble is that methods like
FTimer::pwmhave private traits in their bounds. I can't use these in my own bounds, so how can I write generic code that callsFTimer::pwmon any timer that supports it?More generally, there are a number of methods that have private traits as bounds on their types. What is the intended approach if I want to write generic code that calls these methods. Is it just impossible?