Use LS_GREEDY for PWM request

Use LS_GREEDY for PWM request as LS_WEAK will fail if pwm is
already exported.
This commit is contained in:
Sanchayan Maity 2017-05-02 17:25:08 +05:30
parent 61bcd98539
commit 905f9be573

View file

@ -24,7 +24,7 @@ int main(void)
scanf("%d", &pwm_chip_number);
printf("Enter PWM number:\t");
scanf("%d", &pwm_number);
vf_pwm = libsoc_pwm_request(pwm_chip_number, pwm_number, LS_WEAK);
vf_pwm = libsoc_pwm_request(pwm_chip_number, pwm_number, LS_GREEDY);
if (vf_pwm == NULL) {
perror("PWM request failed");
return EXIT_FAILURE;