Changes between Initial Version and Version 1 of sdc_driver


Ignore:
Timestamp:
Oct 14, 2014, 5:26:25 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sdc_driver

    v1 v1  
     1= GIET-VM / SDC Driver =
     2
     3[[PageOutline]]
     4
     5The [source:soft/giet_vm/giet_drivers/sdc_driver.c sdc_driver.c] and [source:soft/giet_vm/giet_drivers/sdc_driver.h sdc_driver.h] files define the SDC driver.
     6
     7This component is a single channel, block oriented, external mass storage peripheral, implemented on a SD card.
     8
     9The ''sdc_driver'' uses the lower level ''spi_driver'' to access the SD card.
     10
     11Th ''sdc_driver'' is one of the physical disk driver that can be called by the generic IOC driver, and the SEG_IOC_BASE address must be defined in the hard_config.h file.
     12
     13In 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.
     14
     15WARNING : The '''_sdc_write()''' function is not implemented yet
     16
     17
     18
     19 === unsigned int '''_sdc_init'''() ===
     20This function initializes the SPI controller and call sdc_open to initialize  the SD card.
     21Returns 0 if success, >0 if failure
     22
     23 === unsigned int '''_sdc_read'''( unsigned int mode,   unsigned int lba,  paddr_t buffer,  unsigned int count ) ===
     24Transfer data from the SD card to a memory buffer.
     25 * mode     : BOOT / KERNEL / USER (Not used in this implementation)
     26 * lba      : first block index on the SD card
     27 * buffer   : physical base address of the memory buffer
     28 * count    : number of blocks to be transfered.
     29Returns 0 if success, > 0 if error.
     30
     31 === unsigned int '''_sdc_write'''( unsigned int mode,   unsigned int lba,  paddr_t buffer,  unsigned int count ) ===
     32Transfer data from a memory buffer to the SD card.
     33 * mode     : BOOT / KERNEL / USER (Not used in this implementation)
     34 * lba      : first block index on the SD card.
     35 * buffer   : physical base address of the memory buffer
     36 * count    : number of blocks to be transfered.
     37Returns 0 if success, > 0 if error.
     38WARNING: The _sdc_write() is not implemented yet.
     39
     40 === unsigned int '''_sdc_get_status'''() ===
     41 This function should not be called for this implementation of the SDC driver (No DMA).
     42
     43 === unsigned int '''_sdc_get_block_size'''() ===
     44Returns the block size (bytes).
     45
     46
     47
     48