source: trunk/softs/tsar_boot/include/boot_ioc.h @ 390

Last change on this file since 390 was 388, checked in by cfuguet, 11 years ago

Modifications in tsar/trunk/softs/tsar_boot:

  • Improving the boot_ioc_read when using a SD card in FPGA platform.
  • Adding some instrumentation on the SD card driver (under preprocessor conditional directives).
  • Including Doxyfile for generate documentation using doxygen.
  • Improving the Makefile to include doc generation.
File size: 1.4 KB
RevLine 
[292]1#ifndef BOOT_IOC_H
2#define BOOT_IOC_H
3
4#ifndef SOCLIB_IOC
[388]5#include <sdcard.h>
6#include <spi.h>
[292]7#else
[388]8#include <block_device.h>
[292]9#endif
10
[347]11#include <defs.h>
[292]12#include <boot_tty.h>
13#include <io.h>
14
15/**
16 * boot_ioc_read()
17 *
18 * Transfer data from a file on the block device to a memory buffer.
19 *
20 * \param lba    : first block index on the disk
21 * \param buffer : base address of the memory buffer
22 * \param count  : number of blocks to be transfered
23 *
24 * \note This is a blocking function. The function returns once the transfer
25 *       has finished
26 */
27int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count);
28
29/**
30 * boot_ioc_init()
31 *
32 * Initialize the SPI controller use to access a SD card
33 */
34int boot_ioc_init();
35
36/**
[347]37 * boot_dbuf_invalidate()
38 *
39 * Invalidate all data cache lines corresponding to a memory buffer.
40 */
41#if (CACHE_COHERENCE == 0)
42void boot_dbuf_invalidate(
43        const void * buffer,
44        unsigned int line_size,
45        unsigned int size);
46#endif
47
48/**
[292]49 * boot_ioc_write()
50 *
51 * Transfer data from a memory buffer to a file on the block_device.
52 *
53 * \param lba    : first block index on the disk
54 * \param buffer : base address of the memory buffer
55 * \param count  : number of blocks to be transfered
56 *
57 * \note The source buffer must be in user address space.
58 */
59//int boot_ioc_write(unsigned int lba, void* buffer, unsigned int count);
60
61#endif
62
63/*
64 * vim: tabstop=4 : shiftwidth=4 : expandtab
65 */
Note: See TracBrowser for help on using the repository browser.