MINI2440: Updated pin names/numbers
[sniper_test.git] / hw / eeprom24c0x.h
blobb74db28c6604cf6ef383b48efe74cfe8812ce535
1 /*
2 * QEMU EEPROM 24c0x emulation
4 * Copyright (c) 2009 Michel Pollet <buserror@gmail.com>
5 * Copyright (c) 2006 Aurelien Jarno
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef EEPROM24C0X_H
23 #define EEPROM24C0X_H
25 typedef struct _eeprom24c0x_t eeprom24c0x_t;
27 enum {
28 EE_24C01 = 0,
29 EE_24C02,
30 EE_24C04,
31 EE_24C08,
34 /* Create a new EEPROM of the siae specified. */
35 eeprom24c0x_t * eeprom24c0x_new(int eeprom_kind);
37 /* Destroy an existing EEPROM. */
38 void eeprom24c0x_free(eeprom24c0x_t *eeprom);
40 /* Read from the EEPROM. */
41 uint8_t eeprom24c0x_read(eeprom24c0x_t * eeprom);
43 /* Write to the EEPROM. */
44 void eeprom24c0x_write(eeprom24c0x_t * eeprom, int scl, int sda);
46 /* Get EEPROM data array. */
47 uint8_t *eeprom24c0x_data(eeprom24c0x_t *eeprom);
49 #endif /* EEPROM24C0X_H */