- slide: use proc_tools

This commit is contained in:
vanhofen
2022-11-23 23:54:02 +01:00
committed by Thilo Graf
parent 5e4dbf54fd
commit 5f9a39a96b

View File

@@ -27,11 +27,12 @@
#include <neutrino.h> #include <neutrino.h>
#include <driver/rcinput.h> #include <driver/rcinput.h>
#include <driver/slide.h> #include <driver/slide.h>
#include <unistd.h> #include <system/proc_tools.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#define MAX_HEIGHT 576 #define MAX_HEIGHT 576
#define MAX_WIDTH 720 #define MAX_WIDTH 720
@@ -56,23 +57,6 @@ COSDSlider::~COSDSlider()
StopSlide(); StopSlide();
} }
int COSDSlider::proc_put(const char *path, char *value, int len)
{
int ret, ret2;
int pfd = open(path, O_WRONLY);
if (pfd < 0)
return pfd;
ret = write(pfd, value, len);
ret2 = close(pfd);
if (ret2 < 0)
return ret2;
return ret;
}
void COSDSlider::setValue(int val) void COSDSlider::setValue(int val)
{ {
//printf("setvalue: %d\n",val); //printf("setvalue: %d\n",val);