projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Init nochmal verkürzt.
[hackover2013-badge-firmware.git]
/
core
/
pwm
/
pwm.c
diff --git
a/core/pwm/pwm.c
b/core/pwm/pwm.c
index
7f1e2e5
..
a27b666
100644
(file)
--- a/
core/pwm/pwm.c
+++ b/
core/pwm/pwm.c
@@
-178,7
+178,7
@@
int pwmSetDutyCycle(uint32_t percentage)
}
/* Set Duty Cycle (MR0) */
}
/* Set Duty Cycle (MR0) */
- TMR_TMR16B1MR0 = (
(pwmPulseWidth * (100 - (pwmDutyCycle = percentage))) / 100) + 1
;
+ TMR_TMR16B1MR0 = (
pwmPulseWidth * (100 - (pwmDutyCycle = percentage))) / 100
;
return 0;
}
return 0;
}
@@
-246,7
+246,7
@@
int pwmSetFrequencyInMicroseconds(uint16_t us)
TMR_TMR16B1MR3 = (pwmPulseWidth = ticks - 1);
/* Adjust Duty Cycle (MR0) */
TMR_TMR16B1MR3 = (pwmPulseWidth = ticks - 1);
/* Adjust Duty Cycle (MR0) */
- TMR_TMR16B1MR0 = (
(pwmPulseWidth * (100 - pwmDutyCycle)) / 100) + 1
;
+ TMR_TMR16B1MR0 = (
pwmPulseWidth * (100 - pwmDutyCycle)) / 100
;
return 0;
}
return 0;
}
This page took
0.029219 seconds
and
4
git commands to generate.