hv_comm_Log.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * @file hv_comm_Log.h
  3. * @brief Header file of mute module.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. *
  10. * @endverbatim
  11. *
  12. * @author HiView SoC Software Team
  13. * @version 1.0.0
  14. * @date 2022-08-23
  15. */
  16. #ifndef __HV_LOG_H__
  17. #define __HV_LOG_H__
  18. #include "hv_vos_Comm.h"
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /* Here define or modify the module name */
  23. #define SYSTEM "system"
  24. #define OSD "osd"
  25. #define HDMI "hdmi"
  26. #define DP "dp"
  27. #define VIDEO "video"
  28. #define AUDIO "audio"
  29. #define TYPEC "typec"
  30. #define PM "PM"
  31. #define PANEL "panel"
  32. #define CHANNEL "channel"
  33. #define EVENT "event"
  34. #define DB "db"
  35. #define EEPROM "eeprom"
  36. #define TIMER "timer"
  37. #define HDCP "hdcp"
  38. #define SYSDB "sysdb"
  39. #define DEFAULT "default"
  40. #define DDCCI "DDC"
  41. #define BCON "bcon"
  42. #define EVENT_HUB "event_hub"
  43. #define PINSHARE "pinshare"
  44. #define GPIO "gpio"
  45. #define PQ "PQ"
  46. #define POWER "Power"
  47. #define INPUTPORT "InputPort"
  48. #define LED "led"
  49. /* Log interface */
  50. #ifdef HV_SCALER_DEBUG_VERSION
  51. #define HV_LOG_ASSERT(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_FATAL, __VA_ARGS__)
  52. #define HV_LOG_ERROR(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_ERROR, __VA_ARGS__)
  53. #define HV_LOG_WARN(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_WARN, __VA_ARGS__)
  54. #define HV_LOG_INFO(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_INFO, __VA_ARGS__)
  55. #define HV_LOG_DEBUG(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_VERBOSE, __VA_ARGS__)
  56. #define HV_LOG_VERBOSE(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_VERBOSE, __VA_ARGS__)
  57. #define HV_LOG_RAW(...) HV_RAW_LOGI(__VA_ARGS__)
  58. #else
  59. #define HV_LOG_ASSERT(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_FATAL, __VA_ARGS__)
  60. #define HV_LOG_ERROR(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_ERROR, __VA_ARGS__)
  61. #define HV_LOG_WARN(module_name, ...) HV_LOG_WRITE(HV_LOG_LEVEL_WARN, __VA_ARGS__)
  62. #define HV_LOG_INFO(module_name, ...)
  63. #define HV_LOG_DEBUG(module_name, ...)
  64. #define HV_LOG_VERBOSE(module_name, ...)
  65. #define HV_LOG_RAW(...)
  66. #endif
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif /* __HV_LOG_H__ */