Add firmware function events
This commit is contained in:
28
src/events/function_bitmap_event.c
Normal file
28
src/events/function_bitmap_event.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "function_bitmap_event.h"
|
||||
|
||||
static void log_function_bitmap_event(const struct app_event_header *aeh)
|
||||
{
|
||||
const struct function_bitmap_event *event =
|
||||
cast_function_bitmap_event(aeh);
|
||||
|
||||
APP_EVENT_MANAGER_LOG(aeh, "len=%u", event->dyndata.size);
|
||||
}
|
||||
|
||||
static void profile_function_bitmap_event(struct log_event_buf *buf,
|
||||
const struct app_event_header *aeh)
|
||||
{
|
||||
const struct function_bitmap_event *event =
|
||||
cast_function_bitmap_event(aeh);
|
||||
|
||||
nrf_profiler_log_encode_uint16(buf, event->dyndata.size);
|
||||
}
|
||||
|
||||
APP_EVENT_INFO_DEFINE(function_bitmap_event,
|
||||
ENCODE(NRF_PROFILER_ARG_U16),
|
||||
ENCODE("len"),
|
||||
profile_function_bitmap_event);
|
||||
|
||||
APP_EVENT_TYPE_DEFINE(function_bitmap_event,
|
||||
log_function_bitmap_event,
|
||||
&function_bitmap_event_info,
|
||||
APP_EVENT_FLAGS_CREATE(APP_EVENT_TYPE_FLAGS_INIT_LOG_ENABLE));
|
||||
Reference in New Issue
Block a user