Files
blinky/inc/events/settings_view_event.h

41 lines
740 B
C
Raw Normal View History

#ifndef BLINKY_SETTINGS_VIEW_EVENT_H_
#define BLINKY_SETTINGS_VIEW_EVENT_H_
#include <string.h>
#include <app_event_manager.h>
#include <app_event_manager_profiler_tracer.h>
#include "settings_ui.h"
#ifdef __cplusplus
extern "C" {
#endif
struct settings_view_event {
struct app_event_header header;
struct settings_ui_state state;
};
APP_EVENT_TYPE_DECLARE(settings_view_event);
static inline void submit_settings_view_event(
const struct settings_ui_state *state)
{
struct settings_view_event *event;
if (state == NULL) {
return;
}
event = new_settings_view_event();
memcpy(&event->state, state, sizeof(event->state));
APP_EVENT_SUBMIT(event);
}
#ifdef __cplusplus
}
#endif
#endif /* BLINKY_SETTINGS_VIEW_EVENT_H_ */