|
| 1 | +/** |
| 2 | + * \file |
| 3 | + * |
| 4 | + * \brief Memory access control configuration file. |
| 5 | + * |
| 6 | + * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. |
| 7 | + * |
| 8 | + * \asf_license_start |
| 9 | + * |
| 10 | + * \page License |
| 11 | + * |
| 12 | + * Redistribution and use in source and binary forms, with or without |
| 13 | + * modification, are permitted provided that the following conditions are met: |
| 14 | + * |
| 15 | + * 1. Redistributions of source code must retain the above copyright notice, |
| 16 | + * this list of conditions and the following disclaimer. |
| 17 | + * |
| 18 | + * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 19 | + * this list of conditions and the following disclaimer in the documentation |
| 20 | + * and/or other materials provided with the distribution. |
| 21 | + * |
| 22 | + * 3. The name of Atmel may not be used to endorse or promote products derived |
| 23 | + * from this software without specific prior written permission. |
| 24 | + * |
| 25 | + * 4. This software may only be redistributed and used in connection with an |
| 26 | + * Atmel microcontroller product. |
| 27 | + * |
| 28 | + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
| 29 | + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 30 | + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
| 31 | + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
| 32 | + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 33 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 34 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 35 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 36 | + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 37 | + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 38 | + * POSSIBILITY OF SUCH DAMAGE. |
| 39 | + * |
| 40 | + * \asf_license_stop |
| 41 | + * |
| 42 | + */ |
| 43 | +/* |
| 44 | + * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
| 45 | + */ |
| 46 | + |
| 47 | +#ifndef _CONF_ACCESS_H_ |
| 48 | +#define _CONF_ACCESS_H_ |
| 49 | + |
| 50 | +#include "compiler.h" |
| 51 | +#include "board.h" |
| 52 | + |
| 53 | + |
| 54 | +/*! \name Activation of Logical Unit Numbers |
| 55 | + */ |
| 56 | +//! @{ |
| 57 | +#define LUN_0 ENABLE //!< On-Chip Virtual Memory. |
| 58 | +#define LUN_1 DISABLE //!< AT45DBX Data Flash. |
| 59 | +#define LUN_2 DISABLE //!< SD/MMC Card over SPI. |
| 60 | +#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0. |
| 61 | +#define LUN_4 DISABLE |
| 62 | +#define LUN_5 DISABLE |
| 63 | +#define LUN_6 DISABLE |
| 64 | +#define LUN_7 DISABLE |
| 65 | +#define LUN_USB DISABLE //!< Host Mass-Storage Memory. |
| 66 | +//! @} |
| 67 | + |
| 68 | +/*! \name LUN 0 Definitions |
| 69 | + */ |
| 70 | +//! @{ |
| 71 | +#define LUN_0_INCLUDE "access_vfs.h" |
| 72 | +#define Lun_0_test_unit_ready vfs_test_unit_ready |
| 73 | +#define Lun_0_read_capacity vfs_read_capacity |
| 74 | +#define Lun_0_unload NULL |
| 75 | +#define Lun_0_wr_protect vfs_wr_protect |
| 76 | +#define Lun_0_removal vfs_removal |
| 77 | +#define Lun_0_usb_read_10 vfs_usb_read_10 |
| 78 | +#define Lun_0_usb_write_10 vfs_usb_write_10 |
| 79 | +#define LUN_0_NAME "\"CircuitPython VFS[0]\"" |
| 80 | +//! @} |
| 81 | + |
| 82 | +#define MEM_USB LUN_USB |
| 83 | + |
| 84 | +/*! \name Actions Associated with Memory Accesses |
| 85 | + * |
| 86 | + * Write here the action to associate with each memory access. |
| 87 | + * |
| 88 | + * \warning Be careful not to waste time in order not to disturb the functions. |
| 89 | + */ |
| 90 | +//! @{ |
| 91 | +#define memory_start_read_action(nb_sectors) |
| 92 | +#define memory_stop_read_action() |
| 93 | +#define memory_start_write_action(nb_sectors) |
| 94 | +#define memory_stop_write_action() |
| 95 | +//! @} |
| 96 | + |
| 97 | +/*! \name Activation of Interface Features |
| 98 | + */ |
| 99 | +//! @{ |
| 100 | +#define ACCESS_USB true //!< MEM <-> USB interface. |
| 101 | +#define ACCESS_MEM_TO_RAM false //!< MEM <-> RAM interface. |
| 102 | +#define ACCESS_STREAM false //!< Streaming MEM <-> MEM interface. |
| 103 | +#define ACCESS_STREAM_RECORD false //!< Streaming MEM <-> MEM interface in record mode. |
| 104 | +#define ACCESS_MEM_TO_MEM false //!< MEM <-> MEM interface. |
| 105 | +#define ACCESS_CODEC false //!< Codec interface. |
| 106 | +//! @} |
| 107 | + |
| 108 | +/*! \name Specific Options for Access Control |
| 109 | + */ |
| 110 | +//! @{ |
| 111 | +#define GLOBAL_WR_PROTECT false //!< Management of a global write protection. |
| 112 | +//! @} |
| 113 | + |
| 114 | + |
| 115 | +#endif // _CONF_ACCESS_H_ |
0 commit comments