eg:
int fd = my_custom_syscall_like_functionality_related_to_my_hardware(FLAG_X | FLAG_Y);
int rc = read(fd, ...);
rc = write(fd, ...);
close(fd)
Does this or something similar already exists? I can write kernel modules that add devices and stuff for connected hardware but I only recently learned how to do that so I dont know what I dont know.
“In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; the effect of a call depends completely on the request code. Request codes are often device-specific. For instance, a CD-ROM device driver which can instruct a physical device to eject a disc would provide an ioctl request code to do so.”