mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
source files mainly done by Randall. Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: Iaff83a842b17f3350fb6f2a3f1597ad4c29bd12a
36 lines
1.0 KiB
C
36 lines
1.0 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"
|
|
|
|
/* Initializes the module. */
|
|
int eeprom_init(void);
|
|
|
|
/* Returns the number of EEPROM blocks on the system. */
|
|
int eeprom_get_block_count(void);
|
|
|
|
/* Returns the EEPROM block size in bytes. */
|
|
int eeprom_get_block_size(void);
|
|
|
|
/* Reads <size> bytes of data from <offset> in <block> of EEPROM. Offset
|
|
* and size must be a multiple of 32 bits. */
|
|
int eeprom_read(int block, int offset, int size, char *data);
|
|
|
|
/* Writes <size> bytes of data to <offset> in <block> of EEPROM. Offset
|
|
* and size must be a multiple of 32 bits. */
|
|
int eeprom_write(int block, int offset, int size, const char *data);
|
|
|
|
/* Hides an EEPROM block until the next reset. */
|
|
int eeprom_hide(int block);
|
|
|
|
/* TODO: write protect */
|
|
|
|
#endif /* __CROS_EC_EEPROM_H */
|