/* Reset endpoint state. 
Resets the internal logic state for a given endpoint. */
static void ep_ctx_reset(struct nrf_usbd_ep_ctx *ep_ctx)
/* Reset endpoint state. 
Resets the internal logic state for a given endpoint. */
static void ep_ctx_reset(struct nrf_usbd_ep_ctx *ep_ctx)
{
	ep_ctx->buf.data = ep_ctx->buf.block.data;
	ep_ctx->buf.curr = ep_ctx->buf.data;
	ep_ctx->buf.len  = 0U;
	if (ep_ctx->write_in_progress) {
		nrf_usbd_common_ep_abort(ep_addr_to_nrfx(ep_ctx->cfg.addr));
	}
	ep_ctx->read_complete = true;
	ep_ctx->read_pending = false;
	ep_ctx->write_in_progress = false;
	ep_ctx->trans_zlp = false;
}