/* Get next available HCI events from the input-copy queue.  */
static void get_events(uint16_t size)
/* Get next available HCI events from the input-copy queue.  */
static void get_events(uint16_t size)
{
	uint16_t response = sys_cpu_to_le16(CMD_GET_EVENT_RSP);
	struct net_buf *buf;
	uint8_t count = m_events;
	read_excess_bytes(size);
	size = 0;
	edtt_write((uint8_t *)&response, sizeof(response), EDTTT_BLOCK);
	edtt_write((uint8_t *)&count, sizeof(count), EDTTT_BLOCK);
	while (count--) {
		buf = net_buf_get(&event_queue, K_FOREVER);
		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--;
	}
}