2017-03-05 08:53:33 +00:00
|
|
|
#ifndef NCR_H
|
|
|
|
#define NCR_H
|
|
|
|
#include <stdint.h>
|
2017-03-04 14:06:00 +00:00
|
|
|
|
2017-03-05 08:53:33 +00:00
|
|
|
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];
|
2017-03-05 08:53:33 +00:00
|
|
|
int cmdlen;
|
|
|
|
int datalen;
|
|
|
|
int msglen;
|
|
|
|
} SCSITransferData;
|
2017-03-04 14:06:00 +00:00
|
|
|
|
2017-03-05 08:53:33 +00:00
|
|
|
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);
|
2017-03-04 14:06:00 +00:00
|
|
|
unsigned int ncrRead(unsigned int addr, unsigned int dack);
|
|
|
|
void ncrWrite(unsigned int addr,unsigned int dack, unsigned int val);
|
2017-03-05 08:53:33 +00:00
|
|
|
|
|
|
|
#endif
|