minimacplus/components/tme/ncr.h

25 lines
542 B
C
Raw Normal View History

#ifndef NCR_H
#define NCR_H
#include <stdint.h>
typedef struct {
2017-03-06 16:06:22 +00:00
uint8_t cmd[256];
2017-03-08 12:29:10 +00:00
uint8_t data[32*1024];
2017-03-06 16:06:22 +00:00
uint8_t msg[128];
int cmdlen;
int datalen;
int msglen;
} SCSITransferData;
typedef struct {
int (*scsiCmd)(SCSITransferData *data, unsigned int cmd, unsigned int len, unsigned int lba, void *arg);
void *arg;
} SCSIDevice;
void ncrInit();
void ncrRegisterDevice(int id, SCSIDevice* dev);
unsigned int ncrRead(unsigned int addr, unsigned int dack);
void ncrWrite(unsigned int addr,unsigned int dack, unsigned int val);
#endif