テスト用です。

Dependencies:   mbed

Committer:
jksoft
Date:
Tue Oct 11 11:09:42 2016 +0000
Revision:
0:8468a4403fea
SB??ver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8468a4403fea 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8468a4403fea 2 *
jksoft 0:8468a4403fea 3 * The information contained herein is confidential property of Nordic
jksoft 0:8468a4403fea 4 * Semiconductor ASA.Terms and conditions of usage are described in detail
jksoft 0:8468a4403fea 5 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8468a4403fea 6 *
jksoft 0:8468a4403fea 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8468a4403fea 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8468a4403fea 9 * the file.
jksoft 0:8468a4403fea 10 *
jksoft 0:8468a4403fea 11 * $LastChangedRevision: 17685 $
jksoft 0:8468a4403fea 12 */
jksoft 0:8468a4403fea 13
jksoft 0:8468a4403fea 14 /**
jksoft 0:8468a4403fea 15 * @file
jksoft 0:8468a4403fea 16 * @brief NMVC driver API.
jksoft 0:8468a4403fea 17 */
jksoft 0:8468a4403fea 18
jksoft 0:8468a4403fea 19 #ifndef NRF_NVMC_H__
jksoft 0:8468a4403fea 20 #define NRF_NVMC_H__
jksoft 0:8468a4403fea 21
jksoft 0:8468a4403fea 22 #include <stdint.h>
jksoft 0:8468a4403fea 23
jksoft 0:8468a4403fea 24
jksoft 0:8468a4403fea 25 /**
jksoft 0:8468a4403fea 26 * @defgroup nrf_nvmc Non-volatile memory controller
jksoft 0:8468a4403fea 27 * @{
jksoft 0:8468a4403fea 28 * @ingroup nrf_drivers
jksoft 0:8468a4403fea 29 * @brief Driver for the nRF51 NVMC peripheral.
jksoft 0:8468a4403fea 30 *
jksoft 0:8468a4403fea 31 * This driver allows writing to the non-volatile memory (NVM) regions
jksoft 0:8468a4403fea 32 * of the nRF51. In order to write to NVM the controller must be powered
jksoft 0:8468a4403fea 33 * on and the relevant page must be erased.
jksoft 0:8468a4403fea 34 *
jksoft 0:8468a4403fea 35 */
jksoft 0:8468a4403fea 36
jksoft 0:8468a4403fea 37
jksoft 0:8468a4403fea 38 /**
jksoft 0:8468a4403fea 39 * @brief Erase a page in flash. This is required before writing to any
jksoft 0:8468a4403fea 40 * address in the page.
jksoft 0:8468a4403fea 41 *
jksoft 0:8468a4403fea 42 * @param address Start address of the page.
jksoft 0:8468a4403fea 43 */
jksoft 0:8468a4403fea 44 void nrf_nvmc_page_erase(uint32_t address);
jksoft 0:8468a4403fea 45
jksoft 0:8468a4403fea 46
jksoft 0:8468a4403fea 47 /**
jksoft 0:8468a4403fea 48 * @brief Write a single byte to flash.
jksoft 0:8468a4403fea 49 *
jksoft 0:8468a4403fea 50 * The function reads the word containing the byte, and then
jksoft 0:8468a4403fea 51 * rewrites the entire word.
jksoft 0:8468a4403fea 52 *
jksoft 0:8468a4403fea 53 * @param address Address to write to.
jksoft 0:8468a4403fea 54 * @param value Value to write.
jksoft 0:8468a4403fea 55 */
jksoft 0:8468a4403fea 56 void nrf_nvmc_write_byte(uint32_t address , uint8_t value);
jksoft 0:8468a4403fea 57
jksoft 0:8468a4403fea 58
jksoft 0:8468a4403fea 59 /**
jksoft 0:8468a4403fea 60 * @brief Write a 32-bit word to flash.
jksoft 0:8468a4403fea 61 * @param address Address to write to.
jksoft 0:8468a4403fea 62 * @param value Value to write.
jksoft 0:8468a4403fea 63 */
jksoft 0:8468a4403fea 64 void nrf_nvmc_write_word(uint32_t address, uint32_t value);
jksoft 0:8468a4403fea 65
jksoft 0:8468a4403fea 66
jksoft 0:8468a4403fea 67 /**
jksoft 0:8468a4403fea 68 * @brief Write consecutive bytes to flash.
jksoft 0:8468a4403fea 69 *
jksoft 0:8468a4403fea 70 * @param address Address to write to.
jksoft 0:8468a4403fea 71 * @param src Pointer to data to copy from.
jksoft 0:8468a4403fea 72 * @param num_bytes Number of bytes in src to write.
jksoft 0:8468a4403fea 73 */
jksoft 0:8468a4403fea 74 void nrf_nvmc_write_bytes(uint32_t address, const uint8_t * src, uint32_t num_bytes);
jksoft 0:8468a4403fea 75
jksoft 0:8468a4403fea 76
jksoft 0:8468a4403fea 77 /**
jksoft 0:8468a4403fea 78 @ @brief Write consecutive words to flash.
jksoft 0:8468a4403fea 79 *
jksoft 0:8468a4403fea 80 * @param address Address to write to.
jksoft 0:8468a4403fea 81 * @param src Pointer to data to copy from.
jksoft 0:8468a4403fea 82 * @param num_words Number of bytes in src to write.
jksoft 0:8468a4403fea 83 */
jksoft 0:8468a4403fea 84 void nrf_nvmc_write_words(uint32_t address, const uint32_t * src, uint32_t num_words);
jksoft 0:8468a4403fea 85
jksoft 0:8468a4403fea 86
jksoft 0:8468a4403fea 87 #endif // NRF_NVMC_H__
jksoft 0:8468a4403fea 88 /** @} */
jksoft 0:8468a4403fea 89
jksoft 0:8468a4403fea 90