lib_eeprom.h

来自「非常全的nrf2401设计资料」· C头文件 代码 · 共 51 行

H
51
字号
/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is confidential property of Nordic 
 * Semiconductor. The use, copying, transfer or disclosure of such information 
 * is prohibited except by express written agreement with Nordic Semiconductor.
 */

/** @file
 * Interface function for the EEPROM library module
 * @defgroup nordic_lib_eeprom EEPROM
 * @{
 * @ingroup nordic_lib
 *
 * @brief This module emulates an EEPROM using the on-chip Flash memory.
 *
 * @author Ole Saether
 */
#ifndef LIB_EEPROM_H__
#define LIB_EEPROM_H__

#include "hal_flash.h"

/** Function to write a byte to the EEPROM
 *  @param adr 8 bit address in EEPROM
 *  @param dat byte to write
 */
void lib_eeprom_byte_write(uint8_t adr, uint8_t dat);

/** Function to write n bytes to the EEPROM
 *  @param a 8 bit address in EEPROM
 *  @param *p pointer to bytes to write
 *  @param n number of bytes to write
 */
void lib_eeprom_bytes_write(uint8_t adr, uint8_t *p, uint8_t n);

/** Function to read a byte from the EEPROM
 *  @param adr 8 bit address in EEPROM
 *  @return the byte read
 */
uint8_t lib_eeprom_byte_read(uint8_t adr);

/** Function to read n bytes from the EEPROM
 *  @param dra 8 bit address in EEPROM
 *  @param *p pointer to bytes to write
 *  @param n number of bytes to read
 */
void lib_eeprom_bytes_read(uint8_t a, uint8_t *p, uint8_t n);

#endif // LIB_EEPROM_H__
/** @} */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?