Pārlūkot izejas kodu
Merge pull request #115 from Faboor/patch-1
Return error from `softPwmCreate` if `pthread_create` fails
pull/117/head
Mark Liffiton
pirms 3 gadiem
committed by
GitHub
vecāks
revīzija
6a17382a0a
Šim parakstam datu bāzē netika atrasta zināma atslēga
GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar
3 papildinājumiem un
0 dzēšanām
-
wiringPi/softPwm.c
|
|
@@ -153,6 +153,9 @@ int softPwmCreate (int pin, int initialValue, int pwmRange) |
|
|
|
newPin = pin ; |
|
|
|
res = pthread_create (&myThread, NULL, softPwmThread, (void *)passPin) ; |
|
|
|
|
|
|
|
if (res != 0) |
|
|
|
return res ; |
|
|
|
|
|
|
|
while (newPin != -1) |
|
|
|
delay (1) ; |
|
|
|
|
|
|
|