00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef _CONF_ACCESS_H_
00055 #define _CONF_ACCESS_H_
00056
00057 #include "compiler.h"
00058 #include "board.h"
00059
00060
00061
00062
00063
00064 #ifdef VIRTUAL_MEMORY_ENABLE
00065 #define LUN_0 ENABLE //!< Enable On-Chip Virtual Memory.
00066 #else
00067 #define LUN_0 DISABLE //!< Disable On-Chip Virtual Memory.
00068 #endif
00069
00070 #ifdef AT45DBX_ENABLE
00071 #define LUN_1 ENABLE //!< Enable AT45DBX Data Flash.
00072 #else
00073 #define LUN_1 DISABLE //!< Disable AT45DBX Data Flash.
00074 #endif
00075
00076
00077 #ifdef SD_MMC_ENABLE
00078 #define LUN_2 ENABLE //!< Enable common SD/MMC stack
00079 #define LUN_3 ENABLE
00080 #else
00081 #define LUN_2 DISABLE //!< Disable common SD/MMC stack
00082 #define LUN_3 DISABLE
00083 #endif
00084
00085
00086 #ifdef SD_MMC_SPI_ENABLE
00087 #define LUN_4 ENABLE //!< Enable SD/MMC Card over SPI or SPI.
00088 #else
00089 #define LUN_4 DISABLE //!< Disable SD/MMC Card over SPI or SPI.
00090 #endif
00091
00092
00093 #ifdef SD_MMC_MCI_ENABLE
00094 #define LUN_5 ENABLE //!< Enable SD/MMC Card over MCI or MCI.
00095 #else
00096 #define LUN_5 DISABLE //!< Disable SD/MMC Card over MCI or MCI.
00097 #endif
00098
00099 #define LUN_6 DISABLE
00100 #define LUN_7 DISABLE
00101
00102 #ifdef USB_MASS_STORAGE_ENABLE
00103 #define LUN_USB ENABLE //!< Enable Host Mass-Storage Memory.
00104 #else
00105 #define LUN_USB DISABLE //!< Disable Host Mass-Storage Memory.
00106 #endif
00107
00108
00109
00110
00111
00112
00113 #define VIRTUAL_MEM LUN_0
00114 #define LUN_ID_VIRTUAL_MEM LUN_ID_0
00115 #define LUN_0_INCLUDE "virtual_mem.h"
00116 #define Lun_0_test_unit_ready virtual_test_unit_ready
00117 #define Lun_0_read_capacity virtual_read_capacity
00118 #define Lun_0_unload NULL
00119 #define Lun_0_wr_protect virtual_wr_protect
00120 #define Lun_0_removal virtual_removal
00121 #define Lun_0_usb_read_10 virtual_usb_read_10
00122 #define Lun_0_usb_write_10 virtual_usb_write_10
00123 #define Lun_0_mem_2_ram virtual_mem_2_ram
00124 #define Lun_0_ram_2_mem virtual_ram_2_mem
00125 #define LUN_0_NAME "\"On-Chip Virtual Memory\""
00126
00127
00128
00129
00130
00131 #define AT45DBX_MEM LUN_1
00132 #define LUN_ID_AT45DBX_MEM LUN_ID_1
00133 #define LUN_1_INCLUDE "at45dbx_mem.h"
00134 #define Lun_1_test_unit_ready at45dbx_test_unit_ready
00135 #define Lun_1_read_capacity at45dbx_read_capacity
00136 #define Lun_1_unload NULL
00137 #define Lun_1_wr_protect at45dbx_wr_protect
00138 #define Lun_1_removal at45dbx_removal
00139 #define Lun_1_usb_read_10 at45dbx_usb_read_10
00140 #define Lun_1_usb_write_10 at45dbx_usb_write_10
00141 #define Lun_1_mem_2_ram at45dbx_df_2_ram
00142 #define Lun_1_ram_2_mem at45dbx_ram_2_df
00143 #define LUN_1_NAME "\"AT45DBX Data Flash\""
00144
00145
00146
00147
00148
00149 #define SD_MMC_0_MEM LUN_2
00150 #define LUN_ID_SD_MMC_0_MEM LUN_ID_2
00151 #define LUN_2_INCLUDE "sd_mmc_mem.h"
00152 #define Lun_2_test_unit_ready sd_mmc_test_unit_ready_0
00153 #define Lun_2_read_capacity sd_mmc_read_capacity_0
00154 #define Lun_2_unload sd_mmc_unload_0
00155 #define Lun_2_wr_protect sd_mmc_wr_protect_0
00156 #define Lun_2_removal sd_mmc_removal_0
00157 #define Lun_2_usb_read_10 sd_mmc_usb_read_10_0
00158 #define Lun_2_usb_write_10 sd_mmc_usb_write_10_0
00159 #define Lun_2_mem_2_ram sd_mmc_mem_2_ram_0
00160 #define Lun_2_ram_2_mem sd_mmc_ram_2_mem_0
00161 #define LUN_2_NAME "\"SD/MMC Card Slot 0\""
00162
00163
00164
00165
00166
00167 #define SD_MMC_1_MEM LUN_3
00168 #define LUN_ID_SD_MMC_1_MEM LUN_ID_3
00169 #define LUN_3_INCLUDE "sd_mmc_mem.h"
00170 #define Lun_3_test_unit_ready sd_mmc_test_unit_ready_1
00171 #define Lun_3_read_capacity sd_mmc_read_capacity_1
00172 #define Lun_3_unload sd_mmc_unload_1
00173 #define Lun_3_wr_protect sd_mmc_wr_protect_1
00174 #define Lun_3_removal sd_mmc_removal_1
00175 #define Lun_3_usb_read_10 sd_mmc_usb_read_10_1
00176 #define Lun_3_usb_write_10 sd_mmc_usb_write_10_1
00177 #define Lun_3_mem_2_ram sd_mmc_mem_2_ram_1
00178 #define Lun_3_ram_2_mem sd_mmc_ram_2_mem_1
00179 #define LUN_3_NAME "\"SD/MMC Card Slot 1\""
00180
00181
00182
00183
00184
00185 #define SD_MMC_SPI_MEM LUN_4
00186 #define LUN_ID_SD_MMC_SPI_MEM LUN_ID_4
00187 #define LUN_4_INCLUDE "sd_mmc_spi_mem.h"
00188 #define Lun_4_test_unit_ready sd_mmc_spi_test_unit_ready
00189 #define Lun_4_read_capacity sd_mmc_spi_read_capacity
00190 #define Lun_4_unload NULL
00191 #define Lun_4_wr_protect sd_mmc_spi_wr_protect
00192 #define Lun_4_removal sd_mmc_spi_removal
00193 #define Lun_4_usb_read_10 sd_mmc_spi_usb_read_10
00194 #define Lun_4_usb_write_10 sd_mmc_spi_usb_write_10
00195 #define Lun_4_mem_2_ram sd_mmc_spi_mem_2_ram
00196 #define Lun_4_ram_2_mem sd_mmc_spi_ram_2_mem
00197 #define LUN_4_NAME "\"SD/MMC Card over SPI\""
00198
00199
00200
00201
00202
00203 #define SD_MMC_MCI_0_MEM LUN_5
00204 #define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_5
00205 #define LUN_5_INCLUDE "sd_mmc_mci_mem.h"
00206 #define Lun_5_test_unit_ready sd_mmc_mci_test_unit_ready_0
00207 #define Lun_5_read_capacity sd_mmc_mci_read_capacity_0
00208 #define Lun_5_unload NULL
00209 #define Lun_5_wr_protect sd_mmc_mci_wr_protect_0
00210 #define Lun_5_removal sd_mmc_mci_removal_0
00211 #define Lun_5_usb_read_10 sd_mmc_mci_usb_read_10_0
00212 #define Lun_5_usb_write_10 sd_mmc_mci_usb_write_10_0
00213 #define Lun_5_mem_2_ram sd_mmc_mci_mem_2_ram_0
00214 #define Lun_5_ram_2_mem sd_mmc_mci_ram_2_mem_0
00215 #define LUN_5_NAME "\"SD/MMC Card over MCI Slot 0\""
00216
00217
00218
00219
00220
00221 #define MEM_USB LUN_USB
00222 #define LUN_ID_MEM_USB LUN_ID_USB
00223 #define LUN_USB_INCLUDE "uhi_msc_mem.h"
00224 #define Lun_usb_get_lun() uhi_msc_mem_get_lun()
00225 #define Lun_usb_test_unit_ready(lun) uhi_msc_mem_test_unit_ready(lun)
00226 #define Lun_usb_read_capacity(lun, nb_sect) uhi_msc_mem_read_capacity(lun, nb_sect)
00227 #define Lun_usb_read_sector_size(lun) uhi_msc_mem_read_sector_size(lun)
00228 #define Lun_usb_wr_protect(lun) uhi_msc_mem_wr_protect(lun)
00229 #define Lun_usb_removal() uhi_msc_mem_removal()
00230 #define Lun_usb_mem_2_ram(addr, ram) uhi_msc_mem_read_10_ram(addr, ram)
00231 #define Lun_usb_ram_2_mem(addr, ram) uhi_msc_mem_write_10_ram(addr, ram)
00232 #define LUN_USB_NAME "\"Host Mass-Storage Memory\""
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242 #define memory_start_read_action(nb_sectors) ui_start_read()
00243 #define memory_stop_read_action() ui_stop_read()
00244 #define memory_start_write_action(nb_sectors) ui_start_write()
00245 #define memory_stop_write_action() ui_stop_write()
00246 extern void ui_start_read(void);
00247 extern void ui_stop_read(void);
00248 extern void ui_start_write(void);
00249 extern void ui_stop_write(void);
00250
00251
00252
00253
00254
00255 #ifdef ACCESS_USB_ENABLED
00256 #define ACCESS_USB true //!< MEM <-> USB interface.
00257 #else
00258 #define ACCESS_USB false //!< MEM <-> USB interface.
00259 #endif
00260
00261 #ifdef ACCESS_MEM_TO_RAM_ENABLED
00262 #define ACCESS_MEM_TO_RAM true //!< MEM <-> RAM interface.
00263 #else
00264 #define ACCESS_MEM_TO_RAM false //!< MEM <-> RAM interface.
00265 #endif
00266
00267 #define ACCESS_STREAM false //!< Streaming MEM <-> MEM interface.
00268 #define ACCESS_STREAM_RECORD false //!< Streaming MEM <-> MEM interface in record mode.
00269 #define ACCESS_MEM_TO_MEM false //!< MEM <-> MEM interface.
00270 #define ACCESS_CODEC false //!< Codec interface.
00271
00272
00273
00274
00275
00276 #define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
00277
00278
00279
00280
00281
00282 #define SECTOR_SIZE 512
00283
00284
00285 #endif // _CONF_ACCESS_H_