From e382d966d06d2989fc28eec8cfdcc2fd99ebfbb7 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 12 Dec 2012 13:40:59 +0100 Subject: usb: add usb_ep_set_halted Signed-off-by: Gerd Hoffmann --- hw/usb.h | 1 + hw/usb/core.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/hw/usb.h b/hw/usb.h index 90024a4515..af86fbd086 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -417,6 +417,7 @@ void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep, uint16_t raw); int usb_ep_get_max_packet_size(USBDevice *dev, int pid, int ep); void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled); +void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted); USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep, uint64_t id); diff --git a/hw/usb/core.c b/hw/usb/core.c index d057aab900..5517797c8a 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -755,6 +755,12 @@ void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled) uep->pipeline = enabled; } +void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted) +{ + struct USBEndpoint *uep = usb_ep_get(dev, pid, ep); + uep->halted = halted; +} + USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep, uint64_t id) { -- cgit v1.2.1