Microchip® Advanced Software Framework

conf_usb.h File Reference

USB configuration file.

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

#include "compiler.h"
#include "udi_hid_mouse.h"
#include "udi_hid_kbd.h"
#include "app_config.h"

Macros

#define USB_PID_ATMEL_ASF_HIDKEYBOARD_MOUSE_MID   0x2436
 USB Device Configuration. More...
 
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL
 
#define USB_DEVICE_PRODUCT_ID   USB_PID_ATMEL_ASF_HIDKEYBOARD_MOUSE_MID
 
#define USB_DEVICE_MAJOR_VERSION   1
 
#define USB_DEVICE_MINOR_VERSION   0
 
#define USB_DEVICE_POWER
 
#define USB_DEVICE_ATTR   (USB_CONFIG_ATTR_REMOTE_WAKEUP | USB_CONFIG_ATTR_SELF_POWERED)
 
#define USB_DEVICE_MANUFACTURE_NAME   "ATMEL ASF"
 
#define USB_DEVICE_PRODUCT_NAME   "HID Mouse, keyboard"
 
#define USB_DEVICE_SERIAL_NAME   "123123123123" /* Disk SN for MSC */
 
#define USB_DEVICE_LOW_SPEED
 Device speeds support. More...
 
#define USB_DEVICE_HS_SUPPORT
 
#define UDC_VBUS_EVENT(b_vbus_high)
 USB Device Callbacks definitions (Optional) More...
 
#define UDC_SOF_EVENT()
 
#define UDC_SUSPEND_EVENT()
 
#define UDC_RESUME_EVENT()
 
#define UDC_REMOTEWAKEUP_ENABLE()
 
#define UDC_REMOTEWAKEUP_DISABLE()
 
#define USB_DEVICE_EP_CTRL_SIZE   8
 USB Device low level configuration When only one interface is used, these configurations are defined by the class module. More...
 
#define USB_DEVICE_NB_INTERFACE   2
 
#define USB_DEVICE_MAX_EP   2
 
#define UDD_BULK_NB_BANK(ep)   ((ep == 5 || ep == 6) ? 1 : 2)
 
#define UDI_HID_MOUSE_ENABLE_EXT()   main_mouse_enable()
 USB Interface Configuration. More...
 
#define UDI_HID_MOUSE_DISABLE_EXT()   main_mouse_disable()
 
#define UDI_HID_MOUSE_EP_IN   (1 | USB_EP_DIR_IN)
 USB HID Mouse low level configuration In standalone these configurations are defined by the HID Mouse module. More...
 
#define UDI_HID_MOUSE_IFACE_NUMBER   0
 
#define UDI_HID_KBD_ENABLE_EXT()   main_kbd_enable()
 Configuration of HID Keyboard interface. More...
 
#define UDI_HID_KBD_DISABLE_EXT()   main_kbd_disable()
 
#define UDI_HID_KBD_CHANGE_LED(value)
 
#define UDI_HID_KBD_EP_IN   (2 | USB_EP_DIR_IN)
 USB HID Keyboard low level configuration In standalone these configurations are defined by the HID Keyboard module. More...
 
#define UDI_HID_KBD_IFACE_NUMBER   1
 
#define UDI_COMPOSITE_DESC_T
 Description of Composite Device. More...
 
#define UDI_COMPOSITE_DESC_FS
 
#define UDI_COMPOSITE_DESC_HS
 
#define UDI_COMPOSITE_API
 

#define UDC_REMOTEWAKEUP_DISABLE ( )
#define UDC_REMOTEWAKEUP_ENABLE ( )
#define UDC_RESUME_EVENT ( )

Referenced by ISR().

#define UDC_SOF_EVENT ( )

Referenced by ISR().

#define UDC_SUSPEND_EVENT ( )

Referenced by ISR().

#define UDC_VBUS_EVENT (   b_vbus_high)

USB Device Callbacks definitions (Optional)

#define UDD_BULK_NB_BANK (   ep)    ((ep == 5 || ep == 6) ? 1 : 2)
#define UDI_COMPOSITE_API
Value:
UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd
Definition: udi_hid_kbd.c:57
UDC_DESC_STORAGE udi_api_t udi_api_hid_mouse
Global structure which contains standard UDI interface for UDC.
Definition: udi_hid_mouse.c:59
#define UDI_COMPOSITE_DESC_FS
Value:
.udi_hid_mouse = UDI_HID_MOUSE_DESC, \
.udi_hid_kbd = UDI_HID_KBD_DESC
#define UDI_HID_MOUSE_DESC
Content of HID mouse interface descriptor for all speed.
Definition: udi_hid_mouse.h:89
#define UDI_HID_KBD_DESC
Definition: udi_hid_kbd.h:85
#define UDI_COMPOSITE_DESC_HS
Value:
.udi_hid_mouse = UDI_HID_MOUSE_DESC, \
.udi_hid_kbd = UDI_HID_KBD_DESC
#define UDI_HID_MOUSE_DESC
Content of HID mouse interface descriptor for all speed.
Definition: udi_hid_mouse.h:89
#define UDI_HID_KBD_DESC
Definition: udi_hid_kbd.h:85
#define UDI_COMPOSITE_DESC_T
Value:
udi_hid_mouse_desc_t udi_hid_mouse; \
udi_hid_kbd_desc_t udi_hid_kbd
Interface descriptor structure for HID mouse.
Definition: udi_hid_mouse.h:68

Description of Composite Device.

#define UDI_HID_KBD_CHANGE_LED (   value)
#define UDI_HID_KBD_DISABLE_EXT ( )    main_kbd_disable()

Referenced by udi_hid_kbd_disable().

#define UDI_HID_KBD_ENABLE_EXT ( )    main_kbd_enable()

Configuration of HID Keyboard interface.

Referenced by udi_hid_kbd_enable().

#define UDI_HID_KBD_EP_IN   (2 | USB_EP_DIR_IN)

USB HID Keyboard low level configuration In standalone these configurations are defined by the HID Keyboard module.

For composite device, these configuration must be defined here

Referenced by udi_hid_kbd_send_report().

#define UDI_HID_KBD_IFACE_NUMBER   1
#define UDI_HID_MOUSE_DISABLE_EXT ( )    main_mouse_disable()

Referenced by udi_hid_mouse_disable().

#define UDI_HID_MOUSE_ENABLE_EXT ( )    main_mouse_enable()

USB Interface Configuration.

Configuration of HID Mouse interface

Referenced by udi_hid_mouse_enable().

#define UDI_HID_MOUSE_EP_IN   (1 | USB_EP_DIR_IN)

USB HID Mouse low level configuration In standalone these configurations are defined by the HID Mouse module.

For composite device, these configuration must be defined here

Referenced by udi_hid_mouse_send_report().

#define UDI_HID_MOUSE_IFACE_NUMBER   0
#define USB_DEVICE_EP_CTRL_SIZE   8

USB Device low level configuration When only one interface is used, these configurations are defined by the class module.

For composite device, these configuration must be defined here

Referenced by ISR(), udd_ctrl_in_sent(), and udd_ctrl_out_received().

#define USB_DEVICE_HS_SUPPORT
#define USB_DEVICE_LOW_SPEED

Device speeds support.

#define USB_DEVICE_MAJOR_VERSION   1
#define USB_DEVICE_MANUFACTURE_NAME   "ATMEL ASF"
#define USB_DEVICE_MAX_EP   2

Referenced by ISR(), udd_enable(), and udd_ep_is_valid().

#define USB_DEVICE_MINOR_VERSION   0
#define USB_DEVICE_NB_INTERFACE   2
#define USB_DEVICE_POWER
Value:
100 /* Consumption on Vbus line (mA)
**/
#define USB_DEVICE_PRODUCT_ID   USB_PID_ATMEL_ASF_HIDKEYBOARD_MOUSE_MID
#define USB_DEVICE_PRODUCT_NAME   "HID Mouse, keyboard"
#define USB_DEVICE_SERIAL_NAME   "123123123123" /* Disk SN for MSC */
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL
#define USB_PID_ATMEL_ASF_HIDKEYBOARD_MOUSE_MID   0x2436

USB Device Configuration.