The nrf_log backend interface.
More...
|
#define | NRF_LOG_BACKEND_SECTION_NAME log_backends |
|
#define | NRF_LOG_BACKEND_SUBSECTION_NAME(_name) NRF_LOG_BACKEND_SECTION_NAME |
|
#define | NRF_LOG_BACKEND_INVALID_ID 0xFF |
| Invalid ID value indicating that logger backend is not attached to the logger frontend.
|
|
#define | NRF_LOG_BACKEND_DEF(_name, _api, _p_ctx) |
| Macro for creating a logger backend instance. More...
|
|
The nrf_log backend interface.
#define NRF_LOG_BACKEND_DEF |
( |
|
_name, |
|
|
|
_api, |
|
|
|
_p_ctx |
|
) |
| |
Value:
.enabled = false, \
.p_next = NULL \
}; \
NRF_SECTION_ITEM_REGISTER(NRF_LOG_BACKEND_SUBSECTION_NAME(_name), \
.p_api = &_api, \
.p_ctx = _p_ctx, \
.p_cb = &
CONCAT_2(log_backend_cb_, _name), \
.p_name = (char *)STRINGIFY(_name) \
}
Macro for creating a logger backend instance.
- Parameters
-
_name | Name of the backend instance. |
_api | Logger backend API. |
_p_ctx | Pointer to the user context. |
__STATIC_INLINE void nrf_log_backend_disable |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for disabling backend.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
__STATIC_INLINE void nrf_log_backend_enable |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for enabling backend.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
__STATIC_INLINE void nrf_log_backend_flush |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for flushing backend.
On flushing request backend should release log message(s).
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
__STATIC_INLINE uint8_t nrf_log_backend_id_get |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for getting backend id.
- Note
- It is used internally by the logger.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
- Returns
- Id.
__STATIC_INLINE void nrf_log_backend_id_set |
( |
nrf_log_backend_t const *const |
p_backend, |
|
|
uint8_t |
id |
|
) |
| |
Function for setting backend id.
- Note
- It is used internally by the logger.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
[in] | id | Id. |
__STATIC_INLINE bool nrf_log_backend_is_enabled |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for checking state of the backend.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
- Returns
- True if backend is enabled, false otherwise.
__STATIC_INLINE void nrf_log_backend_panic_set |
( |
nrf_log_backend_t const *const |
p_backend | ) |
|
Function for reconfiguring backend to panic mode.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
Function for putting message with log entry to the backend.
- Parameters
-
[in] | p_backend | Pointer to the backend instance. |
[in] | p_msg | Pointer to message with log entry. |