Skip to content
Snippets Groups Projects
Commit 559bb877 authored by GIHO KOH's avatar GIHO KOH
Browse files

Update actuator.c

parent 5d2fab43
No related branches found
No related tags found
No related merge requests found
//새 명령 시행 도중에 오면 그 새로운 명령 시행하기
#include <pthread.h> #include <pthread.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
...@@ -555,7 +554,7 @@ static int PWMWriteDutyCycle(int pwmnum, int value) { ...@@ -555,7 +554,7 @@ static int PWMWriteDutyCycle(int pwmnum, int value) {
char path[VALUE_MAX]; char path[VALUE_MAX];
int fd, byte; int fd, byte;
// TODO: Enter the duty_cycle path. // by koh TODO: Enter the duty_cycle path.
snprintf(path, VALUE_MAX, "/sys/class/pwm/pwmchip0/pwm0/duty_cycle", pwmnum); snprintf(path, VALUE_MAX, "/sys/class/pwm/pwmchip0/pwm0/duty_cycle", pwmnum);
fd = open(path, O_WRONLY); fd = open(path, O_WRONLY);
if (-1 == fd) { if (-1 == fd) {
...@@ -573,3 +572,4 @@ static int PWMWriteDutyCycle(int pwmnum, int value) { ...@@ -573,3 +572,4 @@ static int PWMWriteDutyCycle(int pwmnum, int value) {
return (0); return (0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment