Microchip® Advanced Software Framework

conf_usb_host.h File Reference

USB host configuration file.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"
#include "uhi_cdc.h"
#include "ui.h"
#include "uart.h"
#include "main.h"

Macros

#define USB_HOST_UHI   UHI_CDC
 USB Host Configuration. More...
 
#define USB_HOST_POWER_MAX   500
 
#define USB_HOST_HS_SUPPORT
 
#define UHC_MODE_CHANGE(b_host_mode)   ui_usb_mode_change(b_host_mode)
 USB Host callbacks. More...
 
#define UHC_VBUS_CHANGE(b_present)   ui_usb_vbus_change(b_present)
 
#define UHC_VBUS_ERROR()   ui_usb_vbus_error()
 
#define UHC_CONNECTION_EVENT(dev, b_present)
 
#define UHC_WAKEUP_EVENT()   ui_usb_wakeup_event()
 
#define UHC_SOF_EVENT()   ui_usb_sof_event()
 
#define UHC_ENUM_EVENT(dev, b_status)   ui_usb_enum_event(dev,b_status)
 
#define UHI_CDC_CHANGE(dev, b_plug)
 USB Interface Configuration. More...
 
#define UHI_CDC_RX_NOTIFY()   uart_rx_notify()
 

#define UHC_CONNECTION_EVENT (   dev,
  b_present 
)
Value:
b_present)
void ui_usb_connection_event(uhc_device_t *dev, bool b_present)
Notify that a USB device has been connected or disconnected.
Definition: ui.c:82

To notify that a device has been connected or disconnected.

Referenced by uhc_connection_tree().

#define UHC_ENUM_EVENT (   dev,
  b_status 
)    ui_usb_enum_event(dev,b_status)

Called when a USB device configuration must be chosen. Thus, the application can choose either a configuration number for this device or a configuration number 0 to reject it. If callback not defined the configuration 1 is chosen.

Called when a USB device enumeration is completed.

Referenced by uhc_enumeration_error(), uhc_enumeration_step13(), uhc_enumeration_step14(), and uhc_enumeration_step15().

#define UHC_MODE_CHANGE (   b_host_mode)    ui_usb_mode_change(b_host_mode)

USB Host callbacks.

To notify that the USB mode are switched automatically. This is possible only when ID pin is available.

Referenced by otg_dual_enable(), and otg_id_handler().

#define UHC_SOF_EVENT ( )    ui_usb_sof_event()

Called for each received SOF each 1 ms. Note: Available in High and Full speed mode

Referenced by uhd_sof_interrupt().

#define UHC_VBUS_CHANGE (   b_present)    ui_usb_vbus_change(b_present)

To notify that the Vbus level has changed. Available only in USB hardware with Vbus monitoring.

Referenced by uhd_enable(), and uhd_vbus_handler().

#define UHC_VBUS_ERROR ( )    ui_usb_vbus_error()

To notify that a Vbus error has occurred. Available only in USB hardware with Vbus monitoring.

Referenced by uhd_vberr_handler().

#define UHC_WAKEUP_EVENT ( )    ui_usb_wakeup_event()

Called when a USB device or the host have wake up the USB line.

Referenced by uhc_notify_resume().

#define UHI_CDC_CHANGE (   dev,
  b_plug 
)

USB Interface Configuration.

Configuration of CDC interface

Referenced by uhi_cdc_enable(), and uhi_cdc_uninstall().

#define UHI_CDC_RX_NOTIFY ( )    uart_rx_notify()

Referenced by uhi_cdc_rx_update().

#define USB_HOST_HS_SUPPORT

Authorize the USB HUB support

Authorize the USB host to run in High Speed

#define USB_HOST_POWER_MAX   500

Maximum current allowed on Vbus (mA)

Referenced by uhc_enumeration_step13().

#define USB_HOST_UHI   UHI_CDC

USB Host Configuration.

Array of UHI APIs Define the list of UHI supported by USB host.