hv_drv_Bcon.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * @file hv_drv_Bcon.h
  3. * @brief Header file of audio module.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. * (+)
  10. *
  11. * @endverbatim
  12. * @author HiView SoC Software Team
  13. * @version 1.0.0
  14. * @date 2022-08-18
  15. */
  16. #ifndef __DRV_DIMMER__
  17. #define __DRV_DIMMER__
  18. #include "hv_vos_Comm.h"
  19. typedef enum _BconProtoc
  20. {
  21. BCON_PROT_TI,
  22. BCON_PROT_XX,
  23. BCON_PROT_S,
  24. BCON_PROT_HY,
  25. BCON_PROT_MAX
  26. } BconProtoc;
  27. typedef enum _BconSendMode
  28. {
  29. BCON_CMD_MODE_RAM_ONLY,
  30. BCON_CMD_MODE_CMD_ONLY,
  31. BCON_CMD_MODE_CMD_BOTH,
  32. BCON_CMD_MODE_MAX
  33. } BconSendMode;
  34. typedef enum _BconCmdWidth
  35. {
  36. BCON_CMD_WIDTH_8BIT,
  37. BCON_CMD_WIDTH_16BIT,
  38. BCON_CMD_WIDTH_MAX
  39. } BconCmdWidth;
  40. VOID Hv_Drv_Bcon_Init(UCHAR8 ucVendor, UINT32 uiClk);
  41. Status Hv_Drv_Bcon_SetClk(UINT32 uiClk);
  42. Status Hv_Drv_Bcon_SetVendor(BconProtoc eProt);
  43. Status Hv_Drv_Bcon_SwitchSram(VOID);
  44. VOID Hv_Drv_Bcon_SetPacketLength(UINT32 uiLength);
  45. UCHAR8 Hv_Drv_Bcon_CheckBusy(UINT32 uiLane);
  46. VOID Hv_Drv_Bcon_WriteData(UCHAR8 ucLaneIndex, USHORT16 *auiBuf, UINT32 uiLength);
  47. VOID Hv_Drv_Bcon_WriteDataU32(UINT32 uiLane, UINT32 *auiBuf, UINT32 uiLength);
  48. VOID Hv_Drv_Bcon_SetPinshare(BconProtoc eProt);
  49. VOID Hv_Drv_Bcon_SetCmdMode(UCHAR8 ucLaneIndex, BconSendMode eMode);
  50. VOID Hv_Drv_Bcon_SetDataLength(UCHAR8 ucLaneIndex, UINT32 uiLength);
  51. VOID Hv_Drv_Bcon_Start(UINT32 uiSel);
  52. VOID Hv_Drv_Bcon_Sram_SingleWriteData(UCHAR8 ucLaneIndex, UINT32 *auiBuf, UINT32 uiLength);
  53. VOID Hv_Drv_Bcon_Set_SingleDataWidth(UCHAR8 ucLaneIndex, BconCmdWidth eWidth);
  54. VOID Hv_Drv_Bcon_Set_SingleCmdWidth(UCHAR8 ucLaneIndex, BconCmdWidth eWidth);
  55. VOID Hv_Drv_Bcon_Set_SingleCmdLength(UCHAR8 ucLaneIndex, UINT32 uiLength);
  56. VOID Hv_Drv_Bcon_ReadData(UCHAR8 ucLane, USHORT16 usLen, USHORT16 *pusBuf);
  57. #endif