Go to the documentation of this file. 1 #ifndef DIBX000_COMMON_H
2 #define DIBX000_COMMON_H
52 #define BAND_LBAND 0x01
55 #define BAND_SBAND 0x08
57 #define BAND_CBAND 0x20
59 #define BAND_OF_FREQUENCY(freq_kHz) ((freq_kHz) <= 170000 ? BAND_CBAND : \
60 (freq_kHz) <= 115000 ? BAND_FM : \
61 (freq_kHz) <= 250000 ? BAND_VHF : \
62 (freq_kHz) <= 863000 ? BAND_UHF : \
63 (freq_kHz) <= 2000000 ? BAND_LBAND : BAND_SBAND )
149 #define BANDWIDTH_TO_KHZ(v) ((v) / 1000)
150 #define BANDWIDTH_TO_HZ(v) ((v) * 1000)
153 #define OUTMODE_HIGH_Z 0
154 #define OUTMODE_MPEG2_PAR_GATED_CLK 1
155 #define OUTMODE_MPEG2_PAR_CONT_CLK 2
156 #define OUTMODE_MPEG2_SERIAL 7
157 #define OUTMODE_DIVERSITY 4
158 #define OUTMODE_MPEG2_FIFO 5
159 #define OUTMODE_ANALOG_ADC 6
161 #define INPUT_MODE_OFF 0x11
162 #define INPUT_MODE_DIVERSITY 0x12
163 #define INPUT_MODE_MPEG 0x13
206 #define CHANNEL_STATUS_PARAMETERS_UNKNOWN 0x01
207 #define CHANNEL_STATUS_PARAMETERS_SET 0x02
214 #define FE_STATUS_TUNE_FAILED 0
215 #define FE_STATUS_TUNE_TIMED_OUT -1
216 #define FE_STATUS_TUNE_TIME_TOO_SHORT -2
217 #define FE_STATUS_TUNE_PENDING -3
218 #define FE_STATUS_STD_SUCCESS -4
219 #define FE_STATUS_FFT_SUCCESS -5
220 #define FE_STATUS_DEMOD_SUCCESS -6
221 #define FE_STATUS_LOCKED -7
222 #define FE_STATUS_DATA_LOCKED -8
224 #define FE_CALLBACK_TIME_NEVER 0xffffffff
226 #define ABS(x) ((x < 0) ? (-x) : (x))
228 #define DATA_BUS_ACCESS_MODE_8BIT 0x01
229 #define DATA_BUS_ACCESS_MODE_16BIT 0x02
230 #define DATA_BUS_ACCESS_MODE_NO_ADDRESS_INCREMENT 0x10
233 #define BOARD_GPIO_COMPONENT_BUS_ADAPTER 1
234 #define BOARD_GPIO_COMPONENT_DEMOD 2
237 #define BOARD_GPIO_FUNCTION_BOARD_ON 1
238 #define BOARD_GPIO_FUNCTION_BOARD_OFF 2
239 #define BOARD_GPIO_FUNCTION_COMPONENT_ON 3
240 #define BOARD_GPIO_FUNCTION_COMPONENT_OFF 4
241 #define BOARD_GPIO_FUNCTION_SUBBAND_PWM 5
242 #define BOARD_GPIO_FUNCTION_SUBBAND_GPIO 6
260 #define MAX_NB_SUBBANDS 8
269 #define DEMOD_TIMF_SET 0x00
270 #define DEMOD_TIMF_GET 0x01
271 #define DEMOD_TIMF_UPDATE 0x02
273 #define MPEG_ON_DIBTX 1
274 #define DIV_ON_DIBTX 2
275 #define ADC_ON_DIBTX 3
276 #define DEMOUT_ON_HOSTBUS 4
277 #define DIBTX_ON_HOSTBUS 5
278 #define MPEG_ON_HOSTBUS 6