Technical Support
On-Line Manuals
RL-ARM User's Guide (MDK v4)
#include <file_config.h> FAT_VI* ioc_getcb ( const char* drive); /* Drive to get control block of */
The function ioc_getcb recieves a handle for the FAT Media control interface.
The parameter drive specifies the drive letter for which to receive the handle. The following values are allowed for the drive argument:
The function is included in the library RL-FlashFS. The prototype is defined in the file File_Config.h.
note
Support for ioc routines is only available on Memory Card and NAND Flash drives!
ioc_init, ioc_read_info, ioc_read_sect, ioc_uninit, ioc_write_sect
#include <File_Config.h> FAT_VI *mc0; /* Media Control Block */ void main (void) { .. mc0 = ioc_getcb (NULL); if (ioc_init (mc0) == 0) { ioc_read_info (&info, mc0); /* Default drive is M0: */ USBD_MSC_BlockSize = 512; USBD_MSC_BlockGroup = mc0->CaSize + 2; /* Cache buffer from File_Config.c */ USBD_MSC_BlockCount = info.block_cnt * (info.read_blen / 512); USBD_MSC_MemorySize = USBD_MSC_BlockCount * info.read_blen; USBD_MSC_BlockBuf = (U8 *)mc0->CaBuf; usbd_connect(__TRUE); /* USB Connect */ set_cursor (0, 1); lcd_print (" PC Interface "); } else { /* Card Failure! */ LED_On(LED_MSK); set_cursor (0, 1); lcd_print (" Card Failure! "); } .. }
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.