4 * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
9 * \brief PWM driver (implementation)
12 * \author Francesco Sacchi <batt@develer.com>
17 *#* Revision 1.1 2005/11/04 18:08:49 bernie
18 *#* Import into DevLib.
20 *#* Revision 1.2 2005/05/24 13:35:01 batt
21 *#* Add missing; reformat.
23 *#* Revision 1.1 2005/05/24 09:17:58 batt
24 *#* Move drivers to top-level.
26 *#* Revision 1.4 2005/05/09 16:36:12 batt
27 *#* Change some function names to accomplish coding standard.
29 *#* Revision 1.3 2005/05/02 16:35:47 batt
30 *#* Add some comments.
32 *#* Revision 1.2 2005/05/02 16:02:58 batt
33 *#* Remove unusefull interrupt saving.
35 *#* Revision 1.1 2005/05/02 12:36:39 batt
42 #include <cfg/macros.h>
45 * Set duty of pwm channel \a dev.
47 void pwm_setDuty(PwmDev dev, pwm_duty_t duty)
49 duty = MIN(duty, (pwm_duty_t)PWM_MAX_DUTY);
51 pwm_hw_setDutyUnlock(dev, duty);
62 IRQ_SAVE_DISABLE(flags);
64 /* set all pwm to 0 */
65 for (dev = 0; dev < PWM_CNT; dev++)