USB configuration file.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
#include "udi_hid_kbd.h"
#include "udi_msc.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_MSC_HIDKEYBOARD |
#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_SELF_POWERED) |
#define | USB_DEVICE_MANUFACTURE_NAME "ATMEL ASF" |
USB Device string definitions (Optional) More... | |
#define | USB_DEVICE_PRODUCT_NAME "HID Keyboard and MSC" |
#define | USB_DEVICE_SERIAL_NAME "123123123123" |
#define | USB_DEVICE_HS_SUPPORT |
Device speeds support. More... | |
#define | UDC_VBUS_EVENT(b_vbus_high) |
USB Device Callbacks definitions (Optional) 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 | USB_DEVICE_EP_CTRL_SIZE 64 |
When a extra string descriptor must be supported other than manufacturer, product and serial string. More... | |
#define | USB_DEVICE_NB_INTERFACE 2 |
Two interfaces for this device (MSC + HID keyboard) More... | |
#define | USB_DEVICE_MAX_EP 3 |
3 endpoints used by HID keyboard and MSC interfaces More... | |
#define | UDI_MSC_GLOBAL_VENDOR_ID 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' ' |
USB Interface Configuration. More... | |
#define | UDI_MSC_GLOBAL_PRODUCT_VERSION '1', '.', '0', '0' |
#define | UDI_MSC_ENABLE_EXT() main_msc_enable() |
Interface callback definition. More... | |
#define | UDI_MSC_DISABLE_EXT() main_msc_disable() |
#define | UDI_MSC_EP_IN (1 | USB_EP_DIR_IN) |
USB MSC low level configuration In standalone these configurations are defined by the MSC module. More... | |
#define | UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT) |
#define | UDI_MSC_IFACE_NUMBER 0 |
Interface number. More... | |
#define | UDI_HID_KBD_ENABLE_EXT() main_keyboard_enable() |
Configuration of HID Keyboard interface. More... | |
#define | UDI_HID_KBD_DISABLE_EXT() main_keyboard_disable() |
#define | UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value) |
#define | UDI_HID_KBD_EP_IN (3 | 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 |
Interface number. More... | |
#define | UDI_COMPOSITE_DESC_T |
Description of Composite Device. More... | |
#define | UDI_COMPOSITE_DESC_FS |
USB Interfaces descriptor value for Full Speed. More... | |
#define | UDI_COMPOSITE_DESC_HS |
USB Interfaces descriptor value for High Speed. More... | |
#define | UDI_COMPOSITE_API |
USB Interface APIs. More... | |
#define UDC_REMOTEWAKEUP_DISABLE | ( | ) | main_remotewakeup_disable() |
Referenced by udc_req_std_dev_clear_feature(), and udc_reset().
#define UDC_REMOTEWAKEUP_ENABLE | ( | ) | main_remotewakeup_enable() |
Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature.
Referenced by udc_req_std_dev_set_feature().
#define UDC_RESUME_EVENT | ( | ) | main_resume_action() |
Referenced by if().
#define UDC_SOF_EVENT | ( | ) | main_sof_action() |
#define UDC_SUSPEND_EVENT | ( | ) | main_suspend_action() |
Referenced by if().
#define UDC_VBUS_EVENT | ( | b_vbus_high | ) |
USB Device Callbacks definitions (Optional)
Referenced by udd_vbus_handler().
#define UDI_COMPOSITE_API |
USB Interface APIs.
#define UDI_COMPOSITE_DESC_FS |
USB Interfaces descriptor value for Full Speed.
#define UDI_COMPOSITE_DESC_HS |
USB Interfaces descriptor value for High Speed.
#define UDI_COMPOSITE_DESC_T |
Description of Composite Device.
USB Interfaces descriptor structure
#define UDI_HID_KBD_CHANGE_LED | ( | value | ) | ui_kbd_led(value) |
Referenced by udi_hid_kbd_setreport_valid().
#define UDI_HID_KBD_DISABLE_EXT | ( | ) | main_keyboard_disable() |
Referenced by udi_hid_kbd_disable().
#define UDI_HID_KBD_ENABLE_EXT | ( | ) | main_keyboard_enable() |
Configuration of HID Keyboard interface.
Interface callback definition
Referenced by udi_hid_kbd_enable().
#define UDI_HID_KBD_EP_IN (3 | 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 hereEndpoint numbers definition
Referenced by udi_hid_kbd_send_report().
#define UDI_HID_KBD_IFACE_NUMBER 1 |
Interface number.
#define UDI_MSC_DISABLE_EXT | ( | ) | main_msc_disable() |
Referenced by udi_msc_disable().
#define UDI_MSC_ENABLE_EXT | ( | ) | main_msc_enable() |
Interface callback definition.
#define UDI_MSC_EP_IN (1 | USB_EP_DIR_IN) |
USB MSC low level configuration In standalone these configurations are defined by the MSC module.
For composite device, these configuration must be defined hereEndpoint numbers definition
Referenced by udi_msc_csw_invalid(), udi_msc_csw_process(), udi_msc_csw_send(), udi_msc_data_send(), udi_msc_setup(), and udi_msc_trans_block().
#define UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT) |
Referenced by udi_msc_cbw_invalid(), udi_msc_cbw_wait(), udi_msc_csw_process(), udi_msc_setup(), and udi_msc_trans_block().
#define UDI_MSC_GLOBAL_PRODUCT_VERSION '1', '.', '0', '0' |
Referenced by udi_msc_spc_inquiry().
#define UDI_MSC_GLOBAL_VENDOR_ID 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' ' |
USB Interface Configuration.
Configuration of MSC interfaceVendor name and Product version of MSC interface
Referenced by udi_msc_spc_inquiry().
#define UDI_MSC_IFACE_NUMBER 0 |
Interface number.
#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED) |
#define USB_DEVICE_EP_CTRL_SIZE 64 |
When a extra string descriptor must be supported other than manufacturer, product and serial string.
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 hereControl endpoint size
Referenced by udd_ctrl_in_sent(), udd_ctrl_out_received(), and udd_reset_ep_ctrl().
#define USB_DEVICE_HS_SUPPORT |
Device speeds support.
To define a Low speed device To authorize the High speed
#define USB_DEVICE_MAJOR_VERSION 1 |
#define USB_DEVICE_MANUFACTURE_NAME "ATMEL ASF" |
USB Device string definitions (Optional)
#define USB_DEVICE_MAX_EP 3 |
3 endpoints used by HID keyboard and MSC interfaces
Referenced by udd_ep_alloc(), udd_ep_clear_halt(), udd_ep_free(), udd_ep_interrupt(), udd_ep_job_table_kill(), udd_ep_job_table_reset(), udd_ep_run(), udd_ep_set_halt(), and udd_ep_wait_stall_clear().
#define USB_DEVICE_MINOR_VERSION 0 |
#define USB_DEVICE_NB_INTERFACE 2 |
Two interfaces for this device (MSC + HID keyboard)
#define USB_DEVICE_POWER 100 |
#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_ASF_MSC_HIDKEYBOARD |
#define USB_DEVICE_PRODUCT_NAME "HID Keyboard and MSC" |
#define USB_DEVICE_SERIAL_NAME "123123123123" |
Referenced by udc_get_string_serial_name().
#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL |
USB Device Configuration.
Device definition (mandatory)