37 lines
815 B
C
37 lines
815 B
C
|
|
#ifndef BLINKY_PROTO_TRANSPORT_STATE_EVENT_H_
|
||
|
|
#define BLINKY_PROTO_TRANSPORT_STATE_EVENT_H_
|
||
|
|
|
||
|
|
#include <app_event_manager.h>
|
||
|
|
#include <app_event_manager_profiler_tracer.h>
|
||
|
|
|
||
|
|
#include "proto_common.h"
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
struct proto_transport_state_event {
|
||
|
|
struct app_event_header header;
|
||
|
|
enum proto_transport transport;
|
||
|
|
enum proto_transport_link_state state;
|
||
|
|
};
|
||
|
|
|
||
|
|
APP_EVENT_TYPE_DECLARE(proto_transport_state_event);
|
||
|
|
|
||
|
|
static inline void submit_proto_transport_state_event(
|
||
|
|
enum proto_transport transport, enum proto_transport_link_state state)
|
||
|
|
{
|
||
|
|
struct proto_transport_state_event *event =
|
||
|
|
new_proto_transport_state_event();
|
||
|
|
|
||
|
|
event->transport = transport;
|
||
|
|
event->state = state;
|
||
|
|
APP_EVENT_SUBMIT(event);
|
||
|
|
}
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif /* BLINKY_PROTO_TRANSPORT_STATE_EVENT_H_ */
|