slide: use proc_tools

Origin commit data
------------------
Branch: ni/coolstream
Commit: f7833b6bdd
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-11-23 (Wed, 23 Nov 2022)

Origin message was:
------------------
- slide: use proc_tools

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-11-23 23:54:02 +01:00
parent c7b714377d
commit 60c2b982a3

View File

@@ -27,11 +27,12 @@
#include <neutrino.h>
#include <driver/rcinput.h>
#include <driver/slide.h>
#include <unistd.h>
#include <system/proc_tools.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#define MAX_HEIGHT 576
#define MAX_WIDTH 720
@@ -56,23 +57,6 @@ COSDSlider::~COSDSlider()
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)
{
//printf("setvalue: %d\n",val);