point.start_point = 32;
point.data_count = 1;
ret = ioctl(fd, IOCTL_DIO_OUTPUT, &point);
if (ret < 0)
printf("[ioctl output] no Machigai = %d\n", ret);
|
void DioOutputPoint(int fd, int start, int count); |
/* InfoSysLab11 example-1 */
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "dio_ioctl.h"
int main(void)
{
int fd;
// int i, ret;
// DIO_POINT point;
fd = DioOpen(); // ライブラリ
DioPointReset(fd); // ライブラリ
DioInputPoint(fd, 1, 1); // ライブラリ
DioOutputPoint(fd, 32, 1); // ライブラリ
close(fd);
return 0;
}