30 lines
834 B
C
30 lines
834 B
C
|
|
#include "settings_mode_event.h"
|
||
|
|
|
||
|
|
static void log_settings_mode_event(const struct app_event_header *aeh)
|
||
|
|
{
|
||
|
|
const struct settings_mode_event *event =
|
||
|
|
cast_settings_mode_event(aeh);
|
||
|
|
|
||
|
|
APP_EVENT_MANAGER_LOG(aeh, "active:%u", event->active);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void profile_settings_mode_event(struct log_event_buf *buf,
|
||
|
|
const struct app_event_header *aeh)
|
||
|
|
{
|
||
|
|
const struct settings_mode_event *event =
|
||
|
|
cast_settings_mode_event(aeh);
|
||
|
|
|
||
|
|
nrf_profiler_log_encode_uint8(buf, event->active ? 1U : 0U);
|
||
|
|
}
|
||
|
|
|
||
|
|
APP_EVENT_INFO_DEFINE(settings_mode_event,
|
||
|
|
ENCODE(NRF_PROFILER_ARG_U8),
|
||
|
|
ENCODE("active"),
|
||
|
|
profile_settings_mode_event);
|
||
|
|
|
||
|
|
APP_EVENT_TYPE_DEFINE(settings_mode_event,
|
||
|
|
log_settings_mode_event,
|
||
|
|
&settings_mode_event_info,
|
||
|
|
APP_EVENT_FLAGS_CREATE(
|
||
|
|
APP_EVENT_TYPE_FLAGS_INIT_LOG_ENABLE));
|