Statistics
| Branch: | Revision:

root / hw / eeprom93xx.h @ 7ffa4767

History | View | Annotate | Download (1.3 kB)

1 663e8e51 ths
/*
2 663e8e51 ths
 * QEMU EEPROM 93xx emulation
3 663e8e51 ths
 *
4 663e8e51 ths
 * Copyright (c) 2006-2007 Stefan Weil
5 663e8e51 ths
 *
6 663e8e51 ths
 * This program is free software; you can redistribute it and/or modify
7 663e8e51 ths
 * it under the terms of the GNU General Public License as published by
8 663e8e51 ths
 * the Free Software Foundation; either version 2 of the License, or
9 663e8e51 ths
 * (at your option) any later version.
10 663e8e51 ths
 *
11 663e8e51 ths
 * This program is distributed in the hope that it will be useful,
12 663e8e51 ths
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 663e8e51 ths
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 663e8e51 ths
 * GNU General Public License for more details.
15 663e8e51 ths
 *
16 663e8e51 ths
 * You should have received a copy of the GNU General Public License
17 663e8e51 ths
 * along with this program; if not, write to the Free Software
18 663e8e51 ths
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19 663e8e51 ths
 */
20 663e8e51 ths
21 663e8e51 ths
#ifndef EEPROM93XX_H
22 663e8e51 ths
#define EEPROM93XX_H
23 663e8e51 ths
24 663e8e51 ths
typedef struct _eeprom_t eeprom_t;
25 663e8e51 ths
26 663e8e51 ths
/* Create a new EEPROM with (nwords * 2) bytes. */
27 663e8e51 ths
eeprom_t *eeprom93xx_new(uint16_t nwords);
28 663e8e51 ths
29 663e8e51 ths
/* Destroy an existing EEPROM. */
30 663e8e51 ths
void eeprom93xx_free(eeprom_t *eeprom);
31 663e8e51 ths
32 663e8e51 ths
/* Read from the EEPROM. */
33 663e8e51 ths
uint16_t eeprom93xx_read(eeprom_t *eeprom);
34 663e8e51 ths
35 663e8e51 ths
/* Write to the EEPROM. */
36 663e8e51 ths
void eeprom93xx_write(eeprom_t *eeprom, int eecs, int eesk, int eedi);
37 663e8e51 ths
38 663e8e51 ths
/* Get EEPROM data array. */
39 663e8e51 ths
uint16_t *eeprom93xx_data(eeprom_t *eeprom);
40 663e8e51 ths
41 663e8e51 ths
#endif /* EEPROM93XX_H */