Changes between Version 2 and Version 3 of sdc_driver


Ignore:
Timestamp:
Mar 28, 2015, 2:41:08 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sdc_driver

    v2 v3  
    77This component is a single channel, block oriented, external mass storage peripheral, implemented on a SD card.
    88
    9 The ''sdc_driver'' uses the lower level ''spi_driver'' to access the SD card.
     9The SDC driver uses the lower level SPI driver to access the SD card.
    1010
    11 The ''sdc_driver'' is called by the generic ''ioc_driver'' when the USE_IOC_SPI flag is set in the hard_config.h file.
     11It is called by the generic FAT handler when the USE_IOC_SPI flag is set in the hard_config.h file.
    1212
    1313The SEG_IOC_BASE address must be defined in the hard_config.h file.
    1414
    15 In this implementation, the SDC peripheral is acting as a target (no DMA capability) :  the '''_sdc_read()''' and '''_sdc_write()''' are blocking until the transfer is fully completed, and does not use any interrupt to signal completion.
     15In this implementation, the SDC peripheral is acting as a target (no DMA capability) :  the '''_sdc_access()''' function is blocking until the transfer is fully completed, and does not use any interrupt to signal completion, whatever the requested mode.
    1616
    17 WARNING : The '''_sdc_write()''' function is not implemented yet
     17WARNING : Write transfers (from memory to SD card) are not supported yet.
    1818
    19 
     19 == __Access functions__ ==
    2020
    2121 === unsigned int '''_sdc_init'''() ===
     
    2323Returns 0 if success, >0 if failure
    2424
    25  === unsigned int '''_sdc_read'''( unsigned int mode,   unsigned int lba,  paddr_t buffer,  unsigned int count ) ===
     25 === unsigned int '''_sdc_access'''( unsigned int use_irq  ,  unsigned int to_mem  ,  unsigned int lba,  unsigned long long buffer,  unsigned int count ) ===
    2626Transfer data from the SD card to a memory buffer.
    27  * mode     : BOOT / KERNEL / USER (Not used in this implementation)
    28  * lba      : first block index on the SD card
    29  * buffer   : physical base address of the memory buffer
    30  * count    : number of blocks to be transfered.
     27 * '''use_irq''' : unused, access is always synchronous.
     28 * '''to_mem''' : must be non zero as write transfer are not supported yet.
     29 * '''lba'''  : first block index on the SD card.
     30 * '''buffer''' : physical base address of the memory buffer
     31 * '''count''' : number of blocks to be transfered.
    3132Returns 0 if success, > 0 if error.
    32 
    33  === unsigned int '''_sdc_write'''( unsigned int mode,   unsigned int lba,  paddr_t buffer,  unsigned int count ) ===
    34 Transfer data from a memory buffer to the SD card.
    35  * mode     : BOOT / KERNEL / USER (Not used in this implementation)
    36  * lba      : first block index on the SD card.
    37  * buffer   : physical base address of the memory buffer
    38  * count    : number of blocks to be transfered.
    39 Returns 0 if success, > 0 if error.
    40 WARNING: The _sdc_write() is not implemented yet.
    41 
    42  === unsigned int '''_sdc_get_status'''() ===
    43  This function should not be called for this implementation of the SDC driver (No DMA).
    44 
    45  === unsigned int '''_sdc_get_block_size'''() ===
    46 Returns the block size (bytes).
    4733
    4834