EMS/drv/drv_do.c

13 lines
256 B
C

#include"drv_do.h"
void drv_do_write(char *dev, char *value)
{
int devFd = open(dev, O_RDWR);
if(devFd == -1) {
printf("open device failed[%s]\n", dev);
}
else {
write(devFd, value, sizeof(value));
}
close(devFd);
}