From 810b0d9a5b4dfa38d0a408af1e46ed09cc1ec052 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Sat, 19 May 2012 01:40:44 +0900 Subject: [PATCH] bug fix for control_read --- ChangeLog | 6 ++++++ src/usb_lld.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b8fd9d..ecb47ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-19 Niibe Yutaka + + * src/usb_lld.c (handle_datastage_in): Bug fix, erable RX when + sending ZLP. It will be possible to get OUT transaction soon + after IN transaction. + 2012-05-18 Niibe Yutaka * src/usb_lld.c (handle_datastage_out): Fix rx copying. diff --git a/src/usb_lld.c b/src/usb_lld.c index d6e8c39..948f3a7 100644 --- a/src/usb_lld.c +++ b/src/usb_lld.c @@ -422,11 +422,11 @@ static void handle_datastage_in (void) /* No more data to send. Send empty packet */ st103_set_tx_count (ENDP0, 0); - st103_ep_set_tx_status (ENDP0, EP_TX_VALID); + st103_ep_set_rxtx_status (ENDP0, EP_RX_VALID, EP_TX_VALID); } else { - /* No more data to send, but receive OUT acknowledge.*/ + /* No more data to send, proceed to receive OUT acknowledge.*/ dev_p->state = WAIT_STATUS_OUT; st103_ep_set_rxtx_status (ENDP0, EP_RX_VALID, EP_TX_STALL); }