blob: 75e8c8a66bb8d861655d72772ea7bf11914770e4 (
plain)
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
|
/* ============================================================================
** Copyright (C) 1997-2007 Infineon AG All rights reserved.
** ============================================================================
**
** ============================================================================
** Revision Information :
** File name: driver_tua9001.h
** Version:
** Date:
**
** ============================================================================
** History:
**
** Date Author Comment
** ----------------------------------------------------------------------------
**
** 2007.11.06 Walter Pichler created.
** ============================================================================
*/
/*============================================================================
Named Constants Definitions
============================================================================*/
#define TUNER_OK 0
#define TUNER_ERR 0xff
#define H_LEVEL 1
#define L_LEVEL 0
/*============================================================================
Types definition
============================================================================*/
typedef enum {
TUNER_BANDWIDTH_8MHZ,
TUNER_BANDWIDTH_7MHZ,
TUNER_BANDWIDTH_6MHZ,
TUNER_BANDWIDTH_5MHZ,
} tunerDriverBW_t;
typedef enum {
PLL_LOCKED,
PLL_NOT_LOCKED
}tunerPllLocked_t;
typedef enum {
STANDBY,
IDLE,
RX
} tunerReceiverState_t;
typedef enum {
L_INPUT_ACTIVE,
UHF_INPUT_ACTIVE,
VHF_INPUT_ACTIVE
} tunerActiveInput_t;
/*============================================================================
Public functions
============================================================================*/
/**
* tuner initialisation
* @retval TUNER_OK No error
* @retval TUNER__ERROR Error
*/
extern int initializeTua9001 (void);
/**
* tuner tune
* @param i_freq tuning frequency
* @param i_bandwidth channel bandwidth
* @retval TUNER_OK No error
* @retval TUNER__ERROR Error
*/
extern int tuneTua9001 (long i_freq, tunerDriverBW_t i_bandwidth);
/**
* Get tuner state
* @param o_tunerState tuner state
* @retval TUNER_OK No error
* @retval TUNER__ERROR Error
*/
extern int getReceiverStateTua9001 (tunerReceiverState_t *o_tunerState);
/**
* Get active input
* @param o_activeInput active input info
* @retval TUNER_OK No error
* @retval TUNER__ERROR Error
*/
extern int getActiveInputTua9001 (tunerActiveInput_t *o_activeInput);
/**
* Get baseband gain value
* @param o_basebandGain baseband gain value
* @retval TUNER_OK No error
* @retval TUNER__ERROR Error
*/
extern int getBasebandGainTua9001 (char *o_basebandGain);
|