00001
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 #ifndef _CONF_ACCESS_H_
00050 #define _CONF_ACCESS_H_
00051
00052 #include "compiler.h"
00053 #include "board.h"
00054
00055
00058
00059 #define LUN_0 ENABLE
00060 #define LUN_1 ENABLE
00061 #if BOARD == EVK1100 || BOARD == EVK1101 || BOARD == EVK1105 || BOARD == UC3C_EK
00062 # define LUN_2 ENABLE
00063 # define LUN_3 DISABLE
00064 #elif BOARD == EVK1104
00065 # define LUN_2 DISABLE
00066 # define LUN_3 ENABLE
00067 #endif
00068 #define LUN_4 DISABLE
00069 #define LUN_5 DISABLE
00070 #define LUN_6 DISABLE
00071 #define LUN_7 DISABLE
00072 #define LUN_USB ENABLE
00073
00074
00075
00077
00078 #define VIRTUAL_MEM LUN_0
00079 #define LUN_ID_VIRTUAL_MEM LUN_ID_0
00080 #define LUN_0_INCLUDE "virtual_mem.h"
00081 #define Lun_0_test_unit_ready virtual_test_unit_ready
00082 #define Lun_0_read_capacity virtual_read_capacity
00083 #define Lun_0_wr_protect virtual_wr_protect
00084 #define Lun_0_removal virtual_removal
00085 #define Lun_0_usb_read_10 virtual_usb_read_10
00086 #define Lun_0_usb_write_10 virtual_usb_write_10
00087 #define Lun_0_mem_2_ram virtual_mem_2_ram
00088 #define Lun_0_ram_2_mem virtual_ram_2_mem
00089 #define LUN_0_NAME "\"On-Chip Virtual Memory\""
00091
00092
00094
00095 #define AT45DBX_MEM LUN_1
00096 #define LUN_ID_AT45DBX_MEM LUN_ID_1
00097 #define LUN_1_INCLUDE "at45dbx_mem.h"
00098 #define Lun_1_test_unit_ready at45dbx_test_unit_ready
00099 #define Lun_1_read_capacity at45dbx_read_capacity
00100 #define Lun_1_wr_protect at45dbx_wr_protect
00101 #define Lun_1_removal at45dbx_removal
00102 #define Lun_1_usb_read_10 at45dbx_usb_read_10
00103 #define Lun_1_usb_write_10 at45dbx_usb_write_10
00104 #define Lun_1_mem_2_ram at45dbx_df_2_ram
00105 #define Lun_1_ram_2_mem at45dbx_ram_2_df
00106 #define LUN_1_NAME "\"AT45DBX Data Flash\""
00108
00109
00111
00112 #define SD_MMC_SPI_MEM LUN_2
00113 #define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
00114 #define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
00115 #define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
00116 #define Lun_2_read_capacity sd_mmc_spi_read_capacity
00117 #define Lun_2_wr_protect sd_mmc_spi_wr_protect
00118 #define Lun_2_removal sd_mmc_spi_removal
00119 #define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
00120 #define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
00121 #define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
00122 #define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
00123 #define LUN_2_NAME "\"SD/MMC Card over SPI\""
00125
00126
00128
00129 #define SD_MMC_MCI_0_MEM LUN_3
00130 #define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
00131 #define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
00132 #define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
00133 #define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
00134 #define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
00135 #define Lun_3_removal sd_mmc_mci_removal_0
00136 #define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
00137 #define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
00138 #define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
00139 #define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
00140 #define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
00142
00143
00145
00146 #define MEM_USB LUN_USB
00147 #define LUN_ID_MEM_USB LUN_ID_USB
00148 #define LUN_USB_INCLUDE "host_mem.h"
00149 #define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
00150 #define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
00151 #define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
00152 #define Lun_usb_wr_protect(lun) host_wr_protect(lun)
00153 #define Lun_usb_removal() host_removal()
00154 #define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
00155 #define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
00156 #define LUN_USB_NAME "\"Host Mass-Storage Memory\""
00158
00159
00165
00166 #if BOARD == EVK1100
00167 # define memory_start_read_action(nb_sectors) LED_On(LED_BI0_GREEN)
00168 # define memory_stop_read_action() LED_Off(LED_BI0_GREEN)
00169 # define memory_start_write_action(nb_sectors) LED_On(LED_BI0_RED)
00170 # define memory_stop_write_action() LED_Off(LED_BI0_RED)
00171 #elif BOARD == EVK1101 || BOARD == EVK1104 || BOARD == EVK1105 || BOARD == UC3C_EK
00172 # define memory_start_read_action(nb_sectors) LED_On(LED2)
00173 # define memory_stop_read_action() LED_Off(LED2)
00174 # define memory_start_write_action(nb_sectors) LED_On(LED3)
00175 # define memory_stop_write_action() LED_Off(LED3)
00176 #else
00177 # error The actions associated with memory accesses must be defined here.
00178 #endif
00180
00181
00183
00184 #define ACCESS_USB ENABLED
00185 #define ACCESS_MEM_TO_RAM ENABLED
00186 #define ACCESS_STREAM ENABLED
00187 #define ACCESS_STREAM_RECORD DISABLED
00188 #define ACCESS_MEM_TO_MEM ENABLED
00189 #define ACCESS_CODEC DISABLED
00190
00191
00192
00194
00195 #define GLOBAL_WR_PROTECT DISABLED
00196
00197
00198
00199 #endif // _CONF_ACCESS_H_