aboutsummaryrefslogtreecommitdiff
path: root/lib/usb/usb_control.c
diff options
context:
space:
mode:
authorGareth McMullin2010-11-04 16:49:03 +1300
committerGareth McMullin2010-11-04 16:49:03 +1300
commit87960830f4eb656f410ff3b220151e0b5ad9a556 (patch)
treece2ff6208c79ca40be61a27a5da0e46735ee2745 /lib/usb/usb_control.c
parentd6eacce827a8ebffb5e82b48d4c88eb097594c1e (diff)
Fixed HALT condition handling and data toggle.
Diffstat (limited to 'lib/usb/usb_control.c')
-rw-r--r--lib/usb/usb_control.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/usb/usb_control.c b/lib/usb/usb_control.c
index 950e491..f5e4d27 100644
--- a/lib/usb/usb_control.c
+++ b/lib/usb/usb_control.c
@@ -93,7 +93,7 @@ static int usb_control_recv_chunk(void)
packetsize);
if (size != packetsize) {
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
return -1;
}
@@ -127,7 +127,7 @@ static void usb_control_setup_nodata(struct usb_setup_data *req)
control_state.state = STATUS_IN;
} else {
/* Stall endpoint on failure */
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
}
}
@@ -156,14 +156,14 @@ static void usb_control_setup_read(struct usb_setup_data *req)
usb_control_send_chunk();
} else {
/* Stall endpoint on failure */
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
}
}
static void usb_control_setup_write(struct usb_setup_data *req)
{
if(req->wLength > _usbd_device.ctrl_buf_len) {
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
return;
}
@@ -184,7 +184,7 @@ void _usbd_control_setup(uint8_t ea)
control_state.complete = NULL;
if(usbd_ep_read_packet(0, req, 8) != 8) {
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
return;
}
@@ -233,7 +233,7 @@ void _usbd_control_out(uint8_t ea)
usbd_ep_write_packet(0, NULL, 0);
control_state.state = STATUS_IN;
} else {
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
}
break;
@@ -249,7 +249,7 @@ void _usbd_control_out(uint8_t ea)
}
default:
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
}
}
@@ -280,7 +280,7 @@ void _usbd_control_in(uint8_t ea)
}
default:
- usbd_ep_stall(0);
+ usbd_ep_stall_set(0, 1);
}
}