Files
OpenCellular/include/eeprom.h
Randall Spangler 17ea6d50f0 cleanup: eeprom and option comments
No code changes, just updating comments.

BUG=chrome-os-partner:23558
BRANCH=none
TEST=compile bds project

Change-Id: I819244acafcf89a1e983bddecd82f770b0374ee1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174512
2013-10-25 20:12:49 +00:00

56 lines
1.2 KiB
C

/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* EEPROM module for Chrome EC */
#ifndef __CROS_EC_EEPROM_H
#define __CROS_EC_EEPROM_H
#include "common.h"
/**
* Initialize the module.
*/
int eeprom_init(void);
/**
* Returns the number of EEPROM blocks on the system.
*/
int eeprom_get_block_count(void);
/**
* Return the EEPROM block size in bytes.
*/
int eeprom_get_block_size(void);
/**
* Read data from EEPROM.
*
* @param block Block number
* @param offset Byte offset in block; must be multiple of 4.
* @param size Number of bytes to read; must be multiple of 4.
* @param data Destination for data
*/
int eeprom_read(int block, int offset, int size, char *data);
/**
* Write data to EEPROM.
*
* @param block Block number
* @param offset Byte offset in block; must be multiple of 4.
* @param size Number of bytes to write; must be multiple of 4.
* @param data Data to write
*/
int eeprom_write(int block, int offset, int size, const char *data);
/**
* Hide an EEPROM block until the next reset.
*
* @param block Block number
*/
int eeprom_hide(int block);
#endif /* __CROS_EC_EEPROM_H */