1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Abilis Systems Single DVB-T Receiver
4 * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com>
6 #ifndef _AS10X_HANDLE_H
7 #define _AS10X_HANDLE_H
8 struct as10x_bus_adapter_t
;
11 #include "as10x_cmd.h"
13 /* values for "mode" field */
18 struct as102_priv_ops_t
{
19 int (*upload_fw_pkt
)(struct as10x_bus_adapter_t
*bus_adap
,
20 unsigned char *buf
, int buflen
, int swap32
);
22 int (*send_cmd
)(struct as10x_bus_adapter_t
*bus_adap
,
23 unsigned char *buf
, int buflen
);
25 int (*xfer_cmd
)(struct as10x_bus_adapter_t
*bus_adap
,
26 unsigned char *send_buf
, int send_buf_len
,
27 unsigned char *recv_buf
, int recv_buf_len
);
29 int (*start_stream
)(struct as102_dev_t
*dev
);
30 void (*stop_stream
)(struct as102_dev_t
*dev
);
32 int (*reset_target
)(struct as10x_bus_adapter_t
*bus_adap
);
34 int (*read_write
)(struct as10x_bus_adapter_t
*bus_adap
, uint8_t mode
,
35 uint32_t rd_addr
, uint16_t rd_len
,
36 uint32_t wr_addr
, uint16_t wr_len
);
38 int (*as102_read_ep2
)(struct as10x_bus_adapter_t
*bus_adap
,
39 unsigned char *recv_buf
,