|  | WE310F5
    39.00.000
    | 
Header file for USB CDC ACM. More...
Go to the source code of this file.
| Data Structures | |
| struct | M2MB_USB_CB_CFG | 
| union | M2MB_USB_IOCTL | 
| Typedefs | |
| typedef VOID(* | M2MB_USB_CB_T) (VOID *ctx, UINT32 num_bytes, VOID *data) | 
| typedef enum M2MB_USB_CONN_STATUS_E | M2MB_USB_CONN_STATUS | 
| typedef struct M2MB_USB_CB_CFG | M2MB_USB_CB_CFG_T | 
| typedef enum M2MB_USB_IOCTL_REQUEST_E | M2MB_USB_IOCTL_REQUEST | 
| typedef union M2MB_USB_IOCTL | M2MB_USB_IOCTL_T | 
| Functions | |
| INT32 | m2mb_usb_open (HANDLE *pHandle, const char *path, int flags,...) | 
| m2mb_usb_open  More... | |
| SSIZE_T | m2mb_usb_read (HANDLE pHandle, void *buf, size_t nbyte) | 
| m2mb_usb_read  More... | |
| SSIZE_T | m2mb_usb_write (HANDLE pHandle, void *buf, size_t nbyte) | 
| m2mb_usb_write  More... | |
| INT32 | m2mb_usb_close (HANDLE pHandle) | 
| m2mb_usb_close  More... | |
| INT32 | m2mb_usb_ioctl (HANDLE fd, INT32 request, M2MB_USB_IOCTL_T *reqData) | 
| m2mb_usb_ioctl  More... | |
| typedef struct M2MB_USB_CB_CFG M2MB_USB_CB_CFG_T | 
Definition at line 27 of file m2mb_usb.h.
| typedef enum M2MB_USB_CONN_STATUS_E M2MB_USB_CONN_STATUS | 
| typedef enum M2MB_USB_IOCTL_REQUEST_E M2MB_USB_IOCTL_REQUEST | 
| typedef union M2MB_USB_IOCTL M2MB_USB_IOCTL_T | 
| Enumerator | |
|---|---|
| M2MB_USB_STATUS_INIT | |
| M2MB_USB_STATUS_DETACHED | |
| M2MB_USB_STATUS_ATTACHED | |
Definition at line 29 of file m2mb_usb.h.
Definition at line 42 of file m2mb_usb.h.
m2mb_usb_close
close a USB device
| [in] | pHandle | USB handle used in the USB CDC ACM Operation | 
| INT32 m2mb_usb_ioctl | ( | HANDLE | fd, | 
| INT32 | request, | ||
| M2MB_USB_IOCTL_T * | reqData | ||
| ) | 
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* | 
m2mb_usb_open
open a USB device
| [in] | pHandle | USB handle used in the USB CDC ACM Operation | 
| [in] | path | /dev/USB# where # is in decimal format | 
| [in] | flag | if set to M2MB_USB_ASYNC_READ_CB, next argument will be read callback, and so on | 
| [in] | ... | 
m2mb_usb_read
read nbyte Bytes from a USB device into the array pointed to by buf
| [in] | pHandle | USB handle used in the USB CDC ACM Operation | 
| [in] | buf | destination buffer, previously allocated | 
| [in] | nbyte | length of destination buffer in Bytes | 
m2mb_usb_write
write nbyte Bytes from the array pointed to by buf to a USB device
| [in] | pHandle | USB handle used in the USB CDC ACM Operation | 
| [in] | buf | source buffer, previously allocated | 
| [in] | nbyte | length of source buffer in Bytes |