annotate i2c.h @ 1971:80920c21bb52

Add an event log soft flush and call it twice per frame in between hard flushes to netplay latency when there are insufficient hardware updates to flush packets in the middle of a frame
author Michael Pavone <pavone@retrodev.com>
date Fri, 08 May 2020 11:40:30 -0700
parents d94855080529
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1414
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef I2C_H_
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define I2C_H_
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 typedef struct {
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 char *buffer;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 uint32_t size;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 uint16_t address;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 uint8_t host_sda;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 uint8_t slave_sda;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 uint8_t scl;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 uint8_t state;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 uint8_t counter;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 uint8_t latch;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 } eeprom_state;
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 void eeprom_init(eeprom_state *state, uint8_t *buffer, uint32_t size);
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 void * write_eeprom_i2c_w(uint32_t address, void * context, uint16_t value);
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 void * write_eeprom_i2c_b(uint32_t address, void * context, uint8_t value);
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 uint16_t read_eeprom_i2c_w(uint32_t address, void * context);
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 uint8_t read_eeprom_i2c_b(uint32_t address, void * context);
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21
d94855080529 Move I2C EEPROM and NOR Flash functions out of romdb.c into new files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 #endif //I2C_H_