Knight Rider PIO sample for teckBASIC, konashi.js
Dependencies: BLE_API_Native_IRC mbed
Fork of BLE_konashi_PIO_test by
nrf_nvmc.h
00001 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is confidential property of Nordic 00004 * Semiconductor ASA.Terms and conditions of usage are described in detail 00005 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 * $LastChangedRevision: 17685 $ 00012 */ 00013 00014 /** 00015 * @file 00016 * @brief NMVC driver API. 00017 */ 00018 00019 #ifndef NRF_NVMC_H__ 00020 #define NRF_NVMC_H__ 00021 00022 #include <stdint.h> 00023 #include "nordic_global.h" 00024 00025 00026 /** 00027 * @defgroup nrf_nvmc Non-volatile memory controller 00028 * @{ 00029 * @ingroup nrf_drivers 00030 * @brief Driver for the nRF51 NVMC peripheral. 00031 * 00032 * This driver allows writing to the non-volatile memory (NVM) regions 00033 * of the nRF51. In order to write to NVM the controller must be powered 00034 * on and the relevant page must be erased. 00035 * 00036 */ 00037 00038 00039 /** 00040 * @brief Erase a page in flash. This is required before writing to any 00041 * address in the page. 00042 * 00043 * @param address Start address of the page. 00044 */ 00045 void nrf_nvmc_page_erase(uint32_t address); 00046 00047 00048 /** 00049 * @brief Write a single byte to flash. 00050 * 00051 * The function reads the word containing the byte, and then 00052 * rewrites the entire word. 00053 * 00054 * @param address Address to write to. 00055 * @param value Value to write. 00056 */ 00057 void nrf_nvmc_write_byte(uint32_t address , uint8_t value); 00058 00059 00060 /** 00061 * @brief Write a 32-bit word to flash. 00062 * @param address Address to write to. 00063 * @param value Value to write. 00064 */ 00065 void nrf_nvmc_write_word(uint32_t address, uint32_t value); 00066 00067 00068 /** 00069 * @brief Write consecutive bytes to flash. 00070 * 00071 * @param address Address to write to. 00072 * @param src Pointer to data to copy from. 00073 * @param num_bytes Number of bytes in src to write. 00074 */ 00075 void nrf_nvmc_write_bytes(uint32_t address, const uint8_t * src, uint32_t num_bytes); 00076 00077 00078 /** 00079 @ @brief Write consecutive words to flash. 00080 * 00081 * @param address Address to write to. 00082 * @param src Pointer to data to copy from. 00083 * @param num_words Number of bytes in src to write. 00084 */ 00085 void nrf_nvmc_write_words(uint32_t address, const uint32_t * src, uint32_t num_words); 00086 00087 00088 #endif // NRF_NVMC_H__ 00089 /** @} */ 00090 00091
Generated on Tue Jul 12 2022 16:55:07 by 1.7.2