1 #ifndef _READER_MASTER_H_
2 #define _READER_MASTER_H_
14 struct reader_memory_access{
15 void (*memory_read)(const struct reader_handle *h, const struct gauge *g, long address, long length, uint8_t *data);
16 void (*memory_write)(const struct reader_handle *h, long address, long length, const uint8_t *data);
17 void (*flash_config)(const struct reader_handle *h, long c000x, long c2aaa, long c5555, long unit, bool retry);
18 void (*flash_erase)(const struct reader_handle *h, long address, bool wait);
19 long (*flash_program)(const struct reader_handle *h, const struct gauge *g, long address, long length, const uint8_t *data, bool wait, bool skip);
20 void (*flash_device_get)(const struct reader_handle *h, uint8_t s[2]);
22 struct reader_control{
24 const struct reader_handle *(*open)(void (*except)(const char *str));
25 void (*close)(const struct reader_handle *h);
26 void (*init)(const struct reader_handle *h);
27 void (*flash_status)(const struct reader_handle *h, uint8_t s[2]);
28 uint8_t (*vram_connection)(const struct reader_handle *h);
31 const struct reader_control control;
32 const struct reader_memory_access cpu, ppu;
35 static inline void wait(long msec)