ioctl method

  1. @override
int ioctl(
  1. int fd,
  2. int request,
  3. Pointer<Void> argp
)
override

ioctl(2) with a pointer argument.

Implementation

@override
int ioctl(int fd, int request, Pointer<Void> argp) {
  ioctlLog.add(request);
  if (request == GpioIoctl.getChipInfo) return _chipInfo(fd, argp);
  if (request == GpioIoctl.v2GetLineInfo) return _lineInfo(fd, argp);
  if (request == GpioIoctl.v2GetLine) return _getLine(fd, argp);
  if (request == GpioIoctl.v2LineGetValues) return _getValues(fd, argp);
  if (request == GpioIoctl.v2LineSetValues) return _setValues(fd, argp);
  if (request == GpioIoctl.v2LineSetConfig) return _setConfig(fd, argp);
  if (request == GpioIoctl.v2WatchLineInfo) return _watchLineInfo(fd, argp);
  if (request == GpioIoctl.unwatchLineInfo) return _unwatchLineInfo(fd, argp);
  _errno = Errno.enotty;
  return -1;
}