#include "drv_di.h" 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); }