The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_SDT51822B/TOOLCHAIN_IAR/fds_config.h@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 143:86740a56073b | 1 | /* |
AnnaBridge | 143:86740a56073b | 2 | * Copyright (c) 2015 Nordic Semiconductor ASA |
AnnaBridge | 143:86740a56073b | 3 | * All rights reserved. |
AnnaBridge | 143:86740a56073b | 4 | * |
AnnaBridge | 143:86740a56073b | 5 | * Redistribution and use in source and binary forms, with or without modification, |
AnnaBridge | 143:86740a56073b | 6 | * are permitted provided that the following conditions are met: |
AnnaBridge | 143:86740a56073b | 7 | * |
AnnaBridge | 143:86740a56073b | 8 | * 1. Redistributions of source code must retain the above copyright notice, this list |
AnnaBridge | 143:86740a56073b | 9 | * of conditions and the following disclaimer. |
AnnaBridge | 143:86740a56073b | 10 | * |
AnnaBridge | 143:86740a56073b | 11 | * 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA |
AnnaBridge | 143:86740a56073b | 12 | * integrated circuit in a product or a software update for such product, must reproduce |
AnnaBridge | 143:86740a56073b | 13 | * the above copyright notice, this list of conditions and the following disclaimer in |
AnnaBridge | 143:86740a56073b | 14 | * the documentation and/or other materials provided with the distribution. |
AnnaBridge | 143:86740a56073b | 15 | * |
AnnaBridge | 143:86740a56073b | 16 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be |
AnnaBridge | 143:86740a56073b | 17 | * used to endorse or promote products derived from this software without specific prior |
AnnaBridge | 143:86740a56073b | 18 | * written permission. |
AnnaBridge | 143:86740a56073b | 19 | * |
AnnaBridge | 143:86740a56073b | 20 | * 4. This software, with or without modification, must only be used with a |
AnnaBridge | 143:86740a56073b | 21 | * Nordic Semiconductor ASA integrated circuit. |
AnnaBridge | 143:86740a56073b | 22 | * |
AnnaBridge | 143:86740a56073b | 23 | * 5. Any software provided in binary or object form under this license must not be reverse |
AnnaBridge | 143:86740a56073b | 24 | * engineered, decompiled, modified and/or disassembled. |
AnnaBridge | 143:86740a56073b | 25 | * |
AnnaBridge | 143:86740a56073b | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
AnnaBridge | 143:86740a56073b | 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
AnnaBridge | 143:86740a56073b | 28 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 143:86740a56073b | 29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
AnnaBridge | 143:86740a56073b | 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
AnnaBridge | 143:86740a56073b | 31 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
AnnaBridge | 143:86740a56073b | 32 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
AnnaBridge | 143:86740a56073b | 33 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
AnnaBridge | 143:86740a56073b | 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
AnnaBridge | 143:86740a56073b | 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 143:86740a56073b | 36 | * |
AnnaBridge | 143:86740a56073b | 37 | */ |
AnnaBridge | 143:86740a56073b | 38 | |
AnnaBridge | 143:86740a56073b | 39 | |
AnnaBridge | 143:86740a56073b | 40 | #ifndef FDS_CONFIG_H__ |
AnnaBridge | 143:86740a56073b | 41 | #define FDS_CONFIG_H__ |
AnnaBridge | 143:86740a56073b | 42 | |
AnnaBridge | 143:86740a56073b | 43 | /** |
AnnaBridge | 143:86740a56073b | 44 | * @file fds_config.h |
AnnaBridge | 143:86740a56073b | 45 | * |
AnnaBridge | 143:86740a56073b | 46 | * @defgroup flash_data_storage_config Configuration options |
AnnaBridge | 143:86740a56073b | 47 | * @ingroup flash_data_storage |
AnnaBridge | 143:86740a56073b | 48 | * @{ |
AnnaBridge | 143:86740a56073b | 49 | * @brief Configuration options for FDS. |
AnnaBridge | 143:86740a56073b | 50 | */ |
AnnaBridge | 143:86740a56073b | 51 | |
AnnaBridge | 143:86740a56073b | 52 | /**@brief Configures the size of the internal queue. */ |
AnnaBridge | 143:86740a56073b | 53 | #define FDS_OP_QUEUE_SIZE (4) |
AnnaBridge | 143:86740a56073b | 54 | |
AnnaBridge | 143:86740a56073b | 55 | /**@brief Determines how many @ref fds_record_chunk_t structures can be buffered at any time. */ |
AnnaBridge | 143:86740a56073b | 56 | #define FDS_CHUNK_QUEUE_SIZE (8) |
AnnaBridge | 143:86740a56073b | 57 | |
AnnaBridge | 143:86740a56073b | 58 | /**@brief Configures the maximum number of callbacks that can be registered. */ |
AnnaBridge | 143:86740a56073b | 59 | #define FDS_MAX_USERS (3) |
AnnaBridge | 143:86740a56073b | 60 | |
AnnaBridge | 143:86740a56073b | 61 | /**@brief Configures the number of virtual flash pages to use. |
AnnaBridge | 143:86740a56073b | 62 | * |
AnnaBridge | 143:86740a56073b | 63 | * The total amount of flash memory that is used by FDS amounts to |
AnnaBridge | 143:86740a56073b | 64 | * @ref FDS_VIRTUAL_PAGES * @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes. |
AnnaBridge | 143:86740a56073b | 65 | * On nRF51 ICs, this defaults to 3 * 256 * 4 bytes = 3072 bytes. |
AnnaBridge | 143:86740a56073b | 66 | * On nRF52 ICs, it defaults to 3 * 1024 * 4 bytes = 12288 bytes. |
AnnaBridge | 143:86740a56073b | 67 | * |
AnnaBridge | 143:86740a56073b | 68 | * One of the virtual pages is reserved by the system for garbage collection. Therefore, the |
AnnaBridge | 143:86740a56073b | 69 | * minimum is two virtual pages: one page to store data and one page to be used by the system for |
AnnaBridge | 143:86740a56073b | 70 | * garbage collection. |
AnnaBridge | 143:86740a56073b | 71 | */ |
AnnaBridge | 143:86740a56073b | 72 | #define FDS_VIRTUAL_PAGES (3) |
AnnaBridge | 143:86740a56073b | 73 | |
AnnaBridge | 143:86740a56073b | 74 | /**@brief Configures the size of a virtual page of flash memory, expressed in number of |
AnnaBridge | 143:86740a56073b | 75 | * 4-byte words. |
AnnaBridge | 143:86740a56073b | 76 | * |
AnnaBridge | 143:86740a56073b | 77 | * By default, a virtual page is the same size as a physical page. Therefore, the default size |
AnnaBridge | 143:86740a56073b | 78 | * is 1024 bytes for nRF51 ICs and 4096 bytes for nRF52 ICs. |
AnnaBridge | 143:86740a56073b | 79 | * |
AnnaBridge | 143:86740a56073b | 80 | * The size of a virtual page must be a multiple of the size of a physical page. |
AnnaBridge | 143:86740a56073b | 81 | */ |
AnnaBridge | 143:86740a56073b | 82 | #if defined(NRF51) |
AnnaBridge | 143:86740a56073b | 83 | #define FDS_VIRTUAL_PAGE_SIZE (256) |
AnnaBridge | 143:86740a56073b | 84 | #elif defined(NRF52) |
AnnaBridge | 143:86740a56073b | 85 | #define FDS_VIRTUAL_PAGE_SIZE (1024) |
AnnaBridge | 143:86740a56073b | 86 | #endif |
AnnaBridge | 143:86740a56073b | 87 | |
AnnaBridge | 143:86740a56073b | 88 | /** @} */ |
AnnaBridge | 143:86740a56073b | 89 | |
AnnaBridge | 143:86740a56073b | 90 | #endif // FDS_CONFIG_H__ |