8 |
|
|
9 |
#include <sys/types.h> |
#include <sys/types.h> |
10 |
#include "utils.h" |
#include "utils.h" |
11 |
|
#include "cisco_eeprom.h" |
12 |
|
|
13 |
/* 8 groups with 4 differents bits (clock,select,data_in,data_out) */ |
/* 8 groups with 4 differents bits (clock,select,data_in,data_out) */ |
14 |
#define NMC93C46_MAX_EEPROM_PER_GROUP 8 |
#define NMC93C46_MAX_EEPROM_PER_GROUP 8 |
34 |
u_int select_bit; |
u_int select_bit; |
35 |
u_int din_bit; |
u_int din_bit; |
36 |
u_int dout_bit; |
u_int dout_bit; |
|
m_uint16_t *data; |
|
|
u_int data_len; |
|
37 |
}; |
}; |
38 |
|
|
39 |
struct nmc93c46_eeprom_state { |
struct nmc93c46_eeprom_state { |
49 |
u_int eeprom_reg; |
u_int eeprom_reg; |
50 |
char *description; |
char *description; |
51 |
int debug; |
int debug; |
52 |
struct nmc93c46_eeprom_def *def[NMC93C46_MAX_EEPROM_PER_GROUP]; |
const struct nmc93c46_eeprom_def *def[NMC93C46_MAX_EEPROM_PER_GROUP]; |
53 |
struct nmc93c46_eeprom_state state[NMC93C46_MAX_EEPROM_PER_GROUP]; |
struct nmc93c46_eeprom_state state[NMC93C46_MAX_EEPROM_PER_GROUP]; |
54 |
|
struct cisco_eeprom *eeprom[NMC93C46_MAX_EEPROM_PER_GROUP]; |
55 |
}; |
}; |
56 |
|
|
57 |
/* Handle write */ |
/* Handle write */ |