0001
0002
0003
0004
0005
0006 #ifndef _AS10X_HANDLE_H
0007 #define _AS10X_HANDLE_H
0008 struct as10x_bus_adapter_t;
0009 struct as102_dev_t;
0010
0011 #include "as10x_cmd.h"
0012
0013
0014 #define REGMODE8 8
0015 #define REGMODE16 16
0016 #define REGMODE32 32
0017
0018 struct as102_priv_ops_t {
0019 int (*upload_fw_pkt)(struct as10x_bus_adapter_t *bus_adap,
0020 unsigned char *buf, int buflen, int swap32);
0021
0022 int (*send_cmd)(struct as10x_bus_adapter_t *bus_adap,
0023 unsigned char *buf, int buflen);
0024
0025 int (*xfer_cmd)(struct as10x_bus_adapter_t *bus_adap,
0026 unsigned char *send_buf, int send_buf_len,
0027 unsigned char *recv_buf, int recv_buf_len);
0028
0029 int (*start_stream)(struct as102_dev_t *dev);
0030 void (*stop_stream)(struct as102_dev_t *dev);
0031
0032 int (*reset_target)(struct as10x_bus_adapter_t *bus_adap);
0033
0034 int (*read_write)(struct as10x_bus_adapter_t *bus_adap, uint8_t mode,
0035 uint32_t rd_addr, uint16_t rd_len,
0036 uint32_t wr_addr, uint16_t wr_len);
0037
0038 int (*as102_read_ep2)(struct as10x_bus_adapter_t *bus_adap,
0039 unsigned char *recv_buf,
0040 int recv_buf_len);
0041 };
0042 #endif