ATMEL: host_mem.h Source File

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# host_mem.h

Go to the documentation of this file.

    00001 /*This file is prepared for Doxygen automatic documentation generation.*/
    00017
    00018 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
    00019  *
    00020  * Redistribution and use in source and binary forms, with or without
    00021  * modification, are permitted provided that the following conditions are met:
    00022  *
    00023  * 1. Redistributions of source code must retain the above copyright notice,
    00024  * this list of conditions and the following disclaimer.
    00025  *
    00026  * 2. Redistributions in binary form must reproduce the above copyright notice,
    00027  * this list of conditions and the following disclaimer in the documentation
    00028  * and/or other materials provided with the distribution.
    00029  *
    00030  * 3. The name of Atmel may not be used to endorse or promote products derived
    00031  * from this software without specific prior written permission.
    00032  *
    00033  * 4. This software may only be redistributed and used in connection with an Atmel
    00034  * AVR product.
    00035  *
    00036  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
    00037  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00038  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
    00039  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
    00040  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    00041  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    00042  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00044  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    00045  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00046  */
    00047 #ifndef _HOSTMEM_H_
    00048 #define _HOSTMEM_H_
    00049
    00050 #include "conf/conf_access.h"
    00051 #include "modules/control_access/ctrl_status.h"
    00052 #include "conf/conf_usb.h"
    00053
    00054 //_____ D E F I N I T I O N S ______________________________________________
    00055
    00056 // Functions to manage the list of MS devices
    00057 void           host_mem_init              ( void );
    00058 Bool           host_mem_install           ( void );
    00059 void           host_mem_uninstall         ( void );
    00060 U8             host_mem_get_lun           ( void );
    00061
    00062 // Functions to control the state of each LUN (Logical Unit Number)
    00063 Ctrl_status    host_mem_test_unit_ready   ( U8 lun );
    00064 Ctrl_status    host_mem_read_capacity     ( U8 lun, U32 _MEM_TYPE_SLOW_ *u32_nb_sector );
    00065 U8             host_mem_read_sector_size  ( U8 lun );
    00066 Bool           host_mem_wr_protect_cache  ( U8 lun );
    00067 Bool           host_mem_wr_protect        ( U8 lun );
    00068 Bool           host_mem_removal           ( void );
    00069 Ctrl_status    host_mem_read_format_capacity( U8 lun );
    00070 Ctrl_status    host_mem_inquiry           ( U8 lun );
    00071
    00072 // Functions to control read/write operations
    00073 Ctrl_status    host_mem_mem_2_ram         ( U8 lun, U32 addr, U8 *ram );
    00074 Ctrl_status    host_mem_mem_2_ram_stop    ( void );
    00075 Ctrl_status    host_mem_ram_2_mem         ( U8 lun, U32 addr, U8 *ram );
    00076 Ctrl_status    host_mem_mem_2_ram_ext     ( U8 lun, U32 addr, U8 *ram , U8 u8_nb_sector);
    00077 Ctrl_status    host_mem_ram_2_mem_ext     ( U8 lun, U32 addr, U8 *ram , U8 u8_nb_sector);
    00078
    00079
    00080 #endif   // _HOSTMEM_H_