changeset 2955:f3e242061dd3

* include/var_io.h: Added ADC defines for AT91_M55800A CPU
author sergeig
date Sat, 29 May 2010 14:47:00 +0000
parents 1edd8eb593c9
children ae92e99547f4
files packages/hal/arm/at91/var/current/ChangeLog packages/hal/arm/at91/var/current/include/var_io.h
diffstat 2 files changed, 28 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/arm/at91/var/current/ChangeLog
+++ b/packages/hal/arm/at91/var/current/ChangeLog
@@ -1,3 +1,6 @@
+2010-05-27 ccoutand <ccoutand@stmi.com>
+	* include/var_io.h: Added ADC defines for AT91_M55800A CPU
+
 2009-06-03 Oliver Munz <oli@snr.ch>
 
  	* Fix the a problem in the kernel delay_us, if the PIT is
--- a/packages/hal/arm/at91/var/current/include/var_io.h
+++ b/packages/hal/arm/at91/var/current/include/var_io.h
@@ -2671,10 +2671,33 @@
 //=============================================================================
 // Analog to Digital Convertor (ADC)
 
+#if defined(CYGHWR_HAL_ARM_AT91SAM7) || \
+	            defined (CYGHWR_HAL_ARM_AT91_M55800A)
+
+// AT91SAM7 specifics
 #if defined(CYGHWR_HAL_ARM_AT91SAM7)
+#if !defined(AT91_ADC)
+#define AT91_ADC 0xFFFD8000
+#endif
+
+#if !defined(AT91_MAX_ADC_CHAN)
+#define AT91_MAX_ADC_CHAN 8
+#endif
+#endif
 
-#ifndef AT91_ADC
-#define AT91_ADC 0xFFFD8000
+// AT91_M55800A specifics
+#if defined(CYGHWR_HAL_ARM_AT91_M55800A)
+#if !defined(AT91_ADC)
+#define AT91_ADC 0xFFFB0000
+#endif
+
+#if !defined(AT91_ADC1)
+#define AT91_ADC1 0xFFFB4000
+#endif
+
+#if !defined(AT91_MAX_ADC_CHAN)
+#define AT91_MAX_ADC_CHAN 4
+#endif
 #endif
 
 #define AT91_ADC_CR    0x00 // Control