Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Philips Semiconductors-CSU and Microsoft 1999
  4. // All rights are reserved. Reproduction in whole or in part is prohibited
  5. // without the written consent of the copyright owner.
  6. //
  7. // Philips reserves the right to make changes without notice at any time.
  8. // Philips makes no warranty, expressed, implied or statutory, including but
  9. // not limited to any implied warranty of merchantibility or fitness for any
  10. // particular purpose, or that the use will not infringe any third party
  11. // patent, copyright or trademark. Philips must not be liable for any loss
  12. // or damage arising from its use.
  13. //
  14. // Tuner.H
  15. // CTuner Class definition.
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18. #ifndef _TUNER_H_
  19. #define _TUNER_H_
  20. #include "i2script.h"
  21. #include "tunerdef.h"
  22. class CTuner
  23. {
  24. public:
  25. CTuner(CI2CScript *p_I2CScript, BoardInfoType *p_BoardInfo, NTSTATUS *p_Status);
  26. ~CTuner();
  27. // PVOID operator new (UINT size_t);
  28. // void operator delete(PVOID p_Object);
  29. NTSTATUS SetCapabilities(BoardInfoType *p_BoardInfo);
  30. NTSTATUS GetModeCapabilities(TunerModeCapsType *p_TunerModeCaps);
  31. NTSTATUS SetVideoStandard(ULONG ulStandard) ;
  32. void GetVideoStandard(ULONG *p_ulStandard);
  33. UINT SetInput(ULONG ulInput);
  34. BOOL GetInput(ULONG *p_ulInput);
  35. NTSTATUS SetMode(ULONG ulMode);
  36. void GetMode(ULONG *p_ulMode);
  37. #if 0
  38. UINT SetFrequencyParam(TunerFrequencyType *p_Frequency);
  39. void GetFrequencyParam(TunerFrequencyType *p_Frequency);
  40. #endif
  41. NTSTATUS GetPLLOffsetBusyStatus(PLONG plPLLOffset, PBOOL pbBusyStatus);
  42. BOOL SetFrequency(ULONG ulFrequency);
  43. void GetFrequency(ULONG *p_ulFrequency);
  44. BOOL ChangeFrequency(ULONG ulFrequency);
  45. BOOL TweakChannel(LONG lTweak, int iTweakReference);
  46. BOOL GetNumberOfInputs(ULONG *p_ulInputs);
  47. protected:
  48. USHORT GetControlCode(ULONG ulFrequencyDivider);
  49. UINT Write(UCHAR *p_ucBuffer, UINT uiNumReg, UINT uiStartAddr);
  50. UINT Read(UCHAR *p_ucBuffer, UINT uiNumReg, UINT uiStartAddr);
  51. protected:
  52. ULONG m_ulPreviousFrequency;
  53. ULONG m_ulCurrentFrequency;
  54. ULONG m_ulMode;
  55. ULONG m_ulPrevMode;
  56. // TunerFrequencyType m_FrequencyParam;
  57. ULONG m_ulModeCapIndex;
  58. TunerCapsType m_ModeCaps[MAX_TUNER_MODES];
  59. ULONG m_ulSupportedModes;
  60. ULONG m_ulNumSupportedModes;
  61. ULONG m_ulVideoStandard;
  62. CI2CScript *m_pI2CScript;
  63. UINT m_uiNumInputs;
  64. UCHAR m_ucTunerAddress;
  65. TunerTypes m_TunerID;
  66. UINT m_ulInput;
  67. UINT m_uiBoardID;
  68. };
  69. #endif //_TUNER_H_