Mercurial > flash_v2
comparison packages/io/flash/current/include/flash_priv.h @ 1747:a221170fac3d
Add an optimization for the common case of a single flash device
| author | bartv |
|---|---|
| date | Sun, 21 Nov 2004 23:39:01 +0000 |
| parents | 49e24a462730 |
| children | 80232dbac7fb |
comparison
equal
deleted
inserted
replaced
| 1746:172edf8a96d8 | 1747:a221170fac3d |
|---|---|
| 51 //####DESCRIPTIONEND#### | 51 //####DESCRIPTIONEND#### |
| 52 // | 52 // |
| 53 //========================================================================== | 53 //========================================================================== |
| 54 #ifndef _IO_FLASH_PRIV_H_ | 54 #ifndef _IO_FLASH_PRIV_H_ |
| 55 #define _IO_FLASH_PRIV_H_ | 55 #define _IO_FLASH_PRIV_H_ |
| 56 | |
| 57 #include <pkgconf/system.h> | |
| 58 #include <pkgconf/io_flash.h> | |
| 56 | 59 |
| 57 // Forward reference of the device structure | 60 // Forward reference of the device structure |
| 58 struct cyg_flash_dev; | 61 struct cyg_flash_dev; |
| 59 | 62 |
| 60 // Structure of pointers to functions in the device driver | 63 // Structure of pointers to functions in the device driver |
| 92 cyg_flash_printf *pf; // Pointer to diagnostic printf | 95 cyg_flash_printf *pf; // Pointer to diagnostic printf |
| 93 bool init; // Device has been initialised | 96 bool init; // Device has been initialised |
| 94 #ifdef CYGPKG_KERNEL | 97 #ifdef CYGPKG_KERNEL |
| 95 cyg_mutex_t mutex; // Mutex for thread safeness | 98 cyg_mutex_t mutex; // Mutex for thread safeness |
| 96 #endif | 99 #endif |
| 100 #if (CYGHWR_IO_FLASH_DEVICE > 1) | |
| 97 struct cyg_flash_dev *next; // Pointer to next device | 101 struct cyg_flash_dev *next; // Pointer to next device |
| 102 #endif | |
| 98 } CYG_HAL_TABLE_TYPE; | 103 } CYG_HAL_TABLE_TYPE; |
| 99 | 104 |
| 100 #define CYG_FLASH_FUNS(funs,init,query,erase,prog,read,map,lock,unlock)\ | 105 #define CYG_FLASH_FUNS(funs,init,query,erase,prog,read,map,lock,unlock)\ |
| 101 struct cyg_flash_dev_funs funs = \ | 106 struct cyg_flash_dev_funs funs = \ |
| 102 { \ | 107 { \ |
