/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2017-2021. All rights reserved. * Description: DiSEqC IAPI interface * Author: Hisilicon * Create: 2017-06-30 */ #ifndef __IAPI_DISEQC_H__ #define __IAPI_DISEQC_H__ #include "td_type.h" #include "uapi_frontend.h" #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif /* __cplusplus */ #define LO_FREQUENCY_L 0x0 #define LO_FREQUENCY_H 0x1 #define POLARISATION_V 0x0 #define POLARISATION_H 0x2 #define SAT_POSITION_A 0x0 #define SAT_POSITION_B 0x4 #define SWITCH_OPTION_A 0x0 #define SWITCH_OPTION_B 0x8 #define PORT_GROUP_CLR_BITS 0xF0 #define DISEQC_CMD_LEN 6 #define MAX_LONGITUDE 1800 #define MAX_LATITUDE 900 #define ANGLE_MULTIPLE 10.0 #define USALS_CONST_1 3561680000.0 #define USALS_CONST_2 180.0 #define USALS_CONST_3 6370.0 #define USALS_CONST_4 40576900.0 #define USALS_CONST_5 1821416900.0 #define USALS_CONST_6 537628000.0 #define DISEQC_DELAY_BETWEEN_CMD_MS 25 #define DISEQC_DELAY_TIME_MS 15 #define MOTOR_RUNNING_STEPS_MIN 0 #define MOTOR_RUNNING_STEPS_MAX 128 /* DiSEqC Framing code */ #define MASTER_NOREPLY_FIRST 0xE0 #define MASTER_NOREPLY_REPEAT 0xE1 #define MASTER_REPLY_FIRST 0xE2 #define MASTER_REPLY_REPEAT 0xE3 #define SLAVE_OK 0xE4 #define SLAVE_NOT_SUPPORT 0xE5 #define SLAVE_PARITY_ERROR 0xE6 #define SLAVE_BAD_COMMAND 0xE7 /* DiSEqC Device address */ #define DEVICE_ANY 0x00 #define DEVICE_ANY_LNB_SW_SMATV 0x10 #define DEVICE_LNB 0x11 #define DEVICE_LNB_LOOPTHROUGH 0x12 #define DEVICE_SW 0x14 #define DEVICE_SW_LOOPTHROUGH 0x15 #define DEVICE_SMATV 0x18 #define DEVICE_ANY_POLARISER 0x20 #define DEVICE_LINEAR_POLARISER 0x21 #define DEVICE_ANY_POSITIONER 0x30 #define DEVICE_AZIMUTH_POSITIONER 0x31 #define DEVICE_ELEVATION_POSITIONER 0x32 #define DEVICE_ANY_INSTALLER_AID 0x40 #define DEVICE_SIGNAL_STRENGTH 0x41 #define DEVICE_ANY_INTELLIGENT 0x70 #define DEVICE_SUBSCRIBER_CONTROL 0x71 #define DEVICE_BUTT 0x72 /* DiSEqC Command * M*R/1.0 */ #define CMD_RESET 0x00 /*