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.

90 lines
3.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Philips Semiconductors-CSU 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. // VSBBASE.H
  15. // Definition of CVSBDemod class
  16. //////////////////////////////////////////////////////////////////////////////
  17. #ifndef _VSBBASE_H_
  18. #define _VSBBASE_H_
  19. #include "wdmdrv.h"
  20. #include "i2script.h"
  21. #include "util.h"
  22. #include "ksvsb.h"
  23. #include "vsbdef.h"
  24. class CVSBDemod
  25. {
  26. public:
  27. CVSBDemod(CI2CScript *p_I2CScript, BoardInfoType *p_BoardInfo, NTSTATUS *p_Status);
  28. virtual UINT SetRegisterList(RegisterType *p_Registers, UINT uiNumRegisters);
  29. virtual UINT GetRegisterList(RegisterType *p_Registers, UINT uiNumRegisters,
  30. UINT uiRegisterType);
  31. virtual UINT SetCoeff(VsbCoeffType *p_Coeff, UINT uiNumCoeff);
  32. virtual UINT GetCoeff(VsbCoeffType *p_Coeff, UINT uiNumCoeff);
  33. virtual UINT SetControlRegister(RegisterType *p_Registers,
  34. UINT uiNumRegisters);
  35. virtual UINT GetControlRegister(RegisterType *p_registers,
  36. UINT uinum_registers);
  37. virtual UINT GetStatusRegister(RegisterType *p_Registers,
  38. UINT uiNumRegisters);
  39. virtual UINT WriteControlReg(RegisterType *p_Registers, UINT uiNumRegisters,
  40. BOOL bWrite);
  41. virtual UINT ReadStatusReg(RegisterType *p_Registers, UINT uiNumRegisters);
  42. virtual BOOL IsVSBLocked();
  43. virtual BOOL SoftwareReset(ULONG ulResetCtrl);
  44. virtual BOOL InitVSB() = 0;
  45. virtual BOOL CoeffIDToAddress(UINT uiID, UINT *p_uiAddress,
  46. UINT uiRegisterType) = 0;
  47. virtual BOOL GetStatus(PVsbStatusType p_Status) = 0;
  48. virtual BOOL SetOutputMode(UINT uiOutputMode) = 0;
  49. virtual BOOL GetOutputMode(UINT *p_uiOutputMode) = 0;
  50. virtual BOOL SetDiagMode(VSBDIAGTYPE ulMode) = 0;
  51. virtual BOOL GetDiagMode(ULONG *p_ulMode) = 0;
  52. virtual ULONG GetDiagSpeed(ULONG ulType) = 0;
  53. protected:
  54. virtual UINT WriteCoeff(VsbCoeffType **pp_Coeff, UINT uiNumCoeff);
  55. virtual UINT ReadCoeff(VsbCoeffType **pp_Coeff, UINT uiNumCoeff);
  56. virtual UINT Write(UCHAR *p_ucBuffer, UINT uiNumReg, UINT uiStartAddr);
  57. virtual UINT Read(UCHAR *p_ucBuffer, UINT uiNumReg, UINT uiStartAddr);
  58. virtual BOOL EnableCoefficients(UCHAR ucEnable) = 0;
  59. virtual BOOL DisableCoefficients() = 0;
  60. virtual BOOL Initialize() = 0;
  61. protected:
  62. UCHAR m_ucControlReg[MAX_VSB_REGISTERS];
  63. CMutex m_RegisterLock;
  64. UCHAR m_ucI2CBuffer[MAX_VSB_BUF_SIZE];
  65. CI2CScript *m_pI2CScript;
  66. UCHAR m_ucVsbDemodAddress;
  67. UINT m_uiMaxControlRegisterAddress;
  68. UINT m_uiMaxStatusRegisterAddress;
  69. };
  70. #endif //_VSBBASE_H_