host_mem.h

Go to the documentation of this file.
00001 /*This file has been prepared for Doxygen automatic documentation generation.*/
00017 
00018 /* Copyright (c) 2007, 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  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
00034  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00035  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
00036  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00037  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00038  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00039  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00040  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00041  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00042  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00043  */
00044 #ifndef _HOSTMEM_H_
00045 #define _HOSTMEM_H_
00046 
00047 #include "conf/conf_access.h"
00048 #include "modules/control_access/ctrl_status.h"
00049 #include "conf/conf_usb.h"
00050 
00051 //_____ D E F I N I T I O N S ______________________________________________
00052 
00053 // Functions to manage the list of MS devices
00054 void           host_mem_init              ( void );
00055 Bool           host_mem_install           ( void );
00056 void           host_mem_uninstall         ( void );
00057 U8             host_mem_get_lun           ( void );
00058 
00059 // Functions to control the state of each LUN (Logical Unit Number)
00060 Ctrl_status    host_mem_test_unit_ready   ( U8 lun );
00061 Ctrl_status    host_mem_read_capacity     ( U8 lun, U32 _MEM_TYPE_SLOW_ *u32_nb_sector );
00062 U8             host_mem_read_sector_size  ( U8 lun );
00063 Bool           host_mem_wr_protect_cache  ( U8 lun );
00064 Bool           host_mem_wr_protect        ( U8 lun );
00065 Bool           host_mem_removal           ( void );
00066 Ctrl_status    host_mem_read_format_capacity( U8 lun );
00067 Ctrl_status    host_mem_inquiry           ( U8 lun );
00068 
00069 // Functions to control read/write operations
00070 Ctrl_status    host_mem_mem_2_ram         ( U8 lun, U32 addr, U8 *ram );
00071 Ctrl_status    host_mem_mem_2_ram_stop    ( void );
00072 Ctrl_status    host_mem_ram_2_mem         ( U8 lun, U32 addr, U8 *ram );
00073 
00074 
00075 #endif   // _HOSTMEM_H_

Generated on Fri May 15 15:41:36 2009 for ATMEL by  doxygen 1.5.3