conf_access.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * \file
4  *
5  * \brief Memory access control configuration file.
6  *
7  * This file contains the possible external configuration of the memory access
8  * control.
9  *
10  * Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
11  *
12  * \asf_license_start
13  *
14  * \page License
15  *
16  * Subject to your compliance with these terms, you may use Microchip
17  * software and any derivatives exclusively with Microchip products.
18  * It is your responsibility to comply with third party license terms applicable
19  * to your use of third party software (including open source software) that
20  * may accompany Microchip software.
21  *
22  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
23  * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
24  * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
25  * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
26  * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
27  * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
28  * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
29  * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
30  * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
31  * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
32  * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
33  *
34  * \asf_license_stop
35  *
36  ******************************************************************************/
37 /*
38  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
39  */
40 
41 
43 
44 #ifndef _CONF_ACCESS_H_
45 #define _CONF_ACCESS_H_
46 
47 #include "compiler.h"
48 #include "board.h"
49 
50 
53 #ifdef VIRTUAL_MEMORY_ENABLE
55 #define LUN_0 ENABLE
56 #else
57 #define LUN_0 DISABLE
58 #endif
59 
60 #ifdef AT45DBX_ENABLE
61 #define LUN_1 ENABLE
62 #else
63 #define LUN_1 DISABLE
64 #endif
65 
67 #ifdef SD_MMC_ENABLE
68 #define LUN_2 ENABLE
69 #define LUN_3 ENABLE
70 #define ACCESS_MEM_TO_RAM_ENABLED
71 #else
72 #define LUN_2 DISABLE
73 #define LUN_3 DISABLE
74 #endif
75 
77 #ifdef SD_MMC_SPI_ENABLE
78 #define LUN_4 ENABLE
79 #else
80 #define LUN_4 DISABLE
81 #endif
82 
84 #ifdef SD_MMC_MCI_ENABLE
85 #define LUN_5 ENABLE
86 #else
87 #define LUN_5 DISABLE
88 #endif
89 
90 #define LUN_6 DISABLE
91 #define LUN_7 DISABLE
92 
93 #ifdef USB_MASS_STORAGE_ENABLE
94 #define LUN_USB ENABLE
95 #else
96 #define LUN_USB DISABLE
97 #endif
98 
100 
103 #define VIRTUAL_MEM LUN_0
105 #define LUN_ID_VIRTUAL_MEM LUN_ID_0
106 #define LUN_0_INCLUDE "virtual_mem.h"
107 #define Lun_0_test_unit_ready virtual_test_unit_ready
108 #define Lun_0_read_capacity virtual_read_capacity
109 #define Lun_0_unload NULL /* Can not be unloaded */
110 #define Lun_0_wr_protect virtual_wr_protect
111 #define Lun_0_removal virtual_removal
112 #define Lun_0_usb_read_10 virtual_usb_read_10
113 #define Lun_0_usb_write_10 virtual_usb_write_10
114 #define Lun_0_mem_2_ram virtual_mem_2_ram
115 #define Lun_0_ram_2_mem virtual_ram_2_mem
116 #define LUN_0_NAME "\"On-Chip Virtual Memory\""
117 
121 #define AT45DBX_MEM LUN_1
123 #define LUN_ID_AT45DBX_MEM LUN_ID_1
124 #define LUN_1_INCLUDE "at45dbx_mem.h"
125 #define Lun_1_test_unit_ready at45dbx_test_unit_ready
126 #define Lun_1_read_capacity at45dbx_read_capacity
127 #define Lun_1_unload NULL /* Can not be unloaded */
128 #define Lun_1_wr_protect at45dbx_wr_protect
129 #define Lun_1_removal at45dbx_removal
130 #define Lun_1_usb_read_10 at45dbx_usb_read_10
131 #define Lun_1_usb_write_10 at45dbx_usb_write_10
132 #define Lun_1_mem_2_ram at45dbx_df_2_ram
133 #define Lun_1_ram_2_mem at45dbx_ram_2_df
134 #define LUN_1_NAME "\"AT45DBX Data Flash\""
135 
139 #define SD_MMC_0_MEM LUN_2
141 #define LUN_ID_SD_MMC_0_MEM LUN_ID_2
142 #define LUN_2_INCLUDE "sd_mmc_mem.h"
143 #define Lun_2_test_unit_ready sd_mmc_test_unit_ready_0
144 #define Lun_2_read_capacity sd_mmc_read_capacity_0
145 #define Lun_2_unload sd_mmc_unload_0
146 #define Lun_2_wr_protect sd_mmc_wr_protect_0
147 #define Lun_2_removal sd_mmc_removal_0
148 #define Lun_2_usb_read_10 sd_mmc_usb_read_10_0
149 #define Lun_2_usb_write_10 sd_mmc_usb_write_10_0
150 #define Lun_2_mem_2_ram sd_mmc_mem_2_ram_0
151 #define Lun_2_ram_2_mem sd_mmc_ram_2_mem_0
152 #define LUN_2_NAME "\"SD/MMC Card Slot 0\""
153 
157 #define SD_MMC_1_MEM LUN_3
159 #define LUN_ID_SD_MMC_1_MEM LUN_ID_3
160 #define LUN_3_INCLUDE "sd_mmc_mem.h"
161 #define Lun_3_test_unit_ready sd_mmc_test_unit_ready_1
162 #define Lun_3_read_capacity sd_mmc_read_capacity_1
163 #define Lun_3_unload sd_mmc_unload_1
164 #define Lun_3_wr_protect sd_mmc_wr_protect_1
165 #define Lun_3_removal sd_mmc_removal_1
166 #define Lun_3_usb_read_10 sd_mmc_usb_read_10_1
167 #define Lun_3_usb_write_10 sd_mmc_usb_write_10_1
168 #define Lun_3_mem_2_ram sd_mmc_mem_2_ram_1
169 #define Lun_3_ram_2_mem sd_mmc_ram_2_mem_1
170 #define LUN_3_NAME "\"SD/MMC Card Slot 1\""
171 
175 #define SD_MMC_SPI_MEM LUN_4
177 #define LUN_ID_SD_MMC_SPI_MEM LUN_ID_4
178 #define LUN_4_INCLUDE "sd_mmc_spi_mem.h"
179 #define Lun_4_test_unit_ready sd_mmc_spi_test_unit_ready
180 #define Lun_4_read_capacity sd_mmc_spi_read_capacity
181 #define Lun_4_unload NULL
182 #define Lun_4_wr_protect sd_mmc_spi_wr_protect
183 #define Lun_4_removal sd_mmc_spi_removal
184 #define Lun_4_usb_read_10 sd_mmc_spi_usb_read_10
185 #define Lun_4_usb_write_10 sd_mmc_spi_usb_write_10
186 #define Lun_4_mem_2_ram sd_mmc_spi_mem_2_ram
187 #define Lun_4_ram_2_mem sd_mmc_spi_ram_2_mem
188 #define LUN_4_NAME "\"SD/MMC Card over SPI\""
189 
193 #define SD_MMC_MCI_0_MEM LUN_5
195 #define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_5
196 #define LUN_5_INCLUDE "sd_mmc_mci_mem.h"
197 #define Lun_5_test_unit_ready sd_mmc_mci_test_unit_ready_0
198 #define Lun_5_read_capacity sd_mmc_mci_read_capacity_0
199 #define Lun_5_unload NULL
200 #define Lun_5_wr_protect sd_mmc_mci_wr_protect_0
201 #define Lun_5_removal sd_mmc_mci_removal_0
202 #define Lun_5_usb_read_10 sd_mmc_mci_usb_read_10_0
203 #define Lun_5_usb_write_10 sd_mmc_mci_usb_write_10_0
204 #define Lun_5_mem_2_ram sd_mmc_mci_mem_2_ram_0
205 #define Lun_5_ram_2_mem sd_mmc_mci_ram_2_mem_0
206 #define LUN_5_NAME "\"SD/MMC Card over MCI Slot 0\""
207 
211 #define MEM_USB LUN_USB
213 #define LUN_ID_MEM_USB LUN_ID_USB
214 #define LUN_USB_INCLUDE "uhi_msc_mem.h"
215 #define Lun_usb_get_lun() uhi_msc_mem_get_lun()
216 #define Lun_usb_test_unit_ready(lun) uhi_msc_mem_test_unit_ready(lun)
217 #define Lun_usb_read_capacity(lun, nb_sect) uhi_msc_mem_read_capacity(lun, nb_sect)
218 #define Lun_usb_read_sector_size(lun) uhi_msc_mem_read_sector_size(lun)
219 #define Lun_usb_unload NULL
220 #define Lun_usb_wr_protect(lun) uhi_msc_mem_wr_protect(lun)
221 #define Lun_usb_removal() uhi_msc_mem_removal()
222 #define Lun_usb_mem_2_ram(addr, ram) uhi_msc_mem_read_10_ram(addr, ram)
223 #define Lun_usb_ram_2_mem(addr, ram) uhi_msc_mem_write_10_ram(addr, ram)
224 #define LUN_USB_NAME "\"Host Mass-Storage Memory\""
225 
233 #define memory_start_read_action(nb_sectors)
235 #define memory_stop_read_action()
236 #define memory_start_write_action(nb_sectors)
237 #define memory_stop_write_action()
238 
242 #ifdef ACCESS_USB_ENABLED
244 #define ACCESS_USB true
245 #else
246 #define ACCESS_USB false
247 #endif
248 
249 #ifdef ACCESS_MEM_TO_RAM_ENABLED
250 #define ACCESS_MEM_TO_RAM true
251 #else
252 #define ACCESS_MEM_TO_RAM false
253 #endif
254 
255 #define ACCESS_STREAM false
256 #define ACCESS_STREAM_RECORD false
257 #define ACCESS_MEM_TO_MEM false
258 #define ACCESS_CODEC false
259 
261 
263 #define GLOBAL_WR_PROTECT false
265 
267 
269 #define SECTOR_SIZE 512
271 
273 #endif // _CONF_ACCESS_H_
Commonly used includes, types and macros.
Standard board header file.


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57