git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2419 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
df85f0e666
commit
a7436d9f8f
|
@ -101,6 +101,7 @@ static void pwmpcb(PWMDriver *pwmp) {
|
||||||
operation.*/
|
operation.*/
|
||||||
avg_ch1 = (samples[0] + samples[2] + samples[4] + samples[6]) / 4;
|
avg_ch1 = (samples[0] + samples[2] + samples[4] + samples[6]) / 4;
|
||||||
avg_ch2 = (samples[1] + samples[3] + samples[5] + samples[7]) / 4;
|
avg_ch2 = (samples[1] + samples[3] + samples[5] + samples[7]) / 4;
|
||||||
|
|
||||||
chSysLockFromIsr();
|
chSysLockFromIsr();
|
||||||
|
|
||||||
/* Changes the channels pulse width, the change will be effective
|
/* Changes the channels pulse width, the change will be effective
|
||||||
|
@ -108,6 +109,7 @@ static void pwmpcb(PWMDriver *pwmp) {
|
||||||
pwmEnableChannelI(pwmp, 2, PWM_FRACTION_TO_WIDTH(pwmp, 4096, avg_ch1));
|
pwmEnableChannelI(pwmp, 2, PWM_FRACTION_TO_WIDTH(pwmp, 4096, avg_ch1));
|
||||||
pwmEnableChannelI(pwmp, 3, PWM_FRACTION_TO_WIDTH(pwmp, 4096, avg_ch2));
|
pwmEnableChannelI(pwmp, 3, PWM_FRACTION_TO_WIDTH(pwmp, 4096, avg_ch2));
|
||||||
|
|
||||||
|
|
||||||
/* Starts an asynchronous ADC conversion operation, the conversion
|
/* Starts an asynchronous ADC conversion operation, the conversion
|
||||||
will be executed in parallel to the current PWM cycle and will
|
will be executed in parallel to the current PWM cycle and will
|
||||||
terminate before the next PWM cycle.*/
|
terminate before the next PWM cycle.*/
|
||||||
|
|
Loading…
Reference in New Issue