Contiki 2.6
|
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/ 00002 /*! \file conf_access.h ********************************************************************* 00003 * 00004 * \brief 00005 * This file contains the possible external configuration of the control access 00006 * 00007 * \addtogroup usbstick 00008 * 00009 * \author 00010 * Atmel Corporation: http://www.atmel.com \n 00011 * Support email: avr@atmel.com 00012 ******************************************************************************/ 00013 /* 00014 Copyright (c) 2004 ATMEL Corporation 00015 All rights reserved. 00016 00017 Redistribution and use in source and binary forms, with or without 00018 modification, are permitted provided that the following conditions are met: 00019 00020 * Redistributions of source code must retain the above copyright 00021 notice, this list of conditions and the following disclaimer. 00022 * Redistributions in binary form must reproduce the above copyright 00023 notice, this list of conditions and the following disclaimer in 00024 the documentation and/or other materials provided with the 00025 distribution. 00026 * Neither the name of the copyright holders nor the names of 00027 contributors may be used to endorse or promote products derived 00028 from this software without specific prior written permission. 00029 00030 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00031 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00032 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00033 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00034 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00035 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00036 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00037 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00038 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00039 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00040 POSSIBILITY OF SUCH DAMAGE. 00041 */ 00042 00043 /** 00044 \addtogroup usbstorage 00045 @{ 00046 */ 00047 00048 #ifndef _CONF_ACCESS_H_ 00049 #define _CONF_ACCESS_H_ 00050 00051 00052 // Active the Logical Unit 00053 #define LUN_0 DISABLE // On-Chip flash vitual memory 00054 #define LUN_1 DISABLE // NF 2KB 00055 #define LUN_2 DISABLE // NF 512B 00056 #define LUN_3 DISABLE // Data Flash 00057 #define LUN_4 ENABLE //On-chip 32KB 00058 #define LUN_5 DISABLE 00059 #define LUN_6 DISABLE 00060 #define LUN_7 DISABLE 00061 #define LUN_USB DISABLE 00062 00063 // LUN 0 DEFINE 00064 #define LUN_0_INCLUDE "lib_mem\virtual_mem\virtual_mem.h" 00065 #define Lun_0_test_unit_ready() virtual_test_unit_ready() 00066 #define Lun_0_read_capacity(nb_sect) virtual_read_capacity(nb_sect) 00067 #define Lun_0_wr_protect() virtual_wr_protect() 00068 #define Lun_0_removal() virtual_removal() 00069 #define Lun_0_read_10(ad, sec) virtual_read_10(ad, sec) 00070 #define Lun_0_usb_read() virtual_usb_read() 00071 #define Lun_0_write_10(ad, sec) virtual_write_10(ad, sec) 00072 #define Lun_0_usb_write() virtual_usb_write() 00073 #define Lun_0_ram_2_mem(addr , ram) virtual_ram_2_mem(addr, ram) 00074 #define Lun_0_ram_2_mem_write() virtual_ram_2_mem_write() 00075 #define Lun_0_mem_2_ram(addr , ram) virtual_mem_2_ram(addr, ram) 00076 #define Lun_0_mem_2_ram_read() virtual_mem_2_ram_read() 00077 #define LUN_0_NAME "VIRTUAL_MEM_ON_CHIP" 00078 00079 // LUN 1 DEFINE 00080 #if (LUN_1 == ENABLE) 00081 #define NF_2K_MEM ENABLE 00082 #else 00083 #define NF_2K_MEM DISABLE 00084 #endif 00085 #define LUN_1_INCLUDE "lib_mem\nf_1x_2kb\nf_mem.h" 00086 #define Lun_1_test_unit_ready() nf_test_unit_ready() 00087 #define Lun_1_read_capacity(nb_sect) nf_read_capacity(nb_sect) 00088 #define Lun_1_wr_protect() nf_wr_protect() 00089 #define Lun_1_removal() nf_removal() 00090 #define Lun_1_read_10(ad, sec) nf_read_10(ad, sec) 00091 #define Lun_1_usb_read() nf_usb_read() 00092 #define Lun_1_write_10(ad, sec) nf_write_10(ad, sec) 00093 #define Lun_1_usb_write() nf_usb_write() 00094 #define Lun_1_ram_2_mem(addr , ram) TODO 00095 #define Lun_1_ram_2_mem_write() TODO 00096 #define Lun_1_mem_2_ram(addr , ram) TODO 00097 #define Lun_1_mem_2_ram_read() TODO 00098 00099 // LUN 2 DEFINE 00100 #if (LUN_2 == ENABLE) 00101 #define NF_512_MEM ENABLE 00102 #else 00103 #define NF_512_MEM DISABLE 00104 #endif 00105 #define LUN_2_INCLUDE "lib_mem\nf_1x_512\nf_mem.h" 00106 #define Lun_2_test_unit_ready() nf_test_unit_ready() 00107 #define Lun_2_read_capacity(nb_sect) nf_read_capacity(nb_sect) 00108 #define Lun_2_wr_protect() nf_wr_protect() 00109 #define Lun_2_removal() nf_removal() 00110 #define Lun_2_read_10(ad, sec) nf_read_10(ad, sec) 00111 #define Lun_2_usb_read() nf_usb_read() 00112 #define Lun_2_write_10(ad, sec) nf_write_10(ad, sec) 00113 #define Lun_2_usb_write() nf_usb_write() 00114 #define Lun_2_ram_2_mem(addr , ram) TODO 00115 #define Lun_2_ram_2_mem_write() TODO 00116 #define Lun_2_mem_2_ram(addr , ram) TODO 00117 #define Lun_2_mem_2_ram_read() TODO 00118 00119 // LUN 3 DEFINE 00120 #if (LUN_3 == ENABLE) 00121 #define DF_MEM ENABLE 00122 #else 00123 #define DF_MEM DISABLE 00124 #endif 00125 #define LUN_ID_DF LUN_ID_3 00126 #define LUN_3_INCLUDE "lib_mem\df\df_mem.h" 00127 #define Lun_3_test_unit_ready() df_test_unit_ready() 00128 #define Lun_3_read_capacity(nb_sect) df_read_capacity(nb_sect) 00129 #define Lun_3_wr_protect() df_wr_protect() 00130 #define Lun_3_removal() df_removal() 00131 #define Lun_3_read_10(ad, sec) df_read_10(ad, sec) 00132 #define Lun_3_usb_read() df_usb_read() 00133 #define Lun_3_write_10(ad, sec) df_write_10(ad, sec) 00134 #define Lun_3_usb_write() df_usb_write() 00135 #define Lun_3_ram_2_mem(addr , ram) df_ram_2_df(addr, ram) 00136 #define Lun_3_ram_2_mem_write() df_ram_2_df_write() 00137 #define Lun_3_mem_2_ram(addr , ram) df_df_2_ram(addr, ram) 00138 #define Lun_3_mem_2_ram_read() df_df_2_ram_read() 00139 #define LUN_3_NAME "\"On board data flash\"" 00140 00141 // LUN 3 DEFINE 00142 #if (LUN_3 == ENABLE) 00143 #define AVR_MEM ENABLE 00144 #else 00145 #define AVR_MEM DISABLE 00146 #endif 00147 #define LUN_ID_AVRF LUN_ID_4 00148 #define LUN_4_INCLUDE "storage/avr_flash.h" 00149 #define Lun_4_test_unit_ready() avrf_test_unit_ready() 00150 #define Lun_4_read_capacity(nb_sect) avrf_read_capacity(nb_sect) 00151 #define Lun_4_wr_protect() avrf_wr_protect() 00152 #define Lun_4_removal() avrf_removal() 00153 #define Lun_4_read_10(ad, sec) avrf_read_10(ad, sec) 00154 #define Lun_4_usb_read() avrf_usb_read() 00155 #define Lun_4_write_10(ad, sec) avrf_write_10(ad,sec) 00156 #define Lun_4_usb_write() avrf_usb_write() 00157 #define Lun_4_ram_2_mem(addr , ram) TODO 00158 #define Lun_4_ram_2_mem_write() TODO 00159 #define Lun_4_mem_2_ram(addr , ram) TODO 00160 #define Lun_4_mem_2_ram_read() TODO 00161 #define LUN_4_NAME "\"AVR Flash Memory\"" 00162 00163 00164 // LUN USB DEFINE 00165 #if (LUN_USB == ENABLE) 00166 #define MEM_USB ENABLE 00167 #else 00168 #define MEM_USB DISABLE 00169 #endif 00170 #define LUN_USB_INCLUDE "lib_mem\host_mem\host_mem.h" 00171 #define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun) 00172 #define Lun_usb_read_capacity(lun,nb_sect) host_read_capacity(lun,nb_sect) 00173 #define Lun_usb_wr_protect(lun) host_wr_protect(lun) 00174 #define Lun_usb_removal() host_removal() 00175 #define Lun_usb_ram_2_mem(addr , ram) host_write_10_ram(addr, ram) 00176 #define Lun_usb_mem_2_ram(addr , ram) host_read_10_ram(addr, ram) 00177 #define LUN_USB_NAME "\"USB Remote memory\"" 00178 00179 00180 // ATMEL DEFINE - DO NOT MODIFY 00181 00182 // Active interface fonction 00183 #define ACCESS_USB ENABLED // USB I/O in control access 00184 #define ACCESS_STREAM DISABLED // Stream I/O in control access 00185 #define ACCESS_STREAM_RECORD DISABLED // Stream I/O in control access AND RECORD MODE 00186 #define ACCESS_MEM_TO_RAM DISABLED // RAM to Mem I/O in control access 00187 #define ACCESS_MEM_TO_MEM DISABLED // Mem to Mem I/O in control access 00188 00189 00190 00191 // Specific option control access 00192 #define GLOBAL_WR_PROTECT DISABLED // To manage a global write protection 00193 00194 00195 #endif //! _CONF_ACCESS_H_ 00196 00197 /** @} */