Download TIP610-SW-82 - powerbridge.de

Transcript
EXAMPLE
{
int fd;
int result;
T610_RW_BUFFER
...
io_buf;
result = ioctl(fd, T610_IOCG_READ_POL, &io_buf);
if (result >= 0)
{
printf("Polarity Port A: %02Xh\n", io_buf.portA);
printf("Polarity Port B: %02Xh\n", io_buf.portB);
printf("Polarity Port C: %1Xh\n", io_buf.portC);
}
else
{
printf("Read polarity failed --> Error = %d\n", errno);
}
...
}
ERRORS
EFAULT
Invalid pointer to the read buffer.
SEE ALSO
ioctl man pages
TIP610-SW-82 - Linux Device Driver
Page 22 of 28