I have an interrupt where I suddenly "know" the new value for a PWM module.
I tried:
Code: Select all
pwmEnableChannel(&PWMD3, chan, data);
I now use:
Code: Select all
PWMD3.tim->CCR[chan] = data;Is there anything I can do to cleanup the code? Do I need to twist myself to pass the new value to the main program and then call pwmEnableChannel?
Solved:
Code: Select all
pwmEnableChannelI (&PWMD3, baddr&3, d);