You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
521 B
Rust
21 lines
521 B
Rust
pub const TUXEDO_IO_DEVICE_FILE: &str = "/dev/tuxedo_io";
|
|
|
|
pub const IOCTL_MAGIC: u8 = 0xEC;
|
|
|
|
// Clevo interface
|
|
pub const MAGIC_READ_CL: u8 = IOCTL_MAGIC + 1;
|
|
pub const MAGIC_WRITE_CL: u8 = IOCTL_MAGIC + 2;
|
|
|
|
// Uniwill interface
|
|
pub const MAGIC_READ_UW: u8 = IOCTL_MAGIC + 3;
|
|
pub const MAGIC_WRITE_UW: u8 = IOCTL_MAGIC + 4;
|
|
|
|
pub fn open_device_file() -> Result<std::fs::File, std::io::Error> {
|
|
std::fs::OpenOptions::new()
|
|
.read(true)
|
|
.write(true)
|
|
.open(TUXEDO_IO_DEVICE_FILE)
|
|
}
|
|
|
|
fn main() {}
|