Skip to content

Commit f0b26ff

Browse files
committed
Update DTX IOCTL interface
1 parent 4e93ad4 commit f0b26ff

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/sys/latch.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ impl Device {
7575
}
7676

7777
pub fn get_opmode(&self) -> Result<OpMode> {
78-
let mut opmode: u32 = 0;
78+
let mut opmode: u16 = 0;
7979
unsafe {
80-
dtx_get_opmode(self.file.as_raw_fd(), &mut opmode as *mut u32)
80+
dtx_get_opmode(self.file.as_raw_fd(), &mut opmode as *mut u16)
8181
.context(ErrorKind::Io)?;
8282
}
8383

@@ -91,8 +91,7 @@ impl Device {
9191
}
9292

9393

94-
ioctl_none!(dtx_latch_lock, 0x11, 0x01);
95-
ioctl_none!(dtx_latch_unlock, 0x11, 0x02);
96-
ioctl_none!(dtx_latch_request, 0x11, 0x03);
97-
ioctl_none!(dtx_latch_open, 0x11, 0x04);
98-
ioctl_read!(dtx_get_opmode, 0x11, 0x05, u32);
94+
ioctl_none!(dtx_latch_lock, 0xa5, 0x23);
95+
ioctl_none!(dtx_latch_unlock, 0xa5, 0x24);
96+
ioctl_none!(dtx_latch_request, 0xa5, 0x25);
97+
ioctl_read!(dtx_get_opmode, 0xa5, 0x2a, u16);

0 commit comments

Comments
 (0)