/* Get next available HCI event from the input-copy queue.  */
static void get_event(uint16_t size)
/* Get next available HCI event from the input-copy queue.  */
static void get_event(uint16_t size)
{
	uint16_t  response = sys_cpu_to_le16(CMD_GET_EVENT_RSP);
	struct net_buf *buf;
	read_excess_bytes(size);
	size = 0;
	edtt_write((uint8_t *)&response, sizeof(response), EDTTT_BLOCK);
	buf = net_buf_get(&event_queue, K_FOREVER);
	if (buf) {
		size = sys_cpu_to_le16(buf->len);
		edtt_write((uint8_t *)&size, sizeof(size), EDTTT_BLOCK);
		edtt_write((uint8_t *)buf->data, buf->len, EDTTT_BLOCK);
		net_buf_unref(buf);
		m_events--;
	} else {
		edtt_write((uint8_t *)&size, sizeof(size), EDTTT_BLOCK);
	}
}