EMS/drv/drv_di.c

14 lines
258 B
C
Raw Normal View History

#include "drv_di.h"
2024-11-12 08:21:37 +08:00
void drv_di_read(char *dev, char *value)
{
int devFd = open(dev, O_RDONLY);
if(devFd == -1) {
printf("open device failed[%s]\n", dev);
}
else {
read(devFd, value, sizeof(value));
}
close(devFd);
}