![]() |
M471M/R1/S BSP V3.01.000
The Board Support Package for M4521
|
USB Host library exported header file. More...
#include "NuMicro.h"
Go to the source code of this file.
Typedefs | |
typedef void() | CONN_FUNC(struct udev_t *udev, int param) |
typedef void() | CDC_CB_FUNC(struct cdc_dev_t *cdev, uint8_t *rdata, int data_len) |
typedef void() | HID_IR_FUNC(struct usbhid_dev *hdev, uint16_t ep_addr, int status, uint8_t *rdata, uint32_t data_len) |
typedef void() | HID_IW_FUNC(struct usbhid_dev *hdev, uint16_t ep_addr, int status, uint8_t *wbuff, uint32_t *data_len) |
typedef int() | UAC_CB_FUNC(struct uac_dev_t *dev, uint8_t *data, int len) |
Functions | |
void | usbh_core_init (void) |
Initialize M471M/R1/S USB Host controller and USB stack. More... | |
int | usbh_pooling_hubs (void) |
Let USB stack polls all root hubs and downstream hubs. If there's any hub port change found, USB stack will manage the hub events in this function call. In this function, USB stack enumerates newly connected devices and remove staff of disconnected devices. User's application should periodically invoke this function. More... | |
void | usbh_install_conn_callback (CONN_FUNC *conn_func, CONN_FUNC *disconn_func) |
Install device connect and disconnect callback function. More... | |
void | usbh_suspend (void) |
Suspend USB Host Controller and devices. More... | |
void | usbh_resume (void) |
Resume USB Host controller and devices. More... | |
struct udev_t * | usbh_find_device (char *hub_id, int port) |
Find the device under the specified hub port. More... | |
uint32_t | get_ticks (void) |
A function return current tick count. More... | |
void | usbh_cdc_init (void) |
Init USB Host CDC driver. More... | |
struct cdc_dev_t * | usbh_cdc_get_device_list (void) |
Get a list of currently connected USB Hid devices. More... | |
HIDDEN_SYMBOLS int32_t | usbh_cdc_set_control_line_state (struct cdc_dev_t *cdev, int active_carrier, int DTE_present) |
SET_CONTROL_LINE_STATE request. More... | |
int32_t | usbh_cdc_start_polling_status (struct cdc_dev_t *cdev, CDC_CB_FUNC *func) |
Start purge the CDC device's interrupt-in transfer pipe. More... | |
int32_t | usbh_cdc_start_to_receive_data (struct cdc_dev_t *cdev, CDC_CB_FUNC *func) |
HIDDEN_SYMBOLS. More... | |
int32_t | usbh_cdc_send_data (struct cdc_dev_t *cdev, uint8_t *buff, int buff_len) |
Send a block of data via CDC device's bulk-out transfer pipe. More... | |
void | usbh_hid_init (void) |
Initialize USB Host HID driver. More... | |
struct usbhid_dev * | usbh_hid_get_device_list (void) |
Get a list of currently connected USB Hid devices. More... | |
int32_t | usbh_hid_get_report_descriptor (struct usbhid_dev *hdev, uint8_t *desc_buf, int buf_max_len) |
int32_t | usbh_hid_get_report (struct usbhid_dev *hdev, int rtp_typ, int rtp_id, uint8_t *data, int len) |
int32_t | usbh_hid_set_report (struct usbhid_dev *hdev, int rtp_typ, int rtp_id, uint8_t *data, int len) |
int32_t | usbh_hid_get_idle (struct usbhid_dev *hdev, int rtp_id, uint8_t *idle_rate) |
int32_t | usbh_hid_set_idle (struct usbhid_dev *hdev, int rtp_id, uint8_t idle_rate) |
int32_t | usbh_hid_get_protocol (struct usbhid_dev *hdev, uint8_t *protocol) |
int32_t | usbh_hid_set_protocol (struct usbhid_dev *hdev, uint8_t protocol) |
int32_t | usbh_hid_start_int_read (struct usbhid_dev *hdev, uint8_t ep_addr, HID_IR_FUNC *func) |
int32_t | usbh_hid_stop_int_read (struct usbhid_dev *hdev, uint8_t ep_addr) |
int32_t | usbh_hid_start_int_write (struct usbhid_dev *hdev, uint8_t ep_addr, HID_IW_FUNC *func) |
int32_t | usbh_hid_stop_int_write (struct usbhid_dev *hdev, uint8_t ep_addr) |
int | usbh_umas_init (void) |
Register and initialize USB Host Mass Storage driver. More... | |
int | usbh_umas_disk_status (int drv_no) |
int | usbh_umas_read (int drv_no, uint32_t sec_no, int sec_cnt, uint8_t *buff) |
int | usbh_umas_write (int drv_no, uint32_t sec_no, int sec_cnt, uint8_t *buff) |
int | usbh_umas_ioctl (int drv_no, int cmd, void *buff) |
HIDDEN_SYMBOLS void | usbh_uac_init (void) |
Initialize USB Audio Class driver. More... | |
int | usbh_uac_open (UAC_DEV_T *uac) |
Open an connected UAC device. More... | |
struct uac_dev_t * | usbh_uac_get_device_list (void) |
Get a list of currently connected USB Audio Class devices. More... | |
int | usbh_uac_get_channel_number (UAC_DEV_T *uac, uint8_t target) |
Obtain Audio Class device's channel number. More... | |
int | usbh_uac_get_bit_resolution (UAC_DEV_T *uac, uint8_t target, uint8_t *byte_cnt) |
Obtain Audio Class device subframe bit resolution.. More... | |
int | usbh_uac_get_sampling_rate (UAC_DEV_T *uac, uint8_t target, uint32_t *srate_list, int max_cnt, uint8_t *type) |
Get a list of sampling rate frequencies supported by the UAC device. More... | |
int | usbh_uac_sampling_rate_control (UAC_DEV_T *uac, uint8_t target, uint8_t req, uint32_t *srate) |
Set sampling rate frequency. More... | |
int | usbh_uac_mute_control (UAC_DEV_T *uac, uint8_t target, uint8_t req, uint16_t chn, uint8_t *mute) |
Control Audio Class device mute on/off. More... | |
int | usbh_uac_vol_control (UAC_DEV_T *uac, uint8_t target, uint8_t req, uint16_t chn, uint16_t *volume) |
Audio Class device volume control. More... | |
int | usbh_uac_auto_gain_control (UAC_DEV_T *uac, uint8_t target, uint8_t req, uint16_t chn, uint8_t *bAGC) |
Audio Class device automatic gain control. More... | |
int | usbh_uac_start_audio_in (UAC_DEV_T *uac, UAC_CB_FUNC *func) |
Start to receive audio data from UAC device. (Microphone) More... | |
int | usbh_uac_stop_audio_in (UAC_DEV_T *uac) |
Stop UAC device audio in data stream. More... | |
int | usbh_uac_start_audio_out (UAC_DEV_T *uac, UAC_CB_FUNC *func) |
Start to transmit audio data to UAC device. (Speaker) More... | |
int | usbh_uac_stop_audio_out (UAC_DEV_T *uac) |
Stop UAC device audio out data stream. More... | |
USB Host library exported header file.
SPDX-License-Identifier: Apache-2.0
Definition in file usbh_lib.h.