1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
/*
* sec.h
*
* Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
* & Marcus Metzler <marcus@convergence.de>
for convergence integrated media GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _OST_SEC_H_
#define _OST_SEC_H_
#define SEC_MAX_DISEQC_PARAMS 3
struct secDiseqcCmd {
uint8_t addr;
uint8_t cmd;
uint8_t numParams;
uint8_t params[SEC_MAX_DISEQC_PARAMS];
};
typedef uint32_t secVoltage;
enum {
SEC_VOLTAGE_OFF,
SEC_VOLTAGE_LT,
SEC_VOLTAGE_13,
SEC_VOLTAGE_13_5,
SEC_VOLTAGE_18,
SEC_VOLTAGE_18_5
};
#define SEC_VOLTAGE_HORIZONTAL SEC_VOLTAGE_18
#define SEC_VOLTAGE_VERTICAL SEC_VOLTAGE_13
typedef uint32_t secToneMode;
typedef enum {
SEC_TONE_ON,
SEC_TONE_OFF
} secToneMode_t;
typedef uint32_t secMiniCmd;
typedef enum {
SEC_MINI_NONE,
SEC_MINI_A,
SEC_MINI_B
} secMiniCmd_t;
struct secStatus {
int32_t busMode;
secVoltage selVolt;
secToneMode contTone;
};
enum {
SEC_BUS_IDLE,
SEC_BUS_BUSY,
SEC_BUS_OFF,
SEC_BUS_OVERLOAD
};
struct secCommand {
int32_t type;
union {
struct secDiseqcCmd diseqc;
uint8_t vsec;
uint32_t pause;
} u;
};
struct secCmdSequence {
secVoltage voltage;
secMiniCmd miniCommand;
secToneMode continuousTone;
uint32_t numCommands;
struct secCommand* commands;
};
enum {
SEC_CMDTYPE_DISEQC,
SEC_CMDTYPE_VSEC,
SEC_CMDTYPE_PAUSE
};
#define SEC_GET_STATUS _IOR('o',91,struct secStatus *)
#define SEC_RESET_OVERLOAD _IOW('o',92,void)
#define SEC_SEND_SEQUENCE _IOW('o',93,struct secCmdSequence *)
#define SEC_SET_TONE _IOW('o',94,secToneMode)
#define SEC_SET_VOLTAGE _IOW('o',95,secVoltage)
typedef enum {
SEC_DISEQC_SENT,
SEC_VSEC_SENT,
SEC_PAUSE_COMPLETE,
SEC_CALLBACK_ERROR
} secCallback_t;
#endif /*_OST_SEC_H_*/
|