You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #include "PWMCtrl.h"
- #include "BoardCfg.h"
-
-
- void PWMSetValue(unsigned int percent)
- {
- if(percent > 100)
- percent = 100;
- #ifdef REVERSE_POLARITY
- percent = 100 - percent;
- #endif
-
- LED_PWM_VAL_REG = ((PWM_RANGE_MAX / 100) * percent);
-
- }
-
- void PWMShutDown()
- {
- PWMSetValue(0);
- }
-
- void PWMSetAbsoluteValue(unsigned int value)
- {
- if(value > PWM_RANGE_MAX)
- {
- value = PWM_RANGE_MAX;
- }
-
- LED_PWM_VAL_REG = value;
-
- }
|