Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- #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;
-
- }
|