spi_blkio_at45d.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. /*
  2. * Copyright (C) 2008-2011 by egnite GmbH
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*!
  35. * \file dev/spi_blkio_at45d.c
  36. * \brief Low level block I/O routines for Adesto/Atmel AT45D SPI Flash.
  37. *
  38. * \verbatim
  39. * $Id$
  40. * \endverbatim
  41. */
  42. #include <cfg/memory.h>
  43. #include <sys/nutdebug.h>
  44. #include <dev/blockdev.h>
  45. #include <dev/spi_node_at45d.h>
  46. /*!
  47. * \addtogroup xgSpiBlockIoAt45d
  48. */
  49. /*@{*/
  50. /*!
  51. * \brief Initialize the block I/O interface.
  52. *
  53. * \param dev Specifies the blcok I/O device.
  54. *
  55. * \return 0 on success or -1 in case of an error.
  56. */
  57. static int At45dBlkIoInit(NUTDEVICE * dev)
  58. {
  59. NUTBLOCKIO *blkio;
  60. NUTSPINODE *node;
  61. AT45D_INFO *df;
  62. NUTASSERT(dev != NULL);
  63. NUTASSERT(dev->dev_dcb != NULL);
  64. NUTASSERT(dev->dev_icb != NULL);
  65. blkio = dev->dev_dcb;
  66. node = dev->dev_icb;
  67. df = At45dNodeProbe(node);
  68. if (df) {
  69. /* Known DataFlash type detected. */
  70. blkio->blkio_info = (void *) df;
  71. blkio->blkio_blk_cnt = df->at45d_pages;
  72. blkio->blkio_blk_siz = df->at45d_psize;
  73. return 0;
  74. }
  75. /* No known DataFlash type detected. */
  76. return -1;
  77. }
  78. /*!
  79. * \brief Read data from DataFlash memory.
  80. *
  81. * \param dev Specifies the registered DataFlash device.
  82. * \param pgn Page number to read, starting at 0.
  83. * \param data Points to a buffer that receives the data.
  84. * \param len Number of bytes to read.
  85. *
  86. * \return The number of bytes actually read. A return value of -1 indicates
  87. * an error.
  88. */
  89. static int At45dBlkIoRead(NUTDEVICE * dev, uint32_t pgn, void *data, int len)
  90. {
  91. NUTBLOCKIO *blkio;
  92. AT45D_INFO *info;
  93. NUTASSERT(dev != NULL);
  94. NUTASSERT(dev->dev_dcb != NULL);
  95. blkio = dev->dev_dcb;
  96. info = (AT45D_INFO *) blkio->blkio_info;
  97. NUTASSERT(blkio->blkio_info != NULL);
  98. if (pgn >= info->at45d_pages) {
  99. return -1;
  100. }
  101. pgn <<= info->at45d_pshft;
  102. if (At45dNodeLock((NUTSPINODE *) dev->dev_icb) ||
  103. At45dNodeTransfer((NUTSPINODE *) dev->dev_icb, DFCMD_CONT_READ, pgn, 8, NULL, data, len)) {
  104. At45dNodeUnlock((NUTSPINODE *) dev->dev_icb);
  105. return -1;
  106. }
  107. At45dNodeUnlock((NUTSPINODE *) dev->dev_icb);
  108. return len;
  109. }
  110. /*!
  111. * \brief Write data to DataFlash memory.
  112. *
  113. * Each page will be automatically erased before writing the data. If the
  114. * last page is not completely filled with new data, the contents of
  115. * remaining bytes at the end of the page is undetermined.
  116. *
  117. * \param dev Specifies the registered DataFlash device.
  118. * \param pgn The page number.
  119. * \param data Points to the buffer that contains the bytes to be written.
  120. * \param len Number of bytes available in the buffer. This may be less
  121. * than the page size, in which case the remaining bytes of
  122. * the page will be set to 0xff.
  123. *
  124. * \return The number of bytes actually written. A return value of -1 indicates
  125. * an error.
  126. */
  127. static int At45dBlkIoWrite(NUTDEVICE * dev, uint32_t pgn, const void *data, int len)
  128. {
  129. int rc = -1;
  130. uint8_t *dp = (uint8_t *) data;
  131. int step;
  132. uint_fast8_t pshft;
  133. uint32_t limit;
  134. NUTBLOCKIO *blkio;
  135. NUTSPINODE *node;
  136. /* Sanity check. */
  137. if (len == 0) {
  138. return 0;
  139. }
  140. NUTASSERT(data != NULL);
  141. NUTASSERT(dev != NULL);
  142. NUTASSERT(dev->dev_dcb != NULL);
  143. NUTASSERT(dev->dev_icb != NULL);
  144. blkio = (NUTBLOCKIO *) dev->dev_dcb;
  145. node = (NUTSPINODE *) dev->dev_icb;
  146. NUTASSERT(blkio->blkio_info != NULL);
  147. pshft = ((AT45D_INFO *) blkio->blkio_info)->at45d_pshft;
  148. step = ((AT45D_INFO *) blkio->blkio_info)->at45d_psize;
  149. limit = ((AT45D_INFO *) blkio->blkio_info)->at45d_pages;
  150. while (len) {
  151. if (step > len) {
  152. step = len;
  153. }
  154. if (At45dNodeLock(node)) {
  155. break;
  156. }
  157. /* Copy data to the internal DataFlash RAM buffer. */
  158. if (At45dNodeTransfer(node, DFCMD_BUF1_WRITE, 0, 4, dp, NULL, step)) {
  159. break;
  160. }
  161. /* Erase the page and flash the RAM buffer contents. */
  162. if (At45dNodeCommand(node, DFCMD_BUF1_FLASH, pgn << pshft, 4)) {
  163. break;
  164. }
  165. if (At45dNodeWaitReady(node, AT45_WRITE_POLLS, 1)) {
  166. break;
  167. }
  168. At45dNodeUnlock(node);
  169. if (rc < 0) {
  170. rc = 0;
  171. }
  172. rc += step;
  173. dp += step;
  174. len -= step;
  175. if (++pgn >= limit) {
  176. break;
  177. }
  178. }
  179. return rc;
  180. }
  181. #ifdef __HARVARD_ARCH__
  182. static int At45dBlkIoWrite_P(NUTDEVICE * dev, uint32_t pgn, PGM_P data, int len)
  183. {
  184. return -1;
  185. }
  186. #endif
  187. /*!
  188. * \brief Perform block I/O device control functions.
  189. *
  190. * This function is called by the ioctl() function of the C runtime
  191. * library.
  192. *
  193. * \param dev Identifies the device that receives the control command.
  194. * \param req Requested control command. May be set to one of the
  195. * following constants:
  196. * - \ref NUTBLKDEV_MEDIAAVAIL
  197. * - \ref NUTBLKDEV_MEDIACHANGE
  198. *
  199. * \param conf Points to a buffer that contains any data required for
  200. * the given control function or receives data from that
  201. * function.
  202. * \return 0 on success, -1 otherwise.
  203. */
  204. static int At45dBlkIoCtl(NUTDEVICE * dev, int req, void *conf)
  205. {
  206. int rc = 0;
  207. switch (req) {
  208. case NUTBLKDEV_MEDIAAVAIL:
  209. /* Modification required for DataFlash cards. */
  210. {
  211. int *flg;
  212. NUTASSERT(conf != NULL);
  213. flg = (int *) conf;
  214. *flg = 1;
  215. }
  216. break;
  217. case NUTBLKDEV_MEDIACHANGE:
  218. /* Modification required for DataFlash cards. */
  219. {
  220. int *flg;
  221. NUTASSERT(conf != NULL);
  222. flg = (int *) conf;
  223. *flg = 0;
  224. }
  225. break;
  226. default:
  227. rc = -1;
  228. break;
  229. }
  230. return rc;
  231. }
  232. #ifndef BLKIO_MOUNT_OFFSET_AT45D0
  233. #ifdef MOUNT_OFFSET_AT45D0
  234. #define BLKIO_MOUNT_OFFSET_AT45D0 MOUNT_OFFSET_AT45D0
  235. #else
  236. #define BLKIO_MOUNT_OFFSET_AT45D0 0
  237. #endif
  238. #endif
  239. #ifndef BLKIO_MOUNT_TOP_RESERVE_AT45D0
  240. #ifdef MOUNT_TOP_RESERVE_AT45D0
  241. #define BLKIO_MOUNT_TOP_RESERVE_AT45D0 MOUNT_TOP_RESERVE_AT45D0
  242. #else
  243. #define BLKIO_MOUNT_TOP_RESERVE_AT45D0 1
  244. #endif
  245. #endif
  246. /*!
  247. * \brief First AT45D block I/O control implementation structure.
  248. */
  249. static NUTBLOCKIO blkIoAt45d0 = {
  250. NULL, /*!< \brief Device specific parameters, blkio_info. */
  251. 0, /*!< \brief Total number of pages, blkio_blk_cnt. */
  252. 0, /*!< \brief Number of bytes per page, blkio_blk_siz. */
  253. BLKIO_MOUNT_OFFSET_AT45D0, /*!< \brief Number of sectors reserved at bottom, blkio_vol_bot. */
  254. BLKIO_MOUNT_TOP_RESERVE_AT45D0, /*!< \brief Number of sectors reserved at top, blkio_vol_top. */
  255. At45dBlkIoRead, /*!< \brief Read from node, blkio_read. */
  256. At45dBlkIoWrite, /*!< \brief Write to node, blkio_write. */
  257. #ifdef __HARVARD_ARCH__
  258. At45dBlkIoWrite_P, /*!< \brief Write program memory to node, blkio_write_P. */
  259. #endif
  260. At45dBlkIoCtl /*!< \brief Control functions, blkio_ioctl. */
  261. };
  262. /*!
  263. * \brief First AT45D block I/O device implementation structure.
  264. */
  265. NUTDEVICE devSpiBlkAt45d0 = {
  266. NULL, /*!< \brief Pointer to next device, dev_next. */
  267. {'A', 'T', '4', '5', 'D', '0', 0, 0, 0}, /*!< \brief Unique device name, dev_name. */
  268. IFTYP_BLKIO, /*!< \brief Type of device, dev_type. */
  269. 0, /*!< \brief Base address, dev_base (not used). */
  270. 0, /*!< \brief First interrupt number, dev_irq (not used). */
  271. &nodeAt45d0, /*!< \brief Interface control block, dev_icb. */
  272. &blkIoAt45d0, /*!< \brief Driver control block, dev_dcb. */
  273. At45dBlkIoInit, /*!< \brief Driver initialization routine, dev_init. */
  274. NutBlockDeviceIOCtl, /*!< \brief Driver specific control function, dev_ioctl. */
  275. NutBlockDeviceRead, /*!< \brief Read from device, dev_read. */
  276. NutBlockDeviceWrite, /*!< \brief Write to device, dev_write. */
  277. #ifdef __HARVARD_ARCH__
  278. NutBlockDeviceWrite_P, /*!< \brief Write data from program space to device, dev_write_P. */
  279. #endif
  280. NutBlockDeviceOpen, /*!< \brief Mount volume, dev_open. */
  281. NutBlockDeviceClose, /*!< \brief Unmount volume, dev_close. */
  282. NutBlockDeviceSize, /*!< \brief Request file size, dev_size. */
  283. NULL, /*!< \brief Select function, optional, not yet implemented */
  284. };
  285. #ifndef BLKIO_MOUNT_OFFSET_AT45D1
  286. #ifdef MOUNT_OFFSET_AT45D1
  287. #define BLKIO_MOUNT_OFFSET_AT45D1 MOUNT_OFFSET_AT45D1
  288. #else
  289. #define BLKIO_MOUNT_OFFSET_AT45D1 0
  290. #endif
  291. #endif
  292. #ifndef BLKIO_MOUNT_TOP_RESERVE_AT45D1
  293. #ifdef MOUNT_TOP_RESERVE_AT45D1
  294. #define BLKIO_MOUNT_TOP_RESERVE_AT45D1 MOUNT_TOP_RESERVE_AT45D1
  295. #else
  296. #define BLKIO_MOUNT_TOP_RESERVE_AT45D1 1
  297. #endif
  298. #endif
  299. /*!
  300. * \brief Second AT45D block I/O control implementation structure.
  301. */
  302. static NUTBLOCKIO blkIoAt45d1 = {
  303. NULL, /*!< \brief Device specific parameters, blkio_info. */
  304. 0, /*!< \brief Total number of pages, blkio_blk_cnt. */
  305. 0, /*!< \brief Number of bytes per page, blkio_blk_siz. */
  306. BLKIO_MOUNT_OFFSET_AT45D1, /*!< \brief Number of sectors reserved at bottom, blkio_vol_bot. */
  307. BLKIO_MOUNT_TOP_RESERVE_AT45D1, /*!< \brief Number of sectors reserved at top, blkio_vol_top. */
  308. At45dBlkIoRead, /*!< \brief Read from node, blkio_read. */
  309. At45dBlkIoWrite, /*!< \brief Write to node, blkio_write. */
  310. #ifdef __HARVARD_ARCH__
  311. At45dBlkIoWrite_P, /*!< \brief Write program memory to node, blkio_write_P. */
  312. #endif
  313. At45dBlkIoCtl /*!< \brief Control functions, blkio_ioctl. */
  314. };
  315. /*!
  316. * \brief Second AT45D block I/O device implementation structure.
  317. */
  318. NUTDEVICE devSpiBlkAt45d1 = {
  319. NULL, /*!< \brief Pointer to next device, dev_next. */
  320. {'A', 'T', '4', '5', 'D', '1', 0, 0, 0}, /*!< \brief Unique device name, dev_name. */
  321. IFTYP_BLKIO, /*!< \brief Type of device, dev_type. */
  322. 0, /*!< \brief Base address, dev_base (not used). */
  323. 0, /*!< \brief First interrupt number, dev_irq (not used). */
  324. &nodeAt45d1, /*!< \brief Interface control block, dev_icb. */
  325. &blkIoAt45d1, /*!< \brief Driver control block, dev_dcb. */
  326. At45dBlkIoInit, /*!< \brief Driver initialization routine, dev_init. */
  327. NutBlockDeviceIOCtl, /*!< \brief Driver specific control function, dev_ioctl. */
  328. NutBlockDeviceRead, /*!< \brief Read from device, dev_read. */
  329. NutBlockDeviceWrite, /*!< \brief Write to device, dev_write. */
  330. #ifdef __HARVARD_ARCH__
  331. NutBlockDeviceWrite_P, /*!< \brief Write data from program space to device, dev_write_P. */
  332. #endif
  333. NutBlockDeviceOpen, /*!< \brief Mount volume, dev_open. */
  334. NutBlockDeviceClose, /*!< \brief Unmount volume, dev_close. */
  335. NutBlockDeviceSize, /*!< \brief Request file size, dev_size. */
  336. NULL, /*!< \brief Select function, optional, not yet implemented */
  337. };
  338. #ifndef BLKIO_MOUNT_OFFSET_AT45D2
  339. #ifdef MOUNT_OFFSET_AT45D2
  340. #define BLKIO_MOUNT_OFFSET_AT45D2 MOUNT_OFFSET_AT45D2
  341. #else
  342. #define BLKIO_MOUNT_OFFSET_AT45D2 0
  343. #endif
  344. #endif
  345. #ifndef BLKIO_MOUNT_TOP_RESERVE_AT45D2
  346. #ifdef MOUNT_TOP_RESERVE_AT45D2
  347. #define BLKIO_MOUNT_TOP_RESERVE_AT45D2 MOUNT_TOP_RESERVE_AT45D2
  348. #else
  349. #define BLKIO_MOUNT_TOP_RESERVE_AT45D2 1
  350. #endif
  351. #endif
  352. /*!
  353. * \brief Third AT45D block I/O control implementation structure.
  354. */
  355. static NUTBLOCKIO blkIoAt45d2 = {
  356. NULL, /*!< \brief Device specific parameters, blkio_info. */
  357. 0, /*!< \brief Total number of pages, blkio_blk_cnt. */
  358. 0, /*!< \brief Number of bytes per page, blkio_blk_siz. */
  359. BLKIO_MOUNT_OFFSET_AT45D2, /*!< \brief Number of sectors reserved at bottom, blkio_vol_bot. */
  360. BLKIO_MOUNT_TOP_RESERVE_AT45D2, /*!< \brief Number of sectors reserved at top, blkio_vol_top. */
  361. At45dBlkIoRead, /*!< \brief Read from node, blkio_read. */
  362. At45dBlkIoWrite, /*!< \brief Write to node, blkio_write. */
  363. #ifdef __HARVARD_ARCH__
  364. At45dBlkIoWrite_P, /*!< \brief Write program memory to node, blkio_write_P. */
  365. #endif
  366. At45dBlkIoCtl /*!< \brief Control functions, blkio_ioctl. */
  367. };
  368. /*!
  369. * \brief Third AT45D block I/O device implementation structure.
  370. */
  371. NUTDEVICE devSpiBlkAt45d2 = {
  372. NULL, /*!< \brief Pointer to next device, dev_next. */
  373. {'A', 'T', '4', '5', 'D', '2', 0, 0, 0}, /*!< \brief Unique device name, dev_name. */
  374. IFTYP_BLKIO, /*!< \brief Type of device, dev_type. */
  375. 0, /*!< \brief Base address, dev_base (not used). */
  376. 0, /*!< \brief First interrupt number, dev_irq (not used). */
  377. &nodeAt45d2, /*!< \brief Interface control block, dev_icb. */
  378. &blkIoAt45d2, /*!< \brief Driver control block, dev_dcb. */
  379. At45dBlkIoInit, /*!< \brief Driver initialization routine, dev_init. */
  380. NutBlockDeviceIOCtl, /*!< \brief Driver specific control function, dev_ioctl. */
  381. NutBlockDeviceRead, /*!< \brief Read from device, dev_read. */
  382. NutBlockDeviceWrite, /*!< \brief Write to device, dev_write. */
  383. #ifdef __HARVARD_ARCH__
  384. NutBlockDeviceWrite_P, /*!< \brief Write data from program space to device, dev_write_P. */
  385. #endif
  386. NutBlockDeviceOpen, /*!< \brief Mount volume, dev_open. */
  387. NutBlockDeviceClose, /*!< \brief Unmount volume, dev_close. */
  388. NutBlockDeviceSize, /*!< \brief Request file size, dev_size. */
  389. NULL, /*!< \brief Select function, optional, not yet implemented */
  390. };
  391. #ifndef BLKIO_MOUNT_OFFSET_AT45D3
  392. #ifdef MOUNT_OFFSET_AT45D3
  393. #define BLKIO_MOUNT_OFFSET_AT45D3 MOUNT_OFFSET_AT45D3
  394. #else
  395. #define BLKIO_MOUNT_OFFSET_AT45D3 0
  396. #endif
  397. #endif
  398. #ifndef BLKIO_MOUNT_TOP_RESERVE_AT45D3
  399. #ifdef MOUNT_TOP_RESERVE_AT45D3
  400. #define BLKIO_MOUNT_TOP_RESERVE_AT45D3 MOUNT_TOP_RESERVE_AT45D3
  401. #else
  402. #define BLKIO_MOUNT_TOP_RESERVE_AT45D3 1
  403. #endif
  404. #endif
  405. /*!
  406. * \brief Forth AT45D block I/O control implementation structure.
  407. */
  408. static NUTBLOCKIO blkIoAt45d3 = {
  409. NULL, /*!< \brief Device specific parameters, blkio_info. */
  410. 0, /*!< \brief Total number of pages, blkio_blk_cnt. */
  411. 0, /*!< \brief Number of bytes per page, blkio_blk_siz. */
  412. BLKIO_MOUNT_OFFSET_AT45D3, /*!< \brief Number of sectors reserved at bottom, blkio_vol_bot. */
  413. BLKIO_MOUNT_TOP_RESERVE_AT45D3, /*!< \brief Number of sectors reserved at top, blkio_vol_top. */
  414. At45dBlkIoRead, /*!< \brief Read from node, blkio_read. */
  415. At45dBlkIoWrite, /*!< \brief Write to node, blkio_write. */
  416. #ifdef __HARVARD_ARCH__
  417. At45dBlkIoWrite_P, /*!< \brief Write program memory to node, blkio_write_P. */
  418. #endif
  419. At45dBlkIoCtl /*!< \brief Control functions, blkio_ioctl. */
  420. };
  421. /*!
  422. * \brief Forth AT45D block I/O device implementation structure.
  423. */
  424. NUTDEVICE devSpiBlkAt45d3 = {
  425. NULL, /*!< \brief Pointer to next device, dev_next. */
  426. {'A', 'T', '4', '5', 'D', '3', 0, 0, 0}, /*!< \brief Unique device name, dev_name. */
  427. IFTYP_BLKIO, /*!< \brief Type of device, dev_type. */
  428. 0, /*!< \brief Base address, dev_base (not used). */
  429. 0, /*!< \brief First interrupt number, dev_irq (not used). */
  430. &nodeAt45d3, /*!< \brief Interface control block, dev_icb. */
  431. &blkIoAt45d3, /*!< \brief Driver control block, dev_dcb. */
  432. At45dBlkIoInit, /*!< \brief Driver initialization routine, dev_init. */
  433. NutBlockDeviceIOCtl, /*!< \brief Driver specific control function, dev_ioctl. */
  434. NutBlockDeviceRead, /*!< \brief Read from device, dev_read. */
  435. NutBlockDeviceWrite, /*!< \brief Write to device, dev_write. */
  436. #ifdef __HARVARD_ARCH__
  437. NutBlockDeviceWrite_P, /*!< \brief Write data from program space to device, dev_write_P. */
  438. #endif
  439. NutBlockDeviceOpen, /*!< \brief Mount volume, dev_open. */
  440. NutBlockDeviceClose, /*!< \brief Unmount volume, dev_close. */
  441. NutBlockDeviceSize, /*!< \brief Request file size, dev_size. */
  442. NULL, /*!< \brief Select function, optional, not yet implemented */
  443. };
  444. /*@}*/