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:
parent
61bcd98539
commit
905f9be573
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue