tl_dbg_conf.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. #include <furi_hal.h>
  33. /**
  34. * Enable or Disable traces
  35. * The raw data output is the hci binary packet format as specified by the BT specification *
  36. */
  37. #define TL_SHCI_CMD_DBG_EN 1 /* Reports System commands sent to CPU2 and the command response */
  38. #define TL_SHCI_CMD_DBG_RAW_EN \
  39. 0 /* Reports raw data System commands sent to CPU2 and the command response */
  40. #define TL_SHCI_EVT_DBG_EN 1 /* Reports System Asynchronous Events received from CPU2 */
  41. #define TL_SHCI_EVT_DBG_RAW_EN \
  42. 0 /* Reports raw data System Asynchronous Events received from CPU2 */
  43. #define TL_HCI_CMD_DBG_EN 1 /* Reports BLE command sent to CPU2 and the command response */
  44. #define TL_HCI_CMD_DBG_RAW_EN \
  45. 0 /* Reports raw data BLE command sent to CPU2 and the command response */
  46. #define TL_HCI_EVT_DBG_EN 1 /* Reports BLE Asynchronous Events received from CPU2 */
  47. #define TL_HCI_EVT_DBG_RAW_EN 0 /* Reports raw data BLE Asynchronous Events received from CPU2 */
  48. #define TL_MM_DBG_EN 1 /* Reports the informations of the buffer released to CPU2 */
  49. /**
  50. * System Transport Layer
  51. */
  52. #if(TL_SHCI_CMD_DBG_EN != 0)
  53. #define TL_SHCI_CMD_DBG_MSG PRINT_MESG_DBG
  54. #define TL_SHCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG
  55. #else
  56. #define TL_SHCI_CMD_DBG_MSG(...)
  57. #define TL_SHCI_CMD_DBG_BUF(...)
  58. #endif
  59. #if(TL_SHCI_CMD_DBG_RAW_EN != 0)
  60. #define TL_SHCI_CMD_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  61. #else
  62. #define TL_SHCI_CMD_DBG_RAW(...)
  63. #endif
  64. #if(TL_SHCI_EVT_DBG_EN != 0)
  65. #define TL_SHCI_EVT_DBG_MSG PRINT_MESG_DBG
  66. #define TL_SHCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG
  67. #else
  68. #define TL_SHCI_EVT_DBG_MSG(...)
  69. #define TL_SHCI_EVT_DBG_BUF(...)
  70. #endif
  71. #if(TL_SHCI_EVT_DBG_RAW_EN != 0)
  72. #define TL_SHCI_EVT_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  73. #else
  74. #define TL_SHCI_EVT_DBG_RAW(...)
  75. #endif
  76. /**
  77. * BLE Transport Layer
  78. */
  79. #if(TL_HCI_CMD_DBG_EN != 0)
  80. #define TL_HCI_CMD_DBG_MSG PRINT_MESG_DBG
  81. #define TL_HCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG
  82. #else
  83. #define TL_HCI_CMD_DBG_MSG(...)
  84. #define TL_HCI_CMD_DBG_BUF(...)
  85. #endif
  86. #if(TL_HCI_CMD_DBG_RAW_EN != 0)
  87. #define TL_HCI_CMD_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  88. #else
  89. #define TL_HCI_CMD_DBG_RAW(...)
  90. #endif
  91. #if(TL_HCI_EVT_DBG_EN != 0)
  92. #define TL_HCI_EVT_DBG_MSG PRINT_MESG_DBG
  93. #define TL_HCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG
  94. #else
  95. #define TL_HCI_EVT_DBG_MSG(...)
  96. #define TL_HCI_EVT_DBG_BUF(...)
  97. #endif
  98. #if(TL_HCI_EVT_DBG_RAW_EN != 0)
  99. #define TL_HCI_EVT_DBG_RAW(_PDATA_, _SIZE_) furi_hal_console_tx_with_new_line(_PDATA_, _SIZE_)
  100. #else
  101. #define TL_HCI_EVT_DBG_RAW(...)
  102. #endif
  103. /**
  104. * Memory Manager - Released buffer tracing
  105. */
  106. #if(TL_MM_DBG_EN != 0)
  107. #define TL_MM_DBG_MSG PRINT_MESG_DBG
  108. #else
  109. #define TL_MM_DBG_MSG(...)
  110. #endif
  111. /* USER CODE END Tl_Conf */
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115. #endif /*__TL_DBG_CONF_H */
  116. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/