Lines Matching refs:data
15 //! * Provide read/write access to out-of-band data related to a device such as configuration
17 //! * Provide a mechanism for performing full-duplex data transfers (for instance, xfer on SPI
25 //! Additionally they may read or write data and therefore need to pass along a data pointer.
36 //! * Size: The size in bytes of the data that will be transferred
37 //! * Direction: Whether there is any data and if it's read, write, or both
74 //! pub unsafe fn spi_read_mode(fd: c_int, data: *mut u8) -> Result<c_int> {
75 //! let res = libc::ioctl(fd, request_code_read!(SPI_IOC_MAGIC, SPI_IOC_TYPE_MODE, mem::size_of::<u8>()), data);
86 //! Writing `ioctl`s generally use pointers as their data source and these should use the
98 //! Some `ioctl`s don't transfer any data, and those should use `ioctl_none!`. This macro
108 //! large number of `ioctl`s and describes their argument data type.
119 //! For example the `TCGETS` `ioctl` reads a `termios` data structure for a given file descriptor.
136 //! pub unsafe fn tcgets(fd: c_int, data: *mut termios) -> Result<c_int>;
181 //! pub unsafe fn spi_message(fd: c_int, data: &mut [spi_ioc_transfer]) -> Result<c_int> {
183 //! request_code_write!(SPI_IOC_MAGIC, SPI_IOC_TYPE_MESSAGE, data.len() * mem::size_of::<spi_ioc_transfer>()),
184 //! data);
271 /// Generates a wrapper function for an ioctl that passes no data to the kernel.
313 /// Generates a wrapper function for a "bad" ioctl that passes no data to the kernel.
353 /// Generates a wrapper function for an ioctl that reads data from the kernel.
360 /// * The data type passed by this ioctl
365 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *mut DATA_TYPE) -> Result<libc::c_int>
384 data: *mut $ty)
386 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_read!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
391 /// Generates a wrapper function for a "bad" ioctl that reads data from the kernel.
397 /// * The data type passed by this ioctl
402 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *mut DATA_TYPE) -> Result<libc::c_int>
420 data: *mut $ty)
422 convert_ioctl_res!($crate::libc::ioctl(fd, $nr as $crate::sys::ioctl::ioctl_num_type, data))
427 /// Generates a wrapper function for an ioctl that writes data through a pointer to the kernel.
434 /// * The data type passed by this ioctl
439 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *const DATA_TYPE) -> Result<libc::c_int>
457 data: *const $ty)
459 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_write!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
464 /// Generates a wrapper function for a "bad" ioctl that writes data through a pointer to the kernel.
470 /// * The data type passed by this ioctl
475 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *const DATA_TYPE) -> Result<libc::c_int>
493 data: *const $ty)
495 convert_ioctl_res!($crate::libc::ioctl(fd, $nr as $crate::sys::ioctl::ioctl_num_type, data))
513 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: nix::sys::ioctl::ioctl_param_type) -> Result<libc::c_int>
534 data: $crate::sys::ioctl::ioctl_param_type)
536 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_write_int!($ioty, $nr) as $crate::sys::ioctl::ioctl_num_type, data))
552 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: nix::sys::ioctl::ioctl_param_type) -> Result<libc::c_int>
575 data: $crate::sys::ioctl::ioctl_param_type)
577 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_write!($ioty, $nr, ::std::mem::size_of::<$crate::libc::c_int>()) as $crate::sys::ioctl::ioctl_num_type, data))
594 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: libc::c_int) -> Result<libc::c_int>
619 data: $crate::libc::c_int)
621 convert_ioctl_res!($crate::libc::ioctl(fd, $nr as $crate::sys::ioctl::ioctl_num_type, data))
626 /// Generates a wrapper function for an ioctl that reads and writes data to the kernel.
633 /// * The data type passed by this ioctl
638 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *mut DATA_TYPE) -> Result<libc::c_int>
656 data: *mut $ty)
658 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_readwrite!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
663 /// Generates a wrapper function for a "bad" ioctl that reads and writes data to the kernel.
669 /// * The data type passed by this ioctl
674 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *mut DATA_TYPE) -> Result<libc::c_int>
684 data: *mut $ty)
686 convert_ioctl_res!($crate::libc::ioctl(fd, $nr as $crate::sys::ioctl::ioctl_num_type, data))
698 /// * The data type passed by this ioctl
703 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: &mut [DATA_TYPE]) -> Result<libc::c_int>
713 data: &mut [$ty])
715 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_read!($ioty, $nr, data.len() * ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
727 /// * The data type passed by this ioctl
732 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: &[DATA_TYPE]) -> Result<libc::c_int>
752 data: &[$ty])
754 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_write!($ioty, $nr, data.len() * ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
766 /// * The data type passed by this ioctl
771 /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: &mut [DATA_TYPE]) -> Result<libc::c_int>
781 data: &mut [$ty])
783 convert_ioctl_res!($crate::libc::ioctl(fd, request_code_readwrite!($ioty, $nr, data.len() * ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))