linux/drivers/media/usb/dvb-usb/ttusb2.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* DVB USB compliant linux driver for Technotrend DVB USB boxes and clones
 * (e.g. Pinnacle 400e DVB-S USB2.0).
 *
 * Copyright (c) 2002 Holger Waechtler <[email protected]>
 * Copyright (c) 2003 Felix Domke <[email protected]>
 * Copyright (C) 2005-6 Patrick Boettcher <[email protected]>
 *
 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
 */
#ifndef _DVB_USB_TTUSB2_H_
#define _DVB_USB_TTUSB2_H_

/* TTUSB protocol
 *
 * always to messages (out/in)
 * out message:
 * 0xaa <id> <cmdbyte> <datalen> <data...>
 *
 * in message (complete block is always 0x40 bytes long)
 * 0x55 <id> <cmdbyte> <datalen> <data...>
 *
 * id is incremented for each transaction
 */

#define CMD_DSP_DOWNLOAD
/* out data: <byte>[28]
 * last block must be empty */

#define CMD_DSP_BOOT
/* out data: nothing */

#define CMD_POWER
/* out data: <on=1/off=0> */

#define CMD_LNB
/* out data: <power=1> <18V=0,13V=1> <tone> <??=1> <??=1> */

#define CMD_GET_VERSION
/* in  data: <version_byte>[5] */

#define CMD_DISEQC
/* out data: <master=0xff/burst=??> <cmdlen> <cmdbytes>[cmdlen] */

#define CMD_PID_ENABLE
/* out data: <index> <type: ts=1/sec=2> <pid msb> <pid lsb> */

#define CMD_PID_DISABLE
/* out data: <index> */

#define CMD_FILTER_ENABLE
/* out data: <index> <pid_idx> <filter>[12] <mask>[12] */

#define CMD_FILTER_DISABLE
/* out data: <index> */

#define CMD_GET_DSP_VERSION
/* in  data: <version_byte>[28] */

#define CMD_I2C_XFER
/* out data: <addr << 1> <sndlen> <rcvlen> <data>[sndlen]
 * in  data: <addr << 1> <sndlen> <rcvlen> <data>[rcvlen] */

#define CMD_I2C_BITRATE
/* out data: <default=0> */

#endif