summaryrefslogtreecommitdiff
path: root/board/twinkie/usb_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/twinkie/usb_commands.c')
-rw-r--r--board/twinkie/usb_commands.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/board/twinkie/usb_commands.c b/board/twinkie/usb_commands.c
index 508b3511b1..a858702db0 100644
--- a/board/twinkie/usb_commands.c
+++ b/board/twinkie/usb_commands.c
@@ -93,8 +93,11 @@ static void cmd_ep_rx(void)
console_has_input();
}
-static void cmd_ep_reset(void)
+static void cmd_ep_event(enum usb_ep_event evt)
{
+ if (evt != USB_EVENT_RESET)
+ return;
+
btable_ep[USB_EP_COMMAND].tx_addr = usb_sram_addr(ep_buf_tx);
btable_ep[USB_EP_COMMAND].tx_count = 0;
@@ -108,7 +111,7 @@ static void cmd_ep_reset(void)
EP_RX_VALID);
}
-USB_DECLARE_EP(USB_EP_COMMAND, cmd_ep_tx, cmd_ep_rx, cmd_ep_reset);
+USB_DECLARE_EP(USB_EP_COMMAND, cmd_ep_tx, cmd_ep_rx, cmd_ep_event);
/* we have space to insert the null terminator */
BUILD_ASSERT(CONFIG_CONSOLE_INPUT_LINE_SIZE > USB_MAX_PACKET_SIZE);