File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 2727#define PWM_FLAGS 0
2828#endif
2929
30- #define MIN_PERIOD_USEC (USEC_PER_SEC / 128U )
30+ #define MIN_PERIOD_USEC (USEC_PER_SEC / 10240 )
3131#define MAX_PERIOD_USEC USEC_PER_SEC
3232
3333void main (void )
@@ -58,6 +58,7 @@ void main(void)
5858 while (pwm_pin_set_usec (pwm , PWM_CHANNEL ,
5959 max_period , max_period / 2U , PWM_FLAGS )) {
6060 max_period /= 2U ;
61+ printk ("INFO: Try PWM period %u\n" , max_period );
6162 if (max_period < (4U * MIN_PERIOD_USEC )) {
6263 printk ("Error: PWM device "
6364 "does not support a period at least %u\n" ,
Original file line number Diff line number Diff line change 3232 * threshold. The steps should also be small enough, and happen
3333 * quickly enough, to make the output fade change appear continuous.
3434 */
35- #define PERIOD_USEC 20000U
35+ #define PERIOD_USEC 200U
3636#define NUM_STEPS 50U
3737#define STEP_USEC (PERIOD_USEC / NUM_STEPS)
3838#define SLEEP_MSEC 25U
You can’t perform that action at this time.
0 commit comments