qemu/include/hw/block/m24cxx.h
<<
>>
Prefs
   1#ifndef M24CXX__H
   2#define M24CXX__H
   3#include "hw/i2c/i2c.h"
   4
   5typedef enum {
   6    STOPPED,
   7    ADDRESSING,
   8    READING,
   9    WRITING,
  10} M24CXXXferState;
  11
  12typedef struct {
  13    I2CSlave i2c;
  14    uint16_t cur_addr;
  15    uint8_t state;
  16    uint8_t addr_count;
  17    uint8_t num_addr_bytes;
  18
  19    BlockBackend *blk;
  20    uint16_t size;
  21
  22    uint8_t *storage;
  23} M24CXXState;
  24
  25#define TYPE_M24CXX "m24cxx"
  26
  27#define M24CXX(obj) \
  28     OBJECT_CHECK(M24CXXState, (obj), TYPE_M24CXX)
  29#endif
  30
  31