add ioctl for setting direction of pins