summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src/at90usb
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-20 02:35:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-20 02:35:20 +0000
commit59ec83c253ed8d24d6da0caf83284b2ff3fc86b6 (patch)
treef79e18849c6162bd22d42888977561f0765da8c8 /nuttx/arch/avr/src/at90usb
parente3a554007303d79b4656f361b4151130cdab7db8 (diff)
downloadpx4-nuttx-59ec83c253ed8d24d6da0caf83284b2ff3fc86b6.tar.gz
px4-nuttx-59ec83c253ed8d24d6da0caf83284b2ff3fc86b6.tar.bz2
px4-nuttx-59ec83c253ed8d24d6da0caf83284b2ff3fc86b6.zip
Preparing for AVR USB driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3725 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/at90usb')
-rw-r--r--nuttx/arch/avr/src/at90usb/Make.defs5
-rw-r--r--nuttx/arch/avr/src/at90usb/chip.h29
2 files changed, 30 insertions, 4 deletions
diff --git a/nuttx/arch/avr/src/at90usb/Make.defs b/nuttx/arch/avr/src/at90usb/Make.defs
index 7a353dbf4..5b939f5af 100644
--- a/nuttx/arch/avr/src/at90usb/Make.defs
+++ b/nuttx/arch/avr/src/at90usb/Make.defs
@@ -69,8 +69,7 @@ CHIP_CSRCS = at90usb_lowconsole.c at90usb_lowinit.c at90usb_serial.c at90usb_tim
# Configuration-dependent aT90USB files
-ifeq ($(CONFIG_AVR_GPIOIRQ),y)
-CHIP_CSRCS +=
+ifeq ($(CONFIG_AVR_USBDEV),y)
+CHIP_CSRCS += at90usb_usbdev.c
endif
-
diff --git a/nuttx/arch/avr/src/at90usb/chip.h b/nuttx/arch/avr/src/at90usb/chip.h
index c5f2c48b3..c58c2040d 100644
--- a/nuttx/arch/avr/src/at90usb/chip.h
+++ b/nuttx/arch/avr/src/at90usb/chip.h
@@ -48,7 +48,34 @@
/* Define features for supported chip in the ATMEGA family */
-#if 1
+#if defined(CONFIG_ARCH_CHIP_AT90USB646)
+# define AVR_FLASH_SIZE (64*1024)
+# define AVR_SRAM_SIZE (4*1024)
+# define AVR_EEPROM_SIZE (2*1024)
+# define HAVE_USBDEV 1
+# undef HAVE_USBHOST
+# undef HAVE_RAMPZ
+#elif defined(CONFIG_ARCH_CHIP_AT90USB647)
+# define AVR_FLASH_SIZE (64*1024)
+# define AVR_SRAM_SIZE (4*1024)
+# define AVR_EEPROM_SIZE (2*1024)
+# define HAVE_USBDEV 1
+# define HAVE_USBHOST 1
+# undef HAVE_RAMPZ
+#elif defined(CONFIG_ARCH_CHIP_AT90USB1286)
+# define AVR_FLASH_SIZE (128*1024)
+# define AVR_SRAM_SIZE (8*1024)
+# define AVR_EEPROM_SIZE (4*1024)
+# define HAVE_USBDEV 1
+# undef HAVE_USBHOST
+# define HAVE_RAMPZ 1
+#elif defined(CONFIG_ARCH_CHIP_AT90USB1287)
+# define AVR_FLASH_SIZE (128*1024)
+# define AVR_SRAM_SIZE (8*1024)
+# define AVR_EEPROM_SIZE (4*1024)
+# define HAVE_USBDEV 1
+# define HAVE_USBHOST 1
+# define HAVE_RAMPZ 1
#else
# error "Unsupported AVR chip"
#endif