Microchip® Advanced Software Framework

conf_usb.h File Reference

USB configuration file for CDC application.

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

#include "compiler.h"
#include "board.h"
#include "udi_cdc_conf.h"
#include "main.h"

Macros

#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL
 USB Device Configuration. More...
 
#define USB_DEVICE_PRODUCT_ID   0x6124
 
#define USB_DEVICE_MAJOR_VERSION   1
 
#define USB_DEVICE_MINOR_VERSION   0
 
#define USB_DEVICE_POWER   100
 
#define USB_DEVICE_ATTR   (USB_CONFIG_ATTR_SELF_POWERED)
 
#define USB_DEVICE_MANUFACTURE_NAME   "ATMEL ASF"
 USB Device string definitions (Optional) More...
 
#define USB_DEVICE_PRODUCT_NAME   "ATSAM USB to Serial Converter"
 
#define UDC_VBUS_EVENT(b_vbus_high)
 Device speeds support Low speed not supported by CDC. More...
 
#define UDC_SOF_EVENT()
 
#define UDC_SUSPEND_EVENT()
 
#define UDC_RESUME_EVENT()
 
#define UDC_SUSPEND_LPM_EVENT()   main_suspend_lpm_action()
 Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature. More...
 
#define UDC_REMOTEWAKEUP_LPM_ENABLE()   main_remotewakeup_lpm_enable()
 
#define UDC_REMOTEWAKEUP_LPM_DISABLE()   main_remotewakeup_lpm_disable()
 
#define UDI_CDC_PORT_NB   1
 When a extra string descriptor must be supported other than manufacturer, product and serial string. More...
 
#define UDI_CDC_ENABLE_EXT(port)   main_cdc_enable(port)
 Interface callback definition. More...
 
#define UDI_CDC_DISABLE_EXT(port)   main_cdc_disable(port)
 
#define UDI_CDC_RX_NOTIFY(port)   main_cdc_rx_notify(port)
 
#define UDI_CDC_TX_EMPTY_NOTIFY(port)
 
#define UDI_CDC_SET_CODING_EXT(port, cfg)   main_cdc_set_coding(port,cfg)
 
#define UDI_CDC_SET_DTR_EXT(port, set)   main_cdc_set_dtr(port,set)
 
#define UDI_CDC_SET_RTS_EXT(port, set)
 
#define UDI_CDC_DEFAULT_RATE   115200
 Define it when the transfer CDC Device to Host is a low rate (<512000 bauds) to reduce CDC buffers size. More...
 
#define UDI_CDC_DEFAULT_STOPBITS   CDC_STOP_BITS_1
 
#define UDI_CDC_DEFAULT_PARITY   CDC_PAR_NONE
 
#define UDI_CDC_DEFAULT_DATABITS   8
 
#define UDD_CLOCK_GEN   GCLK_GENERATOR_3
 USB Device Driver Configuration. More...
 

#define UDC_REMOTEWAKEUP_LPM_DISABLE ( )    main_remotewakeup_lpm_disable()

Referenced by _usb_device_lpm_suspend().

#define UDC_REMOTEWAKEUP_LPM_ENABLE ( )    main_remotewakeup_lpm_enable()

Referenced by _usb_device_lpm_suspend().

#define UDC_RESUME_EVENT ( )

Referenced by _usb_on_wakeup().

#define UDC_SOF_EVENT ( )

Referenced by _usb_on_sof_notify().

#define UDC_SUSPEND_EVENT ( )

Referenced by _usb_on_suspend().

#define UDC_SUSPEND_LPM_EVENT ( )    main_suspend_lpm_action()

Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature.

Referenced by _usb_device_lpm_suspend().

#define UDC_VBUS_EVENT (   b_vbus_high)

Device speeds support Low speed not supported by CDC.

To authorize the High speed USB Device Callbacks definitions (Optional)

Referenced by _uhd_vbus_handler().

#define UDD_CLOCK_GEN   GCLK_GENERATOR_3

USB Device Driver Configuration.

Referenced by udd_enable().

#define UDI_CDC_DEFAULT_DATABITS   8

Referenced by udi_cdc_comm_enable().

#define UDI_CDC_DEFAULT_PARITY   CDC_PAR_NONE

Referenced by udi_cdc_comm_enable().

#define UDI_CDC_DEFAULT_RATE   115200

Define it when the transfer CDC Device to Host is a low rate (<512000 bauds) to reduce CDC buffers size.

Default configuration of communication port

Referenced by udi_cdc_comm_enable().

#define UDI_CDC_DEFAULT_STOPBITS   CDC_STOP_BITS_1

Referenced by udi_cdc_comm_enable().

#define UDI_CDC_DISABLE_EXT (   port)    main_cdc_disable(port)

Referenced by udi_cdc_data_disable().

#define UDI_CDC_ENABLE_EXT (   port)    main_cdc_enable(port)

Interface callback definition.

Referenced by udi_cdc_comm_enable().

#define UDI_CDC_PORT_NB   1

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

USB Interface Configuration Configuration of CDC interfaceDefine two USB communication ports

Referenced by udi_cdc_comm_enable(), udi_cdc_ctrl_state_change(), udi_cdc_data_enable(), udi_cdc_data_received(), udi_cdc_data_sent(), udi_cdc_data_sof_notify(), udi_cdc_rx_start(), udi_cdc_serial_state_msg_sent(), udi_cdc_setup_to_port(), and udi_cdc_tx_send().

#define UDI_CDC_RX_NOTIFY (   port)    main_cdc_rx_notify(port)

Referenced by udi_cdc_rx_start().

#define UDI_CDC_SET_CODING_EXT (   port,
  cfg 
)    main_cdc_set_coding(port,cfg)
#define UDI_CDC_SET_DTR_EXT (   port,
  set 
)    main_cdc_set_dtr(port,set)

Referenced by udi_cdc_comm_setup().

#define UDI_CDC_SET_RTS_EXT (   port,
  set 
)

Referenced by udi_cdc_comm_setup().

#define UDI_CDC_TX_EMPTY_NOTIFY (   port)

Referenced by udi_cdc_data_sent().

#define USB_DEVICE_ATTR   (USB_CONFIG_ATTR_SELF_POWERED)
#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   0x6124
#define USB_DEVICE_PRODUCT_NAME   "ATSAM USB to Serial Converter"
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL

USB Device Configuration.

Device definition (mandatory)