1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef _AS10X_HANDLE_H
16#define _AS10X_HANDLE_H
17struct as10x_bus_adapter_t;
18struct as102_dev_t;
19
20#include "as10x_cmd.h"
21
22
23#define REGMODE8 8
24#define REGMODE16 16
25#define REGMODE32 32
26
27struct as102_priv_ops_t {
28 int (*upload_fw_pkt)(struct as10x_bus_adapter_t *bus_adap,
29 unsigned char *buf, int buflen, int swap32);
30
31 int (*send_cmd)(struct as10x_bus_adapter_t *bus_adap,
32 unsigned char *buf, int buflen);
33
34 int (*xfer_cmd)(struct as10x_bus_adapter_t *bus_adap,
35 unsigned char *send_buf, int send_buf_len,
36 unsigned char *recv_buf, int recv_buf_len);
37
38 int (*start_stream)(struct as102_dev_t *dev);
39 void (*stop_stream)(struct as102_dev_t *dev);
40
41 int (*reset_target)(struct as10x_bus_adapter_t *bus_adap);
42
43 int (*read_write)(struct as10x_bus_adapter_t *bus_adap, uint8_t mode,
44 uint32_t rd_addr, uint16_t rd_len,
45 uint32_t wr_addr, uint16_t wr_len);
46
47 int (*as102_read_ep2)(struct as10x_bus_adapter_t *bus_adap,
48 unsigned char *recv_buf,
49 int recv_buf_len);
50};
51#endif
52