#ifndef HW_PCMCIA_H
#define HW_PCMCIA_H
#include "hw/qdev-core.h"
#include "qom/object.h"
typedef struct PCMCIASocket {
qemu_irq irq;
bool attached;
} PCMCIASocket;
#define TYPE_PCMCIA_CARD "pcmcia-card"
OBJECT_DECLARE_TYPE(PCMCIACardState, PCMCIACardClass, PCMCIA_CARD)
struct PCMCIACardState {
DeviceState parent_obj;
PCMCIASocket *slot;
};
struct PCMCIACardClass {
DeviceClass parent_class;
int (*attach)(PCMCIACardState *state);
int (*detach)(PCMCIACardState *state);
const uint8_t *cis;
int cis_len;
uint8_t (*attr_read)(PCMCIACardState *card, uint32_t address);
void (*attr_write)(PCMCIACardState *card, uint32_t address, uint8_t value);
uint16_t (*common_read)(PCMCIACardState *card, uint32_t address);
void (*common_write)(PCMCIACardState *card,
uint32_t address, uint16_t value);
uint16_t (*io_read)(PCMCIACardState *card, uint32_t address);
void (*io_write)(PCMCIACardState *card, uint32_t address, uint16_t value);
};
#define CISTPL_DEVICE 0x01
#define CISTPL_NO_LINK 0x14
#define CISTPL_VERS_1 0x15
#define CISTPL_JEDEC_C 0x18
#define CISTPL_JEDEC_A 0x19
#define CISTPL_CONFIG 0x1a
#define CISTPL_CFTABLE_ENTRY 0x1b
#define CISTPL_DEVICE_OC 0x1c
#define CISTPL_DEVICE_OA 0x1d
#define CISTPL_DEVICE_GEO 0x1e
#define CISTPL_DEVICE_GEO_A 0x1f
#define CISTPL_MANFID 0x20
#define CISTPL_FUNCID 0x21
#define CISTPL_FUNCE 0x22
#define CISTPL_END 0xff
#define CISTPL_ENDMARK 0xff
PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv);
#endif