X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/39f1c0c136520a3f4746ad6381d1242979125ff3..deb181ae2c27db872c471a77e85d7190f32962c3:/firmware/usbdrv/usbconfig-prototype.h diff --git a/firmware/usbdrv/usbconfig-prototype.h b/firmware/usbdrv/usbconfig-prototype.h index 6c9e37a82..847710e2a 100644 --- a/firmware/usbdrv/usbconfig-prototype.h +++ b/firmware/usbdrv/usbconfig-prototype.h @@ -1,11 +1,11 @@ /* Name: usbconfig.h - * Project: AVR USB driver + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers * Author: Christian Starkjohann * Creation Date: 2005-04-01 * Tabsize: 4 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 692 2008-11-07 15:07:40Z cs $ + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ #ifndef __usbconfig_h_included__ @@ -14,7 +14,7 @@ /* General Description: This file is an example configuration (with inline documentation) for the USB -driver. It configures AVR-USB for USB D+ connected to Port D bit 2 (which is +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may wire the lines to any other port, as long as D+ is also wired to INT0 (or any other hardware interrupt, as long as it is the highest level interrupt, see @@ -44,11 +44,19 @@ section at the end of this file). * markers every millisecond.] */ #define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in MHz. Legal values are 12000, 12800, 15000, 16000, - * 16500 and 20000. The 12.8 MHz and 16.5 MHz versions of the code require no - * crystal, they tolerate +/- 1% deviation from the nominal frequency. All - * other rates require a precision of 2000 ppm and thus a crystal! - * Default if not specified: 12 MHz +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. */ /* ----------------------- Optional Hardware Config ------------------------ */ @@ -138,6 +146,11 @@ section at the end of this file). * of the macros usbDisableAllRequests() and usbEnableAllRequests() in * usbdrv.h. */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ #define USB_CFG_LONG_TRANSFERS 0 /* Define this to 1 if you want to send/receive blocks of more than 254 bytes * in a single control-in or control-out transfer. Note that the capability @@ -195,24 +208,36 @@ section at the end of this file). /* define this macro to 1 if you want the function usbMeasureFrameLength() * compiled in. This function can be used to calibrate the AVR's RC oscillator. */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ /* -------------------------- Device Description --------------------------- */ -#define USB_CFG_VENDOR_ID 0xc0, 0x16 +#define USB_CFG_VENDOR_ID 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ /* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you use one of obdev's free shared - * VID/PID pairs. Be sure to read USBID-License.txt for rules! - * + This template uses obdev's shared VID/PID pair: 0x16c0/0x5dc. - * + Use this VID/PID pair ONLY if you understand the implications! - */ -#define USB_CFG_DEVICE_ID 0xdc, 0x05 + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID 0xdc, 0x05 /* = 0x05dc = 1500 */ /* This is the ID of the product, low byte first. It is interpreted in the * scope of the vendor ID. If you have registered your own VID with usb.org * or if you have licensed a PID from somebody else, define it here. Otherwise - * you use obdev's free shared VID/PID pair. Be sure to read the rules in - * USBID-License.txt! - * + This template uses obdev's shared VID/PID pair: 0x16c0/0x5dc. - * + Use this VID/PID pair ONLY if you understand the implications! + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! */ #define USB_CFG_DEVICE_VERSION 0x00, 0x01 /* Version number of the device: Minor number first, then major number. @@ -224,14 +249,14 @@ section at the end of this file). * are interpreted as Unicode (UTF-16) entities. * If you don't want a vendor name string, undefine these macros. * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USBID-License.txt for + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for * details. */ #define USB_CFG_DEVICE_NAME 'T', 'e', 'm', 'p', 'l', 'a', 't', 'e' #define USB_CFG_DEVICE_NAME_LEN 8 /* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USBID-License.txt before you assign a name if you - * use a shared VID/PID. + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. */ /*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ /*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ @@ -346,6 +371,6 @@ section at the end of this file). /* #define USB_INTR_ENABLE_BIT INT0 */ /* #define USB_INTR_PENDING GIFR */ /* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR SIG_INTERRUPT0 */ +/* #define USB_INTR_VECTOR INT0_vect */ #endif /* __usbconfig_h_included__ */