tl_dbg_conf.h 4.2 KB

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