Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem app epson mbed msp430 pl tests
i2c-eeprom.h
00001 /* 00002 Plastic Logic EPD project on MSP430 00003 00004 Copyright (C) 2013, 2014 Plastic Logic Limited 00005 00006 This program is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 /* 00020 * i2c_eeprom.h -- I2C EEPROM driver 00021 * 00022 * Authors: 00023 * Nick Terry <nick.terry@plasticlogic.com> 00024 * Guillaume Tucker <guillaume.tucker@plasticlogic.com> 00025 * 00026 */ 00027 00028 #ifndef I2C_EEPROM_H 00029 #define I2C_EEPROM_H 1 00030 00031 #include <stdint.h> 00032 00033 struct pl_i2c; 00034 00035 enum i2c_eeprom_type { 00036 EEPROM_24LC014, 00037 EEPROM_24AA256, 00038 }; 00039 00040 struct i2c_eeprom { 00041 struct pl_i2c *i2c; 00042 uint8_t i2c_addr; 00043 enum i2c_eeprom_type type; 00044 }; 00045 00046 extern int eeprom_read(const struct i2c_eeprom *eeprom, uint16_t offset, 00047 uint16_t count, uint8_t *data); 00048 #if CONFIG_EEPROM_WRITE 00049 extern int eeprom_write(const struct i2c_eeprom *eeprom, uint16_t offset, 00050 uint16_t count, const uint8_t *data); 00051 #endif 00052 00053 #endif /* I2C_EEPROM_H */
Generated on Tue Jul 12 2022 21:14:34 by
