![]() |
m2mb API docs
25.20.008
m2mb API sets documentation
|
USB library implementation. More...
Go to the source code of this file.
Data Structures | |
struct | M2MB_USB_CFG_T |
Macros | |
#define | NULL 0 |
Typedefs | |
typedef void(* | m2mb_usb_ind_callback) (INT32 fd, M2MB_USB_IND_E usb_event, UINT16 resp_size, void *resp_struct, void *userdata) |
typedef struct M2MB_USB_HANDLE_TAG * | M2MB_USB_HANDLE |
Functions | |
INT32 | m2mb_usb_open (const CHAR *path, INT32 flags,...) |
m2mb_usb_open More... | |
INT32 | m2mb_usb_close (INT32 fd) |
m2mb_usb_close More... | |
INT32 | m2mb_usb_ioctl (INT32 fd, INT32 request,...) |
m2mb_usb_ioctl More... | |
SSIZE_T | m2mb_usb_read (INT32 fd, void *buf, SIZE_T nbyte) |
m2mb_usb_read More... | |
SSIZE_T | m2mb_usb_write (INT32 fd, const void *buf, SIZE_T nbyte) |
m2mb_usb_write More... | |
USB library implementation.
m2m/m2m_generic/common/m2mb_inc/m2mb_usb.h
The following functions are implemented: m2mb_usb_ioctl m2mb_usb_open m2mb_usb_read m2mb_usb_write m2mb_usb_close
@notes Dependencies: m2m/m2m_generic/common/m2mb_inc/m2mb_types.h
INT32 m2mb_usb_close | ( | INT32 | fd | ) |
m2mb_usb_close
close a USB device
[in] | fd | file descriptor returned by m2mb_usb_open |
INT32 m2mb_usb_ioctl | ( | INT32 | fd, |
INT32 | request, | ||
... | |||
) |
m2mb_usb_ioctl
configure a USB device
[in] | fd | file descriptor returned by m2mb_usb_open |
[in] | request | required operation (see M2MB_USB_IOCTL_REQUEST) |
[in] | cfg_ptr | pointer to the configuration struct, casted to void* |
INT32 m2mb_usb_open | ( | const CHAR * | path, |
INT32 | flags, | ||
... | |||
) |
m2mb_usb_open
open a USB device
[in] | path | /dev/USB# where # is in decimal format |
[in] | flag | scurrently unused |
[in] | ... |
SSIZE_T m2mb_usb_read | ( | INT32 | fd, |
void * | buf, | ||
SIZE_T | nbyte | ||
) |
m2mb_usb_read
read nbyte Bytes from a USB device into the array pointed to by buf
[in] | fd | file descriptor returned by m2mb_usb_open |
[in] | buf | destination buffer, previously allocated |
[in] | nbyte | length of destination buffer in Bytes |
SSIZE_T m2mb_usb_write | ( | INT32 | fd, |
const void * | buf, | ||
SIZE_T | nbyte | ||
) |
m2mb_usb_write
write nbyte Bytes from the array pointed to by buf to a USB device
[in] | fd | file descriptor returned by m2mb_usb_open |
[in] | buf | source buffer, previously allocated |
[in] | nbyte | length of source buffer in Bytes |