comparison packages/io/flash/current/include/flash_priv.h @ 1763:42c8ea63b78d

Eliminate hwr_map_error() from the V2 driver interface, it no longer serves any useful purpose
author bartv
date Mon, 29 Nov 2004 14:49:20 +0000
parents 9c1d9e5039c2
children
comparison
equal deleted inserted replaced
1762:9c1d9e5039c2 1763:42c8ea63b78d
73 cyg_flashaddr_t base, 73 cyg_flashaddr_t base,
74 const void* data, size_t len); 74 const void* data, size_t len);
75 int (*flash_read) (struct cyg_flash_dev *dev, 75 int (*flash_read) (struct cyg_flash_dev *dev,
76 const cyg_flashaddr_t base, 76 const cyg_flashaddr_t base,
77 void* data, size_t len); 77 void* data, size_t len);
78 int (*flash_hwr_map_error) (struct cyg_flash_dev *dev, int err);
79 #ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING 78 #ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
80 int (*flash_block_lock) (struct cyg_flash_dev *dev, 79 int (*flash_block_lock) (struct cyg_flash_dev *dev,
81 const cyg_flashaddr_t block_base); 80 const cyg_flashaddr_t block_base);
82 int (*flash_block_unlock) (struct cyg_flash_dev *dev, 81 int (*flash_block_unlock) (struct cyg_flash_dev *dev,
83 const cyg_flashaddr_t block_base); 82 const cyg_flashaddr_t block_base);
116 struct cyg_flash_dev *next; // Pointer to next device 115 struct cyg_flash_dev *next; // Pointer to next device
117 #endif 116 #endif
118 } CYG_HAL_TABLE_TYPE; 117 } CYG_HAL_TABLE_TYPE;
119 118
120 #ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING 119 #ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
121 # define CYG_FLASH_FUNS(_funs_, _init_, _query_ , _erase_, _prog_ , _read_, _map_, _lock_, _unlock_) \ 120 # define CYG_FLASH_FUNS(_funs_, _init_, _query_ , _erase_, _prog_ , _read_, _lock_, _unlock_) \
122 struct cyg_flash_dev_funs _funs_ = \ 121 struct cyg_flash_dev_funs _funs_ = \
123 { \ 122 { \
124 .flash_init = _init_, \ 123 .flash_init = _init_, \
125 .flash_query = _query_, \ 124 .flash_query = _query_, \
126 .flash_erase_block = _erase_, \ 125 .flash_erase_block = _erase_, \
127 .flash_program = _prog_, \ 126 .flash_program = _prog_, \
128 .flash_read = _read_, \ 127 .flash_read = _read_, \
129 .flash_hwr_map_error = _map_, \
130 .flash_block_lock = _lock_, \ 128 .flash_block_lock = _lock_, \
131 .flash_block_unlock = _unlock_ \ 129 .flash_block_unlock = _unlock_ \
132 } 130 }
133 #else 131 #else
134 # define CYG_FLASH_FUNS(_funs_, _init_, _query_ , _erase_, _prog_ , _read_, _map_, _lock_, _unlock_) \ 132 # define CYG_FLASH_FUNS(_funs_, _init_, _query_ , _erase_, _prog_ , _read_, _lock_, _unlock_) \
135 struct cyg_flash_dev_funs _funs_ = \ 133 struct cyg_flash_dev_funs _funs_ = \
136 { \ 134 { \
137 .flash_init = _init_, \ 135 .flash_init = _init_, \
138 .flash_query = _query_, \ 136 .flash_query = _query_, \
139 .flash_erase_block = _erase_, \ 137 .flash_erase_block = _erase_, \
140 .flash_program = _prog_, \ 138 .flash_program = _prog_, \
141 .flash_read = _read_, \ 139 .flash_read = _read_ \
142 .flash_hwr_map_error = _map_ \
143 } 140 }
144 #endif 141 #endif
145 142
146 // We assume HAL tables are placed into RAM. 143 // We assume HAL tables are placed into RAM.
147 #define CYG_FLASH_DRIVER(_name_, _funs_, _flags_, _start_, _end_, _num_block_infos_, _block_info_, _priv_) \ 144 #define CYG_FLASH_DRIVER(_name_, _funs_, _flags_, _start_, _end_, _num_block_infos_, _block_info_, _priv_) \