📄 tmdlfe.h
字号:
- else a problem has been detected
- tmdlFeNotOpen_E: The opening of the driver was not done
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeGetInstanceSetup(
tmdlFeInstance_t FeInstance_U,
tmdlFeInstanceSetup_t* pInstanceSetup_S
);
/*********** Low power function ***********/
/**
\brief This function set the Demodulator in the stand-by mode
It send a message to the front-end task to stand-by the demodulator
\param FeInstance_U: the instance number
\param PowerMode_F: power mode to set
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E: The opening of the driver was not done
- tmdlFeCallFailed_E:
- problem with message sent
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeSetLowPowerMode(
tmdlFeInstance_t FeInstance_U,
Bool PowerMode_F
);
/*********** Modulator function ***********/
/**
\brief Set the channel number
of the modulator signal
\param FeInstance_U: the instance number
\param channel_U: channel number (UHF between 21 and 65)
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E: The opening of the driver was not done
- tmdlFeCallFailed_E:
- front end Type uncorrect
\note It is not advised to use this function but rather
the tmdlFeSetModulatorParam function
\bug This function works fine only for PAL-I
\sa NA
*/
tmdlFeErr_t tmdlFeSetModulator(
tmdlFeInstance_t FeInstance_U,
UInt32 channel_U
);
/**
\brief Set the channel parameters (Video mode, frequency)
of the modulator
\param FeInstance_U: instance number
\param frequency: the frequency to remodulate
\param mode: The video mode (pal, secam, or any other flavors,...)
\return The call results type is tmdlFeErr_t.\n
- TM_OK means the call is successful\n
- else a problem has been detected\n
-tmdlFeNotOpen_E: devlib not opened\n
-tmdlFeInvalidValue_E: video mode not supported\n
-tmdlFeCallFailed_E: other errors\n
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeSetModulatorParam(
tmdlFeInstance_t FeInstance_U,
UInt32 frequency,
tmdlFeVideoMode_t mode
);
/*********** config functions ***********/
/**
\brief This function configure the demodulator instance passed as input.
The function must be called after the tmdlFeOpen function and after tmdlFeSetInstanceSetup
It allows to set one parameter at a time
Especially:
- for Satellite media:
- diseq frame or
- lnb power (internal or external) or
- Tone burst (A or B
- for terrestrial media
- DVB or ATSC
- for cable media
- No use
\param FeInstance_U: the instance number
\param pConfig_S: pointer on the instance configuration
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeCallFailed_E:
- problem with message sent
\note NA
\bug: No test of the state machine!!!!!!!!!!!!
Very strange API behavior is totally different according to the media
\sa NA
*/
tmdlFeErr_t tmdlFeSetConfig(
tmdlFeInstance_t FeInstance_U,
tmdlFeConfig_t* pConfig_S
);
/**
\brief This function recover the demodulator configuration of the instance passed as input.
The function must be called after the tmdlFeOpen function
It allows to get parameters
Especially:
- for Satellite media:
- diseq frame or
- lnb power (internal or external) or
- Tone burst (A or B
- for terrestrial media
- DVB or ATSC
- for cable media
- No use
\param FeInstance_U: the instance number
\param pConfig_S: pointer on the instance configuration
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
\note It seems that error in message wait or send are not raised
\sa NA
*/
tmdlFeErr_t tmdlFeGetConfig(
tmdlFeInstance_t FeInstance_U,
tmdlFeConfig_t* pConfig_S
);
/*********** tuning function ***********/
/**
\brief This function tune the demodulator and the tuner according to its parameters.
Especially it sets
- the frequency
- the symbol rate
- the spectrum inversion
- the constellation type (QAM, QPSK, BPSK)
- the specific parameters according to the media(Ter, Cable, Sat)
- If the tuning wa successful, then the callback is called with
event=TMDL_FE_EVENT_CARRIER_TUNED or
- if the tuning failed, the demodulator continue to try to lock
and relaunch a tuning till maximum of retry is reached
- If the maximum number od retry is reached the event TMDL_FE_EVENT_NO_CARRIER
is raised through the callback
- If the number of retry was set to 0, the event TMDL_FE_EVENT_TUNE_FAILED
is raised through the callback
\param FeInstance_U: the instance number
\param pTuningConfig_S: pointer on the tuning parameters
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note It could be interresting to understand the necessity to do infinite try
to lock on a channel. It may not be required.
\sa NA
*/
tmdlFeErr_t tmdlFeTune(
tmdlFeInstance_t FeInstance_U,
tmdlFeTuningConfig_t* pTuningConfig_S
);
/*********** scanning functions ***********/
/**
\brief Starts the scanning from start frequency to stop
frequency (taken as a parameters) with a specific spectrum inversion
- At each channel found an event TMDL_FE_EVENT_CARRIER_FOUND is raised through the callback
with the channel status as second parameter of the call-back
- At the end of the search an event TMDL_FE_EVENT_END_OF_SEARCH is raised through the callback
\param FeInstance_U: the instance number
\param pSearchConfig_S: parameter of the scanning
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeStartScan(
tmdlFeInstance_t FeInstance_U,
tmdlFeSearchConfig_t* pSearchConfig_S
);
/**
\brief Starts the scanning from start frequency to stop
frequency (taken as a parameters) with a automatic spectrum inversion detection
- At each channel found an event TMDL_FE_EVENT_CARRIER_FOUND is raised through the callback
with the channel status as second parameter of the call-back
- At the end of the search an event TMDL_FE_EVENT_END_OF_SEARCH is raised through the callback
\param FeInstance_U: the instance number
\param pSearchConfig_S: parameter of the scanning
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeStartAutoScan(
tmdlFeInstance_t FeInstance_U,
tmdlFeSearchConfig_t* pSearchConfig_S
);
/**
\brief This function should be called each time a channel has been found
(during scanning) to relaunch the scanning till the stop frequency
\param FeInstance_U: the instance number
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeContinueScan(
tmdlFeInstance_t FeInstance_U
);
/**
\brief This function stops scanning or tunning process
In that case the algorithm is stopped and no more action are taken by tmdlFe
(No more FE task execution)
\param FeInstance_U: the instance number
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeStop(
tmdlFeInstance_t FeInstance_U
);
/*********** status function ***********/
/**
\brief This function allows to get the parameters of the last channel found during
a scanning or a tuning
According to the mask value passed only a part of the parameters are really updated in
the status returned
\param FeInstance_U: the instance number
\param StatusMask_S: Mask containing all the information wanted
\param pDemodStatus_S: status of the demodulator
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the message mechanism
\note This function is especially useful during the scanning algorithm to
retrieve the frequency, spectrum, symbol rate, and other parameters of
the channel found.
\sa NA
*/
tmdlFeErr_t tmdlFeGetStatus(
tmdlFeInstance_t FeInstance_U,
tmdlFeStatusMask_t StatusMask_S,
tmdlFeStatus_t* pDemodStatus_S
);
/*********** report functions ***********/
/**
\brief This function registers the callback function. The callback function will be
call back on the events set by tmdlFeSetEventMask function
\param FeInstance_U: the instance number
\param pCallback: callback function
\param UserData_U: user data which will be passed to the callback
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- Callback is a null pointer
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeRegisterCallback(
tmdlFeInstance_t FeInstance_U,
tmdlCallback_t* pCallback,
UInt32 UserData_U
);
/**
\brief This function set the events on which the callback will be called by the driver
\param FeInstance_U: the instance number
\param EventMask_U: Mask of the events choosen to callback
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
\note NA
\sa NA
*/
tmdlFeErr_t tmdlFeSetEventMask(
tmdlFeInstance_t FeInstance_U,
UInt32 EventMask_U
);
/**
\brief Read all the registers of either the tuner or the demodulator and print
them on STDOUT
\param FeInstance_U: the instance number
\param DemodOrTuner: Not clear name should be modified............
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\bug This function should never been exported in retail mode
as there are print inside
\sa NA
*/
tmdlFeErr_t tmdlFeRead(
tmdlFeInstance_t FeInstance_U,
Bool DemodOrTuner
);
/*********** relock functions ***********/
tmdlFeErr_t tmdlFeStartRelock(
tmdlFeInstance_t FeInstance_U
);
tmdlFeErr_t tmdlFeStopRelock(
tmdlFeInstance_t FeInstance_U
);
/**
\brief This function allows to get the time in tick.
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\bug This function is LOCAL and should never be exported!!!!!!!!!!!!!!!!!!!!!!!!!!
\sa NA
*/
UInt32 SY_GetTickTime(void);
/**
\brief Get the tick period
\return
- TM_OK means the call is successful
- else a problem has been detected
- tmdlFeNotOpen_E:
- driver not opened
- tmdlFeCallFailed_E
- problem in the messages mechanism
\note NA
\bug This function is LOCAL and should never be exported!!!!!!!!!!!!!!!!!!!!!!!!!!
\sa NA
*/
UInt32 SY_GetTickPeriod(void);
#ifdef __cplusplus
}
#endif
#endif // tmdlFe_H //---------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -