Microchip® Advanced Software Framework

hid/device/generic/example/conf_usb.h File Reference

USB configuration file.

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

#include "compiler.h"
#include "udi_hid_generic_conf.h"
#include "main.h"
#include "ui.h"

Macros

#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL
 USB Device Configuration. More...
 
#define USB_DEVICE_PRODUCT_ID   USB_PID_ATMEL_ASF_HIDGENERIC
 
#define USB_DEVICE_MAJOR_VERSION   1
 
#define USB_DEVICE_MINOR_VERSION   0
 
#define USB_DEVICE_POWER   100
 
#define USB_DEVICE_ATTR   (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
 
#define USB_DEVICE_MANUFACTURE_NAME   "ATMEL ASF"
 USB Device string definitions (Optional) More...
 
#define USB_DEVICE_PRODUCT_NAME   "HID Generic"
 
#define UDC_VBUS_EVENT(b_vbus_high)
 Device speeds support. More...
 
#define UDC_SOF_EVENT()   main_sof_action()
 
#define UDC_SUSPEND_EVENT()   main_suspend_action()
 
#define UDC_RESUME_EVENT()   main_resume_action()
 
#define UDC_REMOTEWAKEUP_ENABLE()   main_remotewakeup_enable()
 Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature. More...
 
#define UDC_REMOTEWAKEUP_DISABLE()   main_remotewakeup_disable()
 
#define UDI_HID_GENERIC_ENABLE_EXT()   main_generic_enable()
 When a extra string descriptor must be supported other than manufacturer, product and serial string. More...
 
#define UDI_HID_GENERIC_DISABLE_EXT()   main_generic_disable()
 
#define UDI_HID_GENERIC_REPORT_OUT(ptr)   ui_led_change(ptr)
 
#define UDI_HID_GENERIC_SET_FEATURE(report)   main_hid_set_feature(report)
 
#define UDI_HID_REPORT_IN_SIZE   8
 Sizes of I/O reports. More...
 
#define UDI_HID_REPORT_OUT_SIZE   8
 
#define UDI_HID_REPORT_FEATURE_SIZE   4
 
#define UDI_HID_GENERIC_EP_SIZE   8
 Sizes of I/O endpoints. More...
 

#define UDC_REMOTEWAKEUP_DISABLE ( )    main_remotewakeup_disable()
#define UDC_REMOTEWAKEUP_ENABLE ( )    main_remotewakeup_enable()

Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature.

#define UDC_RESUME_EVENT ( )    main_resume_action()
#define UDC_SOF_EVENT ( )    main_sof_action()
#define UDC_SUSPEND_EVENT ( )    main_suspend_action()
#define UDC_VBUS_EVENT (   b_vbus_high)

Device speeds support.

To define a Low speed device To authorize the High speed USB Device Callbacks definitions (Optional)

#define UDI_HID_GENERIC_DISABLE_EXT ( )    main_generic_disable()

Referenced by udi_hid_generic_disable().

#define UDI_HID_GENERIC_ENABLE_EXT ( )    main_generic_enable()

When a extra string descriptor must be supported other than manufacturer, product and serial string.

USB Interface Configuration Configuration of HID Generic interfaceInterface callback definition

Referenced by udi_hid_generic_enable().

#define UDI_HID_GENERIC_EP_SIZE   8

Sizes of I/O endpoints.

#define UDI_HID_GENERIC_REPORT_OUT (   ptr)    ui_led_change(ptr)
#define UDI_HID_GENERIC_SET_FEATURE (   report)    main_hid_set_feature(report)
#define UDI_HID_REPORT_FEATURE_SIZE   4
#define UDI_HID_REPORT_IN_SIZE   8

Sizes of I/O reports.

Referenced by udi_hid_multi_touch_enable().

#define UDI_HID_REPORT_OUT_SIZE   8
#define USB_DEVICE_MAJOR_VERSION   1
#define USB_DEVICE_MANUFACTURE_NAME   "ATMEL ASF"

USB Device string definitions (Optional)

#define USB_DEVICE_MINOR_VERSION   0
#define USB_DEVICE_POWER   100
#define USB_DEVICE_PRODUCT_ID   USB_PID_ATMEL_ASF_HIDGENERIC
#define USB_DEVICE_PRODUCT_NAME   "HID Generic"
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL

USB Device Configuration.

Device definition (mandatory)