/* Name: usbconfig.h * 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 785 2010-05-30 17:57:07Z cs $ */ #ifndef __usbconfig_h_included__ #define __usbconfig_h_included__ #include "config.h" /* General Description: This file is an example configuration (with inline documentation) for the USB 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 section at the end of this file). */ /* ---------------------------- Hardware Config ---------------------------- */ #define USB_CFG_IOPORTNAME D /* This is the port where the USB bus is connected. When you configure it to * "B", the registers PORTB, PINB and DDRB will be used. */ #define USB_CFG_DMINUS_BIT 3 /* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. * This may be any bit in the port. */ #define USB_CFG_DPLUS_BIT 2 /* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. * This may be any bit in the port. Please note that D+ must also be connected * to interrupt pin INT0! [You can also use other interrupts, see section * "Optional MCU Description" below, or you can connect D- to the interrupt, as * it is required if you use the USB_COUNT_SOF feature. If you use D- for the * interrupt, the USB interrupt will also be triggered at Start-Of-Frame * markers every millisecond.] */ #define USB_CFG_CLOCK_KHZ (F_CPU/1000) /* 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 ------------------------ */ /* #define USB_CFG_PULLUP_IOPORTNAME D */ /* If you connect the 1.5k pullup resistor from D- to a port pin instead of * V+, you can connect and disconnect the device from firmware by calling * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). * This constant defines the port on which the pullup resistor is connected. */ /* #define USB_CFG_PULLUP_BIT 4 */ /* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined * above) where the 1.5k pullup resistor is connected. See description * above for details. */ /* --------------------------- Functional Range ---------------------------- */ #define USB_CFG_HAVE_INTRIN_ENDPOINT 1 /* Define this to 1 if you want to compile a version with two endpoints: The * default control endpoint 0 and an interrupt-in endpoint (any other endpoint * number). */ #define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 /* Define this to 1 if you want to compile a version with three endpoints: The * default control endpoint 0, an interrupt-in endpoint 3 (or the number * configured below) and a catch-all default interrupt-in endpoint as above. * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. */ #define USB_CFG_EP3_NUMBER 3 /* If the so-called endpoint 3 is used, it can now be configured to any other * endpoint number (except 0) with this macro. Default if undefined is 3. */ /* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ /* The above macro defines the startup condition for data toggling on the * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. * Since the token is toggled BEFORE sending any data, the first packet is * sent with the oposite value of this configuration! */ #define USB_CFG_IMPLEMENT_HALT 0 /* Define this to 1 if you also want to implement the ENDPOINT_HALT feature * for endpoint 1 (interrupt endpoint). Although you may not need this feature, * it is required by the standard. We have made it a config option because it * bloats the code considerably. */ #define USB_CFG_SUPPRESS_INTR_CODE 0 /* Define this to 1 if you want to declare interrupt-in endpoints, but don't * want to send any data over them. If this macro is defined to 1, functions * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if * you need the interrupt-in endpoints in order to comply to an interface * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ #define USB_CFG_INTR_POLL_INTERVAL 1 /* If you compile a version with endpoint 1 (interrupt-in), this is the poll * interval. The value is in milliseconds and must not be less than 10 ms for * low speed devices. */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ #define USB_CFG_MAX_BUS_POWER 500 /* Set this variable to the maximum USB bus power consumption of your device. * The value is in milliamperes. [It will be divided by two since USB * communicates power requirements in units of 2 mA.] */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of * bytes. */ #define USB_CFG_IMPLEMENT_FN_READ 0 /* Set this to 1 if you need to send control replies which are generated * "on the fly" when usbFunctionRead() is called. If you only want to send * data from a static buffer, set it to 0 and return the data from * usbFunctionSetup(). This saves a couple of bytes. */ #define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 /* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. * You must implement the function usbFunctionWriteOut() which receives all * interrupt/bulk data sent to any endpoint other than 0. The endpoint number * can be found in 'usbRxToken'. */ #define USB_CFG_HAVE_FLOWCONTROL 0 /* Define this to 1 if you want flowcontrol over USB data. See the definition * 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 * for long transfers increases the driver size. */ /* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ /* This macro is a hook if you want to do unconventional things. If it is * defined, it's inserted at the beginning of received message processing. * If you eat the received message and don't want default processing to * proceed, do a return after doing your things. One possible application * (besides debugging) is to flash a status LED on each packet. */ /* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ /* This macro is a hook if you need to know when an USB RESET occurs. It has * one parameter which distinguishes between the start of RESET state and its * end. */ /* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ /* This macro (if defined) is executed when a
#
# RT3662/RT3883 Profiles
#
define Build/mkrtn56uimg
$(STAGING_DIR_HOST)/bin/mkrtn56uimg $(1) $@
endef
define Device/br-6475nd
DTS := BR-6475ND
BLOCKSIZE := 64k
IMAGE_SIZE := 7744k
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \
append-metadata | check-size $$$$(IMAGE_SIZE)
DEVICE_VENDOR := Edimax
DEVICE_MODEL := BR-6475nD
DEVICE_PACKAGES := swconfig
endef
TARGET_DEVICES += br-6475nd
define Device/cy-swr1100
$(Device/seama)
DTS := CY-SWR1100
BLOCKSIZE := 64k
KERNEL := $(KERNEL_DTB)
SEAMA_SIGNATURE := wrgnd10_samsung_ss815
DEVICE_VENDOR := Samsung
DEVICE_MODEL := CY-SWR1100
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
endef
TARGET_DEVICES += cy-swr1100
define Device/dir-645
$(Device/seama)
DTS := DIR-645
BLOCKSIZE := 4k
KERNEL := $(KERNEL_DTB)
SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-645
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
endef
TARGET_DEVICES += dir-645
define Device/belkin_f9k1109v1
DTS := F9K1109V1
BLOCKSIZE := 64k
DEVICE_VENDOR := Belkin
DEVICE_MODEL := F9K1109
DEVICE_VARIANT := Version 1.0
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
IMAGE_SIZE := 7224k
KERNEL := kernel-bin | append-dtb | lzma -d16 | uImage lzma
# Stock firmware checks for this uImage image name during upload.
UIMAGE_NAME := N750F9K1103VB
endef
TARGET_DEVICES += belkin_f9k1109v1
define Device/hpm
DTS := HPM
BLOCKSIZE := 64k
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Omnima
DEVICE_MODEL := HPM
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
endef
TARGET_DEVICES += hpm
define Device/rt-n56u
DTS := RT-N56U
BLOCKSIZE := 64k
IMAGE/sysupgrade.bin += | mkrtn56uimg -s
DEVICE_VENDOR := Asus
DEVICE_MODEL := RT-N56U
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
endef
TARGET_DEVICES += rt-n56u
define Device/tew-691gr
DTS := TEW-691GR
BLOCKSIZE := 64k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
umedia-header 0x026910
DEVICE_VENDOR := TRENDnet
DEVICE_MODEL := TEW-691GR
DEVICE_PACKAGES := swconfig
endef
TARGET_DEVICES += tew-691gr
define Device/tew-692gr
DTS := TEW-692GR
BLOCKSIZE := 64k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
umedia-header 0x026920
DEVICE_VENDOR := TRENDnet
DEVICE_MODEL := TEW-692GR
DEVICE_PACKAGES := swconfig
endef
TARGET_DEVICES += tew-692gr
define Device/wlr-6000
DTS := WLR-6000
BLOCKSIZE := 4k
IMAGE_SIZE := 7244k
IMAGES += factory.dlf
IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
senao-header -r 0x0202 -p 0x41 -t 2
DEVICE_VENDOR := Sitecom
DEVICE_MODEL := WLR-6000
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
endef
TARGET_DEVICES += wlr-6000
define Device/wmdr-143n
DTS := WMDR-143N
BLOCKSIZE := 64k
DEVICE_VENDOR := Loewe
DEVICE_MODEL := WMDR-143N
endef
TARGET_DEVICES += wmdr-143n