Microchip® Advanced Software Framework

composite/host/example2/ui.h File Reference

Common User Interface for USB host composite application.

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

#include "uhc.h"

Functions

void ui_init (void)
 Initializes the user interface. More...
 
void ui_test_finish (bool b_success)
 Displays the result of the test. More...
 
void ui_test_flag_reset (void)
 Resets the status flag of the test. More...
 
void ui_uhi_hid_mouse_change (uhc_device_t *dev, bool b_plug)
 Notify that a USB device HID has been connected or disconnected. More...
 
void ui_uhi_msc_change (uhc_device_t *dev, bool b_plug)
 Notify that a USB device MSC has been connected or disconnected. More...
 
void ui_usb_connection_event (uhc_device_t *dev, bool b_present)
 Notify that a USB device has been connected or disconnected. More...
 
void ui_usb_enum_event (uhc_device_t *dev, uhc_enum_status_t status)
 Notify the end of a USB device enumeration. More...
 
void ui_usb_mode_change (bool b_host_mode)
 Notify that the USB mode are switched automatically. This is possible only when ID pin is available. More...
 
void ui_usb_sof_event (void)
 Notify that a SOF has been sent (each 1 ms) More...
 
void ui_usb_vbus_change (bool b_vbus_present)
 Notify that a Vbus are changed Available only in USB hardware with Vbus monitoring. More...
 
void ui_usb_vbus_error (void)
 Notify that a Vbus error has occurred Available only in USB hardware with Vbus monitoring. More...
 
void ui_usb_wakeup_event (void)
 Notify that a USB device or the host has wake up the USB line. More...
 
Callback to manage the HID mouse events
void ui_uhi_hid_mouse_btn_left (bool b_state)
 
void ui_uhi_hid_mouse_btn_right (bool b_state)
 
void ui_uhi_hid_mouse_btn_middle (bool b_state)
 
void ui_uhi_hid_mouse_move (int8_t x, int8_t y, int8_t scroll)
 

void ui_init ( void  )

Initializes the user interface.

Referenced by main().

void ui_test_finish ( bool  b_success)

Displays the result of the test.

Parameters
b_successtrue, if the test is successful

Referenced by main().

void ui_test_flag_reset ( void  )

Resets the status flag of the test.

Referenced by main().

void ui_uhi_hid_mouse_btn_left ( bool  b_state)
void ui_uhi_hid_mouse_btn_middle ( bool  b_state)
void ui_uhi_hid_mouse_btn_right ( bool  b_state)
void ui_uhi_hid_mouse_change ( uhc_device_t dev,
bool  b_plug 
)

Notify that a USB device HID has been connected or disconnected.

Parameters
devPointer on USB device information
b_plugtrue, if the device has been connected
void ui_uhi_hid_mouse_move ( int8_t  x,
int8_t  y,
int8_t  scroll 
)
void ui_uhi_msc_change ( uhc_device_t dev,
bool  b_plug 
)

Notify that a USB device MSC has been connected or disconnected.

Parameters
devPointer on USB device information
b_plugtrue, if the device has been connected
void ui_usb_connection_event ( uhc_device_t dev,
bool  b_present 
)

Notify that a USB device has been connected or disconnected.

Parameters
devPointer on USB device information
b_presenttrue, if the device has been connected

Referenced by main_usb_connection_event().

void ui_usb_enum_event ( uhc_device_t dev,
uhc_enum_status_t  status 
)

Notify the end of a USB device enumeration.

Parameters
devPointer on USB device information
statusStatus of the USB enumeration
void ui_usb_mode_change ( bool  b_host_mode)

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

Parameters
b_host_modetrue, if the host mode has been selected
void ui_usb_sof_event ( void  )

Notify that a SOF has been sent (each 1 ms)

Referenced by main_usb_sof_event().

void ui_usb_vbus_change ( bool  b_vbus_present)

Notify that a Vbus are changed Available only in USB hardware with Vbus monitoring.

Parameters
b_vbus_presenttrue, if Vbus is high.
void ui_usb_vbus_error ( void  )

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

void ui_usb_wakeup_event ( void  )

Notify that a USB device or the host has wake up the USB line.