# HG changeset patch # User asl # Date 1120075962 0 # Node ID ef75ad79dfe3dd8ae69a10ec0249d019135246fd # Parent 2ca70385b0f4232acb18ae662ceb2146539cb74b * include/dataflash.h: Allow the package to be compiled without io/flash. Return correct value from cyg_dataflash_get_page_count() diff --git a/packages/devs/flash/atmel/dataflash/current/ChangeLog b/packages/devs/flash/atmel/dataflash/current/ChangeLog --- 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 + + * 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 * include/dataflash.h, diff --git a/packages/devs/flash/atmel/dataflash/current/include/dataflash.h b/packages/devs/flash/atmel/dataflash/current/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 #include @@ -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