-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stm32 pwm complementary channel #1018
Stm32 pwm complementary channel #1018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
fa9b4ce
to
a149573
Compare
885e24d
to
121f4ad
Compare
Github is having some outage right now. CI jobs randomly fail. |
@ser-plu Could you add yourself to the copyright headers in |
Will do. I would also like to add a function isComplementarySignal to the interface. And maybe a couple of functions with Timer properties, like isAdvancedTimer etc. Then I can implement a very generic abstractions, that could use any timer available |
13430c8
to
8fe6fcf
Compare
Guys, could you check the CI here as well? It failed in different places, probably due to Github outages |
I restarted the failed jobs :) The docs-job fails for the same reason as #1017, lets fix the issue over there and rebase this branch later. |
CI is fixed now. |
8fe6fcf
to
8053eda
Compare
Seems to be ready to be merged |
8053eda
to
a3d21e3
Compare
I have seen, that @chris-durand removed a couple of functions, that I had added before ( With this code one could use PWM output like this: using Led1Pwm = PwmChannel<Timer16, GpioOutputB6::Ch1n, SystemClock>;
using MotorControlPwm = PwmChannel<Timer3, GpioOutputA6::Ch1, SystemClock>;
using Dac1OutputPwm = PwmChannel<Timer8, GpioOutputB1::Ch3n, SystemClock>;
using Led2Pwm = PwmChannel<Timer17, GpioOutputA7::Ch1, SystemClock>;
Led1Pwm led1;
MotorControlPwm motor;
Dac1OutputPwm dac1;
Led2Pwm led2;
auto pwm_channels = std::to_array<IPwmChannel* const>({&led1, &motor, &dac1, &led2});
for (auto* chan : pwm_channels) {
chan->Init();
}
while (1) {
for (auto* chan : pwm_channels) {
chan->SetDutyCycle(value);
}
}
I find it more convenient, than writing the same lines for every PWM I need, also thinking every time, whether the Timer has So I suggest to bring my functions back into PR :) |
Oh, I must have messed something up by accident. I only wanted to rebase, sorry. Could you push your changes again? EDIT: I found the terminal from yesterday. I did a |
returned the changes |
#1011
I implemented the fixes only for the G4 family.