浏览代码

Merge pull request #115 from Faboor/patch-1

Return error from `softPwmCreate` if `pthread_create` fails
pull/117/head
Mark Liffiton 3 年前
committed by GitHub
父节点
当前提交
6a17382a0a
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      wiringPi/softPwm.c

+ 3
- 0
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) ;



正在加载...
取消
保存