123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- #ifndef NRFX_LOG_H__
- #define NRFX_LOG_H__
- #ifdef __cplusplus
- extern "C" {
- #endif
- #if defined(NRFX_LOG_MODULE)
- #define NRF_LOG_MODULE_NAME NRFX_LOG_MODULE
- #define NRFX_CONFIG_ENTRY(x) CONCAT_3(NRFX_, NRFX_LOG_MODULE, x)
- #if NRFX_CHECK(NRFX_CONFIG_ENTRY(_CONFIG_LOG_ENABLED))
- #define NRF_LOG_LEVEL NRFX_CONFIG_ENTRY(_CONFIG_LOG_LEVEL)
- #define NRF_LOG_INFO_COLOR NRFX_CONFIG_ENTRY(_CONFIG_INFO_COLOR)
- #define NRF_LOG_DEBUG_COLOR NRFX_CONFIG_ENTRY(_CONFIG_DEBUG_COLOR)
- #else
- #define NRF_LOG_LEVEL 0
- #endif
- #endif
- #include <nrf_log.h>
- #if defined(NRFX_LOG_MODULE)
- NRF_LOG_MODULE_REGISTER()
- #endif
- #define TEST_MACRO_INFO(...) NRF_LOG_INFO(__VA_ARGS__)
- #define NRFX_LOG_ERROR(...) NRF_LOG_ERROR(__VA_ARGS__)
- #define NRFX_LOG_WARNING(...) NRF_LOG_WARNING(__VA_ARGS__)
- #define NRFX_LOG_INFO(...) TEST_MACRO_INFO(__VA_ARGS__)
- #define NRFX_LOG_DEBUG(...) NRF_LOG_DEBUG(__VA_ARGS__)
- #define NRFX_LOG_HEXDUMP_ERROR(p_memory, length) \
- NRF_LOG_HEXDUMP_ERROR(p_memory, length)
- #define NRFX_LOG_HEXDUMP_WARNING(p_memory, length) \
- NRF_LOG_HEXDUMP_WARNING(p_memory, length)
- #define NRFX_LOG_HEXDUMP_INFO(p_memory, length) \
- NRF_LOG_HEXDUMP_INFO(p_memory, length)
- #define NRFX_LOG_HEXDUMP_DEBUG(p_memory, length) \
- NRF_LOG_HEXDUMP_DEBUG(p_memory, length)
- #define NRFX_LOG_ERROR_STRING_GET(error_code) \
- NRF_LOG_ERROR_STRING_GET(error_code)
- #ifdef __cplusplus
- }
- #endif
- #endif
|