tl_dbg_conf.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : App/tl_dbg_conf.h
  5. * Description : Debug configuration file for stm32wpan transport layer interface.
  6. *
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under Ultimate Liberty license
  14. * SLA0044, the "License"; You may not use this file except in compliance with
  15. * the License. You may obtain a copy of the License at:
  16. * www.st.com/SLA0044
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __TL_DBG_CONF_H
  23. #define __TL_DBG_CONF_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* USER CODE BEGIN Tl_Conf */
  28. /* Includes ------------------------------------------------------------------*/
  29. #include "app_conf.h" /* required as some configuration used in dbg_trace.h are set there */
  30. #include "dbg_trace.h"
  31. #include "hw_if.h"
  32. /**
  33. * Enable or Disable traces
  34. * The raw data output is the hci binary packet format as specified by the BT specification *
  35. */
  36. #define TL_SHCI_CMD_DBG_EN 1 /* Reports System commands sent to CPU2 and the command response */
  37. #define TL_SHCI_CMD_DBG_RAW_EN \
  38. 0 /* Reports raw data System commands sent to CPU2 and the command response */
  39. #define TL_SHCI_EVT_DBG_EN 1 /* Reports System Asynchronous Events received from CPU2 */
  40. #define TL_SHCI_EVT_DBG_RAW_EN \
  41. 0 /* Reports raw data System Asynchronous Events received from CPU2 */
  42. #define TL_HCI_CMD_DBG_EN 1 /* Reports BLE command sent to CPU2 and the command response */
  43. #define TL_HCI_CMD_DBG_RAW_EN \
  44. 0 /* Reports raw data BLE command sent to CPU2 and the command response */
  45. #define TL_HCI_EVT_DBG_EN 1 /* Reports BLE Asynchronous Events received from CPU2 */
  46. #define TL_HCI_EVT_DBG_RAW_EN 0 /* Reports raw data BLE Asynchronous Events received from CPU2 */
  47. #define TL_MM_DBG_EN 1 /* Reports the informations of the buffer released to CPU2 */
  48. /**
  49. * System Transport Layer
  50. */
  51. #if(TL_SHCI_CMD_DBG_EN != 0)
  52. #define TL_SHCI_CMD_DBG_MSG PRINT_MESG_DBG
  53. #define TL_SHCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG
  54. #else
  55. #define TL_SHCI_CMD_DBG_MSG(...)
  56. #define TL_SHCI_CMD_DBG_BUF(...)
  57. #endif
  58. #if(TL_SHCI_CMD_DBG_RAW_EN != 0)
  59. #define TL_SHCI_CMD_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  60. #else
  61. #define TL_SHCI_CMD_DBG_RAW(...)
  62. #endif
  63. #if(TL_SHCI_EVT_DBG_EN != 0)
  64. #define TL_SHCI_EVT_DBG_MSG PRINT_MESG_DBG
  65. #define TL_SHCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG
  66. #else
  67. #define TL_SHCI_EVT_DBG_MSG(...)
  68. #define TL_SHCI_EVT_DBG_BUF(...)
  69. #endif
  70. #if(TL_SHCI_EVT_DBG_RAW_EN != 0)
  71. #define TL_SHCI_EVT_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  72. #else
  73. #define TL_SHCI_EVT_DBG_RAW(...)
  74. #endif
  75. /**
  76. * BLE Transport Layer
  77. */
  78. #if(TL_HCI_CMD_DBG_EN != 0)
  79. #define TL_HCI_CMD_DBG_MSG PRINT_MESG_DBG
  80. #define TL_HCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG
  81. #else
  82. #define TL_HCI_CMD_DBG_MSG(...)
  83. #define TL_HCI_CMD_DBG_BUF(...)
  84. #endif
  85. #if(TL_HCI_CMD_DBG_RAW_EN != 0)
  86. #define TL_HCI_CMD_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  87. #else
  88. #define TL_HCI_CMD_DBG_RAW(...)
  89. #endif
  90. #if(TL_HCI_EVT_DBG_EN != 0)
  91. #define TL_HCI_EVT_DBG_MSG PRINT_MESG_DBG
  92. #define TL_HCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG
  93. #else
  94. #define TL_HCI_EVT_DBG_MSG(...)
  95. #define TL_HCI_EVT_DBG_BUF(...)
  96. #endif
  97. #if(TL_HCI_EVT_DBG_RAW_EN != 0)
  98. #define TL_HCI_EVT_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  99. #else
  100. #define TL_HCI_EVT_DBG_RAW(...)
  101. #endif
  102. /**
  103. * Memory Manager - Released buffer tracing
  104. */
  105. #if(TL_MM_DBG_EN != 0)
  106. #define TL_MM_DBG_MSG PRINT_MESG_DBG
  107. #else
  108. #define TL_MM_DBG_MSG(...)
  109. #endif
  110. /* USER CODE END Tl_Conf */
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114. #endif /*__TL_DBG_CONF_H */
  115. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/