SG RFID nRF51822 fork

Fork of nRF51822 by Nordic Semiconductor

Committer:
soumi_ghsoh
Date:
Wed Apr 01 22:06:35 2015 +0000
Revision:
100:030804500597
Parent:
93:0e7a9efee6d7
TAG read with multiple instances of RX complete IRQ; Imp changes: reduced RX wait time, Vin=3V/AGC ON, RX_IN2(main) , RX_IN1(aux)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 0:eff01767de02 1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
bogdanm 0:eff01767de02 2 *
bogdanm 0:eff01767de02 3 * The information contained herein is property of Nordic Semiconductor ASA.
bogdanm 0:eff01767de02 4 * Terms and conditions of usage are described in detail in NORDIC
bogdanm 0:eff01767de02 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
bogdanm 0:eff01767de02 6 *
bogdanm 0:eff01767de02 7 * Licensees are granted free, non-transferable use of the information. NO
bogdanm 0:eff01767de02 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
bogdanm 0:eff01767de02 9 * the file.
bogdanm 0:eff01767de02 10 *
bogdanm 0:eff01767de02 11 */
bogdanm 0:eff01767de02 12
bogdanm 0:eff01767de02 13 /** @cond To make doxygen skip this file */
bogdanm 0:eff01767de02 14
bogdanm 0:eff01767de02 15 /** @file
bogdanm 0:eff01767de02 16 * This header contains defines with respect persistent storage that are specific to
bogdanm 0:eff01767de02 17 * persistent storage implementation and application use case.
bogdanm 0:eff01767de02 18 */
bogdanm 0:eff01767de02 19 #ifndef PSTORAGE_PL_H__
bogdanm 0:eff01767de02 20 #define PSTORAGE_PL_H__
bogdanm 0:eff01767de02 21
bogdanm 0:eff01767de02 22 #include <stdint.h>
bogdanm 0:eff01767de02 23
Rohit Grover 45:3c4df37ed83e 24 #ifdef __cplusplus
Rohit Grover 45:3c4df37ed83e 25 extern "C" {
Rohit Grover 45:3c4df37ed83e 26 #endif // #ifdef __cplusplus
Rohit Grover 45:3c4df37ed83e 27
bogdanm 0:eff01767de02 28 #define PSTORAGE_FLASH_PAGE_SIZE ((uint16_t)NRF_FICR->CODEPAGESIZE) /**< Size of one flash page. */
bogdanm 0:eff01767de02 29 #define PSTORAGE_FLASH_EMPTY_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */
bogdanm 0:eff01767de02 30
bogdanm 0:eff01767de02 31 #define PSTORAGE_FLASH_PAGE_END \
bogdanm 0:eff01767de02 32 ((NRF_UICR->BOOTLOADERADDR != PSTORAGE_FLASH_EMPTY_MASK) \
bogdanm 0:eff01767de02 33 ? (NRF_UICR->BOOTLOADERADDR / PSTORAGE_FLASH_PAGE_SIZE) \
bogdanm 0:eff01767de02 34 : NRF_FICR->CODESIZE)
bogdanm 0:eff01767de02 35
bogdanm 0:eff01767de02 36
rgrover1 93:0e7a9efee6d7 37 #define PSTORAGE_MAX_APPLICATIONS 1 /**< Maximum number of applications that can be registered with the module, configurable based on system requirements. */
bogdanm 0:eff01767de02 38 #define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */
bogdanm 0:eff01767de02 39
rgrover1 93:0e7a9efee6d7 40 #define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_MAX_APPLICATIONS - 1) \
bogdanm 0:eff01767de02 41 * PSTORAGE_FLASH_PAGE_SIZE) /**< Start address for persistent data, configurable according to system requirements. */
rgrover1 93:0e7a9efee6d7 42 #define PSTORAGE_DATA_END_ADDR ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */
rgrover1 93:0e7a9efee6d7 43 #define PSTORAGE_SWAP_ADDR PSTORAGE_DATA_END_ADDR /**< Top-most page is used as swap area for clear and update. */
bogdanm 0:eff01767de02 44
bogdanm 0:eff01767de02 45 #define PSTORAGE_MAX_BLOCK_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum size of block that can be registered with the module. Should be configured based on system requirements. And should be greater than or equal to the minimum size. */
rgrover1 93:0e7a9efee6d7 46 #define PSTORAGE_CMD_QUEUE_SIZE 10 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */
bogdanm 0:eff01767de02 47
bogdanm 0:eff01767de02 48
bogdanm 0:eff01767de02 49 /** Abstracts persistently memory block identifier. */
bogdanm 0:eff01767de02 50 typedef uint32_t pstorage_block_t;
bogdanm 0:eff01767de02 51
bogdanm 0:eff01767de02 52 typedef struct
bogdanm 0:eff01767de02 53 {
bogdanm 0:eff01767de02 54 uint32_t module_id; /**< Module ID.*/
bogdanm 0:eff01767de02 55 pstorage_block_t block_id; /**< Block ID.*/
bogdanm 0:eff01767de02 56 } pstorage_handle_t;
bogdanm 0:eff01767de02 57
bogdanm 0:eff01767de02 58 typedef uint16_t pstorage_size_t; /** Size of length and offset fields. */
bogdanm 0:eff01767de02 59
bogdanm 0:eff01767de02 60 /**@brief Handles Flash Access Result Events. To be called in the system event dispatcher of the application. */
bogdanm 0:eff01767de02 61 void pstorage_sys_event_handler (uint32_t sys_evt);
bogdanm 0:eff01767de02 62
Rohit Grover 45:3c4df37ed83e 63 #ifdef __cplusplus
Rohit Grover 45:3c4df37ed83e 64 }
Rohit Grover 45:3c4df37ed83e 65 #endif // #ifdef __cplusplus
Rohit Grover 45:3c4df37ed83e 66
bogdanm 0:eff01767de02 67 #endif // PSTORAGE_PL_H__
bogdanm 0:eff01767de02 68
bogdanm 0:eff01767de02 69 /** @} */
rgrover1 93:0e7a9efee6d7 70 /** @endcond */