app_trace.c 934 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. #include <stdio.h>
  13. #include <stdint.h>
  14. #include <string.h>
  15. #include <stdarg.h>
  16. #ifdef ENABLE_DEBUG_LOG_SUPPORT
  17. #include "app_trace.h"
  18. #include "nrf_log.h"
  19. void app_trace_init(void)
  20. {
  21. (void)NRF_LOG_INIT();
  22. }
  23. void app_trace_dump(uint8_t * p_buffer, uint32_t len)
  24. {
  25. app_trace_log("\r\n");
  26. for (uint32_t index = 0; index < len; index++)
  27. {
  28. app_trace_log("0x%02X ", p_buffer[index]);
  29. }
  30. app_trace_log("\r\n");
  31. }
  32. #endif // ENABLE_DEBUG_LOG_SUPPORT
  33. /**
  34. *@}
  35. **/