changeset 1768:ef75ad79dfe3

* include/dataflash.h: Allow the package to be compiled without io/flash. Return correct value from cyg_dataflash_get_page_count()
author asl
date Wed, 29 Jun 2005 20:12:42 +0000
parents 2ca70385b0f4
children 8667859d61ab
files packages/devs/flash/atmel/dataflash/current/ChangeLog packages/devs/flash/atmel/dataflash/current/include/dataflash.h
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/flash/atmel/dataflash/current/ChangeLog
+++ b/packages/devs/flash/atmel/dataflash/current/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-29  Jani Monoses <ani@iv.ro>
+
+	* include/dataflash.h: Allow the package to be compiled without
+	io/flash. Return correct value from cyg_dataflash_get_page_count()
+
 2004-12-02  Bart Veer  <bartv@ecoscentric.com>
 
 	* include/dataflash.h,
--- a/packages/devs/flash/atmel/dataflash/current/include/dataflash.h
+++ b/packages/devs/flash/atmel/dataflash/current/include/dataflash.h
@@ -97,7 +97,7 @@ typedef struct cyg_dataflash_device_s
 } cyg_dataflash_device_t;
 
 //----------------------------------------------------------------------------
-
+#ifdef CYGPKG_IO_FLASH
 #include <cyg/io/flash.h>
 #include <cyg/io/flash_dev.h>
 
@@ -129,6 +129,7 @@ externC struct cyg_flash_dev_funs cyg_da
                      & cyg_dataflash_priv_ ## name                              \
         )
     
+#endif
 //----------------------------------------------------------------------------
 
 static inline cyg_uint8
@@ -146,7 +147,7 @@ cyg_dataflash_get_page_size(cyg_dataflas
 static inline cyg_uint16
 cyg_dataflash_get_page_count(cyg_dataflash_device_t *dev)
 {
-    return dev->info->page_size;
+    return dev->info->page_count;
 }
 
 static inline cyg_uint16