Lines Matching refs:data
54 struct icmsg_me_data_t *data) in icmsg_me_init() argument
56 k_event_init(&data->event); in icmsg_me_init()
57 k_mutex_init(&data->send_mutex); in icmsg_me_init()
63 struct icmsg_me_data_t *data, in icmsg_me_open() argument
67 data->ept_cfg.cb = *cb; in icmsg_me_open()
68 data->ept_cfg.priv = ctx; in icmsg_me_open()
70 return icmsg_open(conf, &data->icmsg_data, &data->ept_cfg.cb, in icmsg_me_open()
71 data->ept_cfg.priv); in icmsg_me_open()
74 void icmsg_me_icmsg_bound(struct icmsg_me_data_t *data) in icmsg_me_icmsg_bound() argument
76 k_event_post(&data->event, EVENT_BOUND); in icmsg_me_icmsg_bound()
79 void icmsg_me_wait_for_icmsg_bind(struct icmsg_me_data_t *data) in icmsg_me_wait_for_icmsg_bind() argument
81 k_event_wait(&data->event, EVENT_BOUND, false, K_FOREVER); in icmsg_me_wait_for_icmsg_bind()
84 int icmsg_me_set_empty_ept_cfg_slot(struct icmsg_me_data_t *data, in icmsg_me_set_empty_ept_cfg_slot() argument
91 if (data->epts[i] == NULL) { in icmsg_me_set_empty_ept_cfg_slot()
100 data->epts[i] = ept_cfg; in icmsg_me_set_empty_ept_cfg_slot()
116 int icmsg_me_set_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, in icmsg_me_set_ept_cfg() argument
125 data->epts[i] = ept_cfg; in icmsg_me_set_ept_cfg()
129 int icmsg_me_get_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, in icmsg_me_get_ept_cfg() argument
138 *ept_cfg = data->epts[i]; in icmsg_me_get_ept_cfg()
142 void icmsg_me_reset_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id) in icmsg_me_reset_ept_cfg() argument
150 data->epts[i] = NULL; in icmsg_me_reset_ept_cfg()
153 void icmsg_me_received_data(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, in icmsg_me_received_data() argument
160 r = icmsg_me_get_ept_cfg(data, id, &ept); in icmsg_me_received_data()
181 struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, in icmsg_me_send() argument
192 k_mutex_lock(&data->send_mutex, K_FOREVER); in icmsg_me_send()
198 set_ept_id_in_send_buffer(data->send_buffer, id); in icmsg_me_send()
199 memcpy(icmsg_buffer_to_user_buffer(data->send_buffer), msg, len); in icmsg_me_send()
201 r = icmsg_send(conf, &data->icmsg_data, data->send_buffer, in icmsg_me_send()
207 k_mutex_unlock(&data->send_mutex); in icmsg_me_send()