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